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.bb148
1 files changed, 148 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 0000000000..45d635e099
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/webmin_1.700.bb
@@ -0,0 +1,148 @@
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
20SRC_URI[md5sum] = "e5261114a6a6ed10caf570d3239ed5b7"
21SRC_URI[sha256sum] = "1a6a8aa62c32c04932b902d17fc1864ee8f3fba03012bd25f709aa65e7e9b0f2"
22
23inherit perlnative update-rc.d
24
25do_configure() {
26 # Remove binaries and plugins for other platforms
27 rm -rf acl/Authen-SolarisRBAC-0.1*
28 rm -rf format bsdexports hpuxexports sgiexports
29 rm -rf zones rbac smf ipfw ipfilter dfsadmin
30 rm -f mount/freebsd-mounts* mount/netbsd-mounts*
31 rm -f mount/openbsd-mounts* mount/macos-mounts*
32
33 # Remove some plugins for the moment
34 rm -rf lilo frox wuftpd telnet pserver cpan shorewall webalizer cfengine fsdump pap
35 rm -rf majordomo fetchmail sendmail mailboxes procmail filter mailcap dovecot exim spam qmailadmin postfix
36 rm -rf stunnel squid sarg pptp-client pptp-server jabber openslp sentry cluster-* vgetty burner heartbeat
37
38 # Adjust configs
39 [ -f init/config-debian-linux ] && mv init/config-debian-linux init/config-generic-linux
40 sed -i "s/shutdown_command=.*/shutdown_command=poweroff/" init/config-generic-linux
41 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
42 echo "excludefs=devpts,devtmpfs,usbdevfs,proc,tmpfs,sysfs,debugfs" >> mount/config-generic-linux
43
44 [ -f exports/config-debian-linux ] && mv exports/config-debian-linux exports/config-generic-linux
45 sed -i "s/killall -HUP rpc.nfsd && //" exports/config-generic-linux
46 sed -i "s/netstd_nfs/nfsserver/g" exports/config-generic-linux
47
48 # Fix insane naming that causes problems at packaging time (must be done before deleting below)
49 find . -name "*\**" | while read from
50 do
51 to=`echo "$from" | sed "s/*/ALL/"`
52 mv "$from" "$to"
53 done
54
55 # Remove some other files we don't need
56 find . -name "config-*" -a \! -name "config-generic-linux" -a \! -name "config-ALL-linux" -a \! -name "*.pl" -delete
57 find . -regextype posix-extended -regex ".*/(openserver|aix|osf1|osf|openbsd|netbsd|freebsd|unixware|solaris|macos|irix|hpux|cygwin|windows)-lib\.pl" -delete
58 rm -f webmin-gentoo-init webmin-caldera-init webmin-debian-pam webmin-pam
59
60 # Don't need these at runtime (and we have our own setup script)
61 rm -f setup.sh
62 rm -f setup.pl
63
64 # Use pidof for finding PIDs
65 sed -i "s/find_pid_command=.*/find_pid_command=pidof NAME/" config-generic-linux
66}
67
68WEBMIN_LOGIN ?= "admin"
69WEBMIN_PASSWORD ?= "password"
70
71do_install() {
72 install -d ${D}${sysconfdir}
73 install -d ${D}${sysconfdir}/webmin
74 install -d ${D}${sysconfdir}/init.d
75 install -m 0755 webmin-init ${D}${sysconfdir}/init.d/webmin
76
77 install -d ${D}${localstatedir}
78 install -d ${D}${localstatedir}/webmin
79
80 install -d ${D}${libexecdir}/webmin
81 cp -pPR ${S}/* ${D}${libexecdir}/webmin
82 rm -f ${D}${libexecdir}/webmin/webmin-init
83 rm -rf ${D}${libexecdir}/webmin/patches
84
85 # Run setup script
86 export perl=perl
87 export perl_runtime=${bindir}/perl
88 export prefix=${D}
89 export tempdir=${S}/install_tmp
90 export wadir=${libexecdir}/webmin
91 export config_dir=${sysconfdir}/webmin
92 export var_dir=${localstatedir}/webmin
93 export os_type=generic-linux
94 export os_version=0
95 export real_os_type="${DISTRO_NAME}"
96 export real_os_version="${DISTRO_VERSION}"
97 export port=10000
98 export login=${WEBMIN_LOGIN}
99 export password=${WEBMIN_PASSWORD}
100 export ssl=0
101 export atboot=1
102 export no_pam=1
103 mkdir -p $tempdir
104 ${S}/../setup.sh
105}
106
107INITSCRIPT_NAME = "webmin"
108INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ."
109
110# FIXME: some of this should be figured out automatically
111RDEPENDS_${PN} += "perl perl-module-socket perl-module-exporter perl-module-exporter-heavy perl-module-carp perl-module-strict"
112RDEPENDS_${PN} += "perl-module-warnings perl-module-xsloader perl-module-posix perl-module-autoloader"
113RDEPENDS_${PN} += "perl-module-fcntl perl-module-tie-hash perl-module-vars perl-module-time-local perl-module-config perl-module-constant"
114RDEPENDS_${PN} += "perl-module-file-glob perl-module-file-copy perl-module-sdbm perl-module-sdbm-file perl-module-feature"
115
116PACKAGES_DYNAMIC += "webmin-module-* webmin-theme-*"
117RRECOMMENDS_${PN} += "webmin-module-system-status"
118
119PACKAGES += "${PN}-module-proc ${PN}-module-raid ${PN}-module-exports ${PN}-module-fdisk ${PN}-module-lvm"
120RDEPENDS_${PN}-module-proc = "procps"
121RDEPENDS_${PN}-module-raid = "mdadm"
122RDEPENDS_${PN}-module-exports = "perl-module-file-basename perl-module-file-path perl-module-cwd perl-module-file-spec perl-module-file-spec-unix"
123RRECOMMENDS_${PN}-module-fdisk = "parted"
124RRECOMMENDS_${PN}-module-lvm = "lvm2"
125
126python populate_packages_prepend() {
127 import os, os.path
128
129 wadir = bb.data.expand('${libexecdir}/webmin', d)
130 wadir_image = bb.data.expand('${D}', d) + wadir
131 modules = []
132 themes = []
133 for mod in os.listdir(wadir_image):
134 modinfo = os.path.join(wadir_image, mod, "module.info")
135 themeinfo = os.path.join(wadir_image, mod, "theme.info")
136 if os.path.exists(modinfo):
137 modules.append(mod)
138 elif os.path.exists(themeinfo):
139 themes.append(mod)
140
141 do_split_packages(d, wadir, '^(%s)$' % "|".join(modules), 'webmin-module-%s', 'Webmin module for %s', allow_dirs=True, prepend=True)
142 do_split_packages(d, wadir, '^(%s)$' % "|".join(themes), 'webmin-theme-%s', 'Webmin theme for %s', allow_dirs=True, prepend=True)
143}
144
145# Time-savers
146package_do_pkgconfig() {
147 :
148}