diff options
Diffstat (limited to 'meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb')
| -rw-r--r-- | meta-webserver/recipes-webadmin/webmin/webmin_1.620.bb | 139 |
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 @@ | |||
| 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 | |||
| 20 | SRC_URI[md5sum] = "e93bc5057a5b7d7e31ecb2bb228d7044" | ||
| 21 | SRC_URI[sha256sum] = "3d36153406d8e5d3dcaeadba34dfb5cdbc4060b75c38339174ac97b2277f284b" | ||
| 22 | |||
| 23 | inherit allarch perlnative update-rc.d | ||
| 24 | |||
| 25 | do_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 | |||
| 68 | do_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 | |||
| 104 | INITSCRIPT_NAME = "webmin" | ||
| 105 | INITSCRIPT_PARAMS = "start 99 5 3 2 . stop 10 0 1 6 ." | ||
| 106 | |||
| 107 | # FIXME: some of this should be figured out automatically | ||
| 108 | RDEPENDS_${PN} += "perl perl-module-socket perl-module-exporter perl-module-exporter-heavy perl-module-carp perl-module-strict" | ||
| 109 | RDEPENDS_${PN} += "perl-module-warnings perl-module-xsloader perl-module-posix perl-module-autoloader" | ||
| 110 | RDEPENDS_${PN} += "perl-module-fcntl perl-module-tie-hash perl-module-vars perl-module-time-local perl-module-config perl-module-constant" | ||
| 111 | RDEPENDS_${PN} += "perl-module-file-glob perl-module-file-copy perl-module-sdbm perl-module-sdbm-file perl-module-timelocal perl-module-feature" | ||
| 112 | |||
| 113 | PACKAGES_DYNAMIC += "webmin-module-*" | ||
| 114 | RRECOMMENDS_${PN} += "webmin-module-system-status" | ||
| 115 | |||
| 116 | RDEPENDS_webmin-module-proc = "procps" | ||
| 117 | RDEPENDS_webmin-module-raid = "mdadm" | ||
| 118 | RDEPENDS_webmin-module-exports = "perl-module-file-basename perl-module-file-path perl-module-cwd perl-module-file-spec perl-module-file-spec-unix" | ||
| 119 | RRECOMMENDS_webmin-module-fdisk = "parted" | ||
| 120 | RRECOMMENDS_webmin-module-lvm = "lvm2" | ||
| 121 | |||
| 122 | python 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 | ||
| 137 | package_do_pkgconfig() { | ||
| 138 | : | ||
| 139 | } | ||
