summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-webadmin/webmin/webmin_1.750.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-webadmin/webmin/webmin_1.750.bb')
-rw-r--r--meta-webserver/recipes-webadmin/webmin/webmin_1.750.bb151
1 files changed, 151 insertions, 0 deletions
diff --git a/meta-webserver/recipes-webadmin/webmin/webmin_1.750.bb b/meta-webserver/recipes-webadmin/webmin/webmin_1.750.bb
new file mode 100644
index 0000000000..b6fbb0a718
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/webmin_1.750.bb
@@ -0,0 +1,151 @@
1SUMMARY = "Web-based administration interface"
2HOMEPAGE = "http://www.webmin.com"
3LICENSE = "BSD"
4LIC_FILES_CHKSUM = "file://LICENCE;md5=0373ac9f611e542ddebe1ec6394afc3c"
5
6SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \
7 file://setup.sh \
8 file://init-exclude.patch \
9 file://net-generic.patch \
10 file://remove-startup-option.patch \
11 file://disable-version-check.patch \
12 file://nfs-export.patch \
13 file://exports-lib.pl.patch \
14 file://mount-excludefs.patch \
15 file://samba-config-fix.patch \
16 file://proftpd-config-fix.patch \
17 file://net-lib.pl.patch \
18 file://media-tomb.patch \
19 file://remove-python2.3.patch \
20 "
21
22SRC_URI[md5sum] = "4007c390323d840f26c2e0f43c5c81a3"
23SRC_URI[sha256sum] = "5111f820adc6fbca997a58d4b2fa186dac6cded9cff0e70724f8cae6021123d9"
24
25inherit perlnative update-rc.d
26
27do_configure() {
28 # Remove binaries and plugins for other platforms
29 rm -rf acl/Authen-SolarisRBAC-0.1*
30 rm -rf format bsdexports hpuxexports sgiexports
31 rm -rf zones rbac smf ipfw ipfilter dfsadmin
32 rm -f mount/freebsd-mounts* mount/netbsd-mounts*
33 rm -f mount/openbsd-mounts* mount/macos-mounts*
34
35 # Remove some plugins for the moment
36 rm -rf lilo frox wuftpd telnet pserver cpan shorewall webalizer cfengine fsdump pap
37 rm -rf majordomo fetchmail sendmail mailboxes procmail filter mailcap dovecot exim spam qmailadmin postfix
38 rm -rf stunnel squid sarg pptp-client pptp-server jabber openslp sentry cluster-* vgetty burner heartbeat
39
40 # Adjust configs
41 [ -f init/config-debian-linux ] && mv init/config-debian-linux init/config-generic-linux
42 sed -i "s/shutdown_command=.*/shutdown_command=poweroff/" init/config-generic-linux
43 echo "exclude=bootmisc.sh,single,halt,reboot,hostname.sh,modutils.sh,mountall.sh,mountnfs.sh,networking,populate-volatile.sh,rmnologin.sh,save-rtc.sh,umountfs,umountnfs.sh,hwclock.sh,checkroot.sh,banner.sh,udev,udev-cache,devpts.sh,psplash.sh,sendsigs,fbsetup,bootlogd,stop-bootlogd,sysfs.sh,syslog,syslog.busybox,urandom,webmin,functions.initscripts,read-only-rootfs-hook.sh" >> init/config-generic-linux
44 echo "excludefs=devpts,devtmpfs,usbdevfs,proc,tmpfs,sysfs,debugfs" >> mount/config-generic-linux
45
46 [ -f exports/config-debian-linux ] && mv exports/config-debian-linux exports/config-generic-linux
47 sed -i "s/killall -HUP rpc.nfsd && //" exports/config-generic-linux
48 sed -i "s/netstd_nfs/nfsserver/g" exports/config-generic-linux
49
50 # Fix insane naming that causes problems at packaging time (must be done before deleting below)
51 find . -name "*\**" | while read from
52 do
53 to=`echo "$from" | sed "s/*/ALL/"`
54 mv "$from" "$to"
55 done
56
57 # Remove some other files we don't need
58 find . -name "config-*" -a \! -name "config-generic-linux" -a \! -name "config-ALL-linux" -a \! -name "*.pl" -delete
59 find . -regextype posix-extended -regex ".*/(openserver|aix|osf1|osf|openbsd|netbsd|freebsd|unixware|solaris|macos|irix|hpux|cygwin|windows)-lib\.pl" -delete
60 rm -f webmin-gentoo-init webmin-caldera-init webmin-debian-pam webmin-pam
61
62 # Don't need these at runtime (and we have our own setup script)
63 rm -f setup.sh
64 rm -f setup.pl
65
66 # Use pidof for finding PIDs
67 sed -i "s/find_pid_command=.*/find_pid_command=pidof NAME/" config-generic-linux
68}
69
70WEBMIN_LOGIN ?= "admin"
71WEBMIN_PASSWORD ?= "password"
72
73do_install() {
74 install -d ${D}${sysconfdir}
75 install -d ${D}${sysconfdir}/webmin
76 install -d ${D}${sysconfdir}/init.d
77 install -m 0755 webmin-init ${D}${sysconfdir}/init.d/webmin
78
79 install -d ${D}${localstatedir}
80 install -d ${D}${localstatedir}/webmin
81
82 install -d ${D}${libexecdir}/webmin
83 cp -pPR ${S}/* ${D}${libexecdir}/webmin
84 rm -f ${D}${libexecdir}/webmin/webmin-init
85 rm -f ${D}${libexecdir}/webmin/ajaxterm/ajaxterm/configure.initd.gentoo
86 rm -rf ${D}${libexecdir}/webmin/patches
87
88 # Run setup script
89 export perl=perl
90 export perl_runtime=${bindir}/perl
91 export prefix=${D}
92 export tempdir=${S}/install_tmp
93 export wadir=${libexecdir}/webmin
94 export config_dir=${sysconfdir}/webmin
95 export var_dir=${localstatedir}/webmin
96 export os_type=generic-linux
97 export os_version=0
98 export real_os_type="${DISTRO_NAME}"
99 export real_os_version="${DISTRO_VERSION}"
100 export port=10000
101 export login=${WEBMIN_LOGIN}
102 export password=${WEBMIN_PASSWORD}
103 export ssl=0
104 export atboot=1
105 export no_pam=1
106 mkdir -p $tempdir
107 ${S}/../setup.sh
108}
109
110INITSCRIPT_NAME = "webmin"
111INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ."
112
113# FIXME: some of this should be figured out automatically
114RDEPENDS_${PN} += "perl perl-module-socket perl-module-exporter perl-module-exporter-heavy perl-module-carp perl-module-strict"
115RDEPENDS_${PN} += "perl-module-warnings perl-module-xsloader perl-module-posix perl-module-autoloader"
116RDEPENDS_${PN} += "perl-module-fcntl perl-module-tie-hash perl-module-vars perl-module-time-local perl-module-config perl-module-constant"
117RDEPENDS_${PN} += "perl-module-file-glob perl-module-file-copy perl-module-sdbm perl-module-sdbm-file perl-module-feature"
118
119PACKAGES_DYNAMIC += "webmin-module-* webmin-theme-*"
120RRECOMMENDS_${PN} += "webmin-module-system-status"
121
122PACKAGES += "${PN}-module-proc ${PN}-module-raid ${PN}-module-exports ${PN}-module-fdisk ${PN}-module-lvm"
123RDEPENDS_${PN}-module-proc = "procps"
124RDEPENDS_${PN}-module-raid = "mdadm"
125RDEPENDS_${PN}-module-exports = "perl-module-file-basename perl-module-file-path perl-module-cwd perl-module-file-spec perl-module-file-spec-unix"
126RRECOMMENDS_${PN}-module-fdisk = "parted"
127RRECOMMENDS_${PN}-module-lvm = "lvm2"
128
129python populate_packages_prepend() {
130 import os, os.path
131
132 wadir = bb.data.expand('${libexecdir}/webmin', d)
133 wadir_image = bb.data.expand('${D}', d) + wadir
134 modules = []
135 themes = []
136 for mod in os.listdir(wadir_image):
137 modinfo = os.path.join(wadir_image, mod, "module.info")
138 themeinfo = os.path.join(wadir_image, mod, "theme.info")
139 if os.path.exists(modinfo):
140 modules.append(mod)
141 elif os.path.exists(themeinfo):
142 themes.append(mod)
143
144 do_split_packages(d, wadir, '^(%s)$' % "|".join(modules), 'webmin-module-%s', 'Webmin module for %s', allow_dirs=True, prepend=True)
145 do_split_packages(d, wadir, '^(%s)$' % "|".join(themes), 'webmin-theme-%s', 'Webmin theme for %s', allow_dirs=True, prepend=True)
146}
147
148# Time-savers
149package_do_pkgconfig() {
150 :
151}