summaryrefslogtreecommitdiffstats
path: root/meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
commit1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch)
tree0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb
downloadmeta-openembedded-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb')
-rw-r--r--meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb139
1 files changed, 139 insertions, 0 deletions
diff --git a/meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb b/meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb
new file mode 100644
index 0000000000..8822b92fb3
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb
@@ -0,0 +1,139 @@
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] = "e93bc5057a5b7d7e31ecb2bb228d7044"
21SRC_URI[sha256sum] = "3d36153406d8e5d3dcaeadba34dfb5cdbc4060b75c38339174ac97b2277f284b"
22
23inherit allarch 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 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 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
68do_install() {
69 install -d ${D}${sysconfdir}
70 install -d ${D}${sysconfdir}/webmin
71 install -d ${D}${sysconfdir}/init.d
72 install -m 0755 webmin-init ${D}${sysconfdir}/init.d/webmin
73
74 install -d ${D}${localstatedir}
75 install -d ${D}${localstatedir}/webmin
76
77 install -d ${D}${libexecdir}/webmin
78 cp -pPR ${S}/* ${D}${libexecdir}/webmin
79 rm -f ${D}${libexecdir}/webmin/webmin-init
80 rm -rf ${D}${libexecdir}/webmin/patches
81
82 # Run setup script
83 export perl=perl
84 export perl_runtime=${bindir}/perl
85 export prefix=${D}
86 export tempdir=${S}/install_tmp
87 export wadir=${libexecdir}/webmin
88 export config_dir=${sysconfdir}/webmin
89 export var_dir=${localstatedir}/webmin
90 export os_type=generic-linux
91 export os_version=0
92 export real_os_type="${DISTRO_NAME}"
93 export real_os_version="${DISTRO_VERSION}"
94 export port=10000
95 export login=admin
96 export password=password
97 export ssl=0
98 export atboot=1
99 export no_pam=1
100 mkdir -p $tempdir
101 ${S}/../setup.sh
102}
103
104INITSCRIPT_NAME = "webmin"
105INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ."
106
107# FIXME: some of this should be figured out automatically
108RDEPENDS_${PN} += "perl perl-module-socket perl-module-exporter perl-module-exporter-heavy perl-module-carp perl-module-strict"
109RDEPENDS_${PN} += "perl-module-warnings perl-module-xsloader perl-module-posix perl-module-autoloader"
110RDEPENDS_${PN} += "perl-module-fcntl perl-module-tie-hash perl-module-vars perl-module-time-local perl-module-config perl-module-constant"
111RDEPENDS_${PN} += "perl-module-file-glob perl-module-file-copy perl-module-sdbm perl-module-sdbm-file perl-module-timelocal perl-module-feature"
112
113PACKAGES_DYNAMIC += "webmin-module-*"
114RRECOMMENDS_${PN} += "webmin-module-system-status"
115
116RDEPENDS_webmin-module-proc = "procps"
117RDEPENDS_webmin-module-raid = "mdadm"
118RDEPENDS_webmin-module-exports = "perl-module-file-basename perl-module-file-path perl-module-cwd perl-module-file-spec perl-module-file-spec-unix"
119RRECOMMENDS_webmin-module-fdisk = "parted"
120RRECOMMENDS_webmin-module-lvm = "lvm2"
121
122python populate_packages_prepend() {
123 import os, os.path
124
125 wadir = bb.data.expand('${libexecdir}/webmin', d)
126 wadir_image = bb.data.expand('${D}', d) + wadir
127 modules = []
128 for mod in os.listdir(wadir_image):
129 modinfo = os.path.join(wadir_image, mod, "module.info")
130 if os.path.exists(modinfo):
131 modules.append(mod)
132
133 do_split_packages(d, wadir, '^(%s)$' % "|".join(modules), 'webmin-module-%s', 'Webmin module for %s', allow_dirs=True, prepend=True)
134}
135
136# Time-savers
137package_do_pkgconfig() {
138 :
139}