summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-webadmin/webmin/webmin_1.700.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver/recipes-webadmin/webmin/webmin_1.700.bb')
-rw-r--r--meta-webserver/recipes-webadmin/webmin/webmin_1.700.bb150
1 files changed, 150 insertions, 0 deletions
diff --git a/meta-webserver/recipes-webadmin/webmin/webmin_1.700.bb b/meta-webserver/recipes-webadmin/webmin/webmin_1.700.bb
new file mode 100644
index 000000000..2a363cbcf
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/webmin_1.700.bb
@@ -0,0 +1,150 @@
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] = "e5261114a6a6ed10caf570d3239ed5b7"
23SRC_URI[sha256sum] = "1a6a8aa62c32c04932b902d17fc1864ee8f3fba03012bd25f709aa65e7e9b0f2"
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 -rf ${D}${libexecdir}/webmin/patches
86
87 # Run setup script
88 export perl=perl
89 export perl_runtime=${bindir}/perl
90 export prefix=${D}
91 export tempdir=${S}/install_tmp
92 export wadir=${libexecdir}/webmin
93 export config_dir=${sysconfdir}/webmin
94 export var_dir=${localstatedir}/webmin
95 export os_type=generic-linux
96 export os_version=0
97 export real_os_type="${DISTRO_NAME}"
98 export real_os_version="${DISTRO_VERSION}"
99 export port=10000
100 export login=${WEBMIN_LOGIN}
101 export password=${WEBMIN_PASSWORD}
102 export ssl=0
103 export atboot=1
104 export no_pam=1
105 mkdir -p $tempdir
106 ${S}/../setup.sh
107}
108
109INITSCRIPT_NAME = "webmin"
110INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ."
111
112# FIXME: some of this should be figured out automatically
113RDEPENDS_${PN} += "perl perl-module-socket perl-module-exporter perl-module-exporter-heavy perl-module-carp perl-module-strict"
114RDEPENDS_${PN} += "perl-module-warnings perl-module-xsloader perl-module-posix perl-module-autoloader"
115RDEPENDS_${PN} += "perl-module-fcntl perl-module-tie-hash perl-module-vars perl-module-time-local perl-module-config perl-module-constant"
116RDEPENDS_${PN} += "perl-module-file-glob perl-module-file-copy perl-module-sdbm perl-module-sdbm-file perl-module-feature"
117
118PACKAGES_DYNAMIC += "webmin-module-* webmin-theme-*"
119RRECOMMENDS_${PN} += "webmin-module-system-status"
120
121PACKAGES += "${PN}-module-proc ${PN}-module-raid ${PN}-module-exports ${PN}-module-fdisk ${PN}-module-lvm"
122RDEPENDS_${PN}-module-proc = "procps"
123RDEPENDS_${PN}-module-raid = "mdadm"
124RDEPENDS_${PN}-module-exports = "perl-module-file-basename perl-module-file-path perl-module-cwd perl-module-file-spec perl-module-file-spec-unix"
125RRECOMMENDS_${PN}-module-fdisk = "parted"
126RRECOMMENDS_${PN}-module-lvm = "lvm2"
127
128python populate_packages_prepend() {
129 import os, os.path
130
131 wadir = bb.data.expand('${libexecdir}/webmin', d)
132 wadir_image = bb.data.expand('${D}', d) + wadir
133 modules = []
134 themes = []
135 for mod in os.listdir(wadir_image):
136 modinfo = os.path.join(wadir_image, mod, "module.info")
137 themeinfo = os.path.join(wadir_image, mod, "theme.info")
138 if os.path.exists(modinfo):
139 modules.append(mod)
140 elif os.path.exists(themeinfo):
141 themes.append(mod)
142
143 do_split_packages(d, wadir, '^(%s)$' % "|".join(modules), 'webmin-module-%s', 'Webmin module for %s', allow_dirs=True, prepend=True)
144 do_split_packages(d, wadir, '^(%s)$' % "|".join(themes), 'webmin-theme-%s', 'Webmin theme for %s', allow_dirs=True, prepend=True)
145}
146
147# Time-savers
148package_do_pkgconfig() {
149 :
150}