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