# zero out some useless deps. # (tv) we'd better had a link in minicom & package Encode::HanConvert: %define _requires_exceptions HanConvert\\|runscript # don't spend time with this either %define _enable_debug_packages %{nil} %define debug_package %{nil} %define release %mkrel 1 Summary: An SSL web-based administration interface for Unix systems Name: webmin Version: 1.550 Release: %{release} License: BSD Group: System/Configuration/Other URL: http://www.webmin.com/webmin/ Source0: http://heanet.dl.sourceforge.net/sourceforge/webadmin/%{name}-%{version}.tar.gz Source2: other.modules.tar.bz2 # some images were missing Source33: advanced.png Source34: descs.png Source4: webmin-postinstallscript.sh Source5: webmin Source6: webmin.initscript Source9: http://www.openit.it/index.php/openit_en/content/download/2474/10171/file/openvpn-2.0.wbm.gz Source10: webmin.pam Source11: webmin-16.png Source12: webmin-32.png Source13: webmin-48.png # uses include instead of pam_stack Source14: webmin.pam-new Source15: webmin.logrotate # (gc) have the updates; this needs to change for each version and/or release, see # http://www.webmin.com/webmin/updates.html Patch1: webmin-1.100-remove-atboot-problem Patch5: webmin-fix-newmods.patch Patch7: webmin-0.85-never-fail-detect-os.patch Patch8: webmin-0.85-enable-changed-theme-at-installation.patch Patch10: webmin-1.510-fix-os-list.patch Patch17: webmin-1.220-remove-mandrakestuff-from-init.patch Patch19: webmin-0.92-add-default-configs-logviewer-fp2k.patch Patch21: webmin-0.950-add-netsaint-mandrake-config.patch Patch23: webmin-1.020-ssl-location.patch Patch26: webmin-1.060-mysql-fix-installing-missing-packages.patch Patch29: webmin-1.100-let-localauth-config.patch Patch32: webmin-1.310-usermin-fix-installing-missing-package.diff Patch33: webmin-1.130-postgresql-fix-installing-missing-packages.patch Patch35: webmin-1.220-usermin-fix-index.patch Patch37: webmin-temp-permission-fix.diff Patch38: webmin-ssldir-cosmetic.diff Patch39: webmin-fix-bandwith.diff Patch40: webmin-fix-sarg.diff Requires(pre): rpm-helper Requires: perl Requires: perl-CGI Requires: lsof Requires(pre): sed chkconfig findutils coreutils initscripts grep perl-Net_SSLeay perl-Authen-PAM Provides: %{name}-%{version} BuildArch: noarch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description A web-based administration interface for Unix systems. Using Webmin you can configure DNS, Samba, NFS, local/remote filesystems, Apache, Sendmail/Postfix, and more using your web browser. After installation, enter the URL https://localhost:10000/ into your browser and login as root with your root password. Please consider logging in and modify your password for security issue. PLEASE NOTE THAT THIS VERSION NOW USES SECURE WEB TRANSACTIONS: YOU HAVE TO LOGIN TO "https://localhost:10000/" AND NOT "http://localhost:10000/". %prep %setup -q -a2 rm -fr %{name}-%{version}/dhcpd rm -fr %{name}-%{version}/useradmin %setup -q -D -T -c -a 9 -n %{name}-%{version} %patch1 -p1 %patch5 -p0 %patch7 -p1 %patch8 -p1 %patch10 -p1 %patch19 -p0 %patch21 -p0 %patch23 -p1 %patch26 -p1 %patch29 -p1 %patch32 -p0 %patch33 -p1 %patch35 -p1 %patch37 -p1 %patch38 -p1 %patch39 -p1 %patch40 -p1 # use MD5 by default find bind8 -type f -maxdepth 1 | xargs perl -pi -e 's|/var/run/named\.pid|/var/run/named/named.pid|' # daouda: added mageia-linux to known OS cp config-mandrake-linux config-mageia perl -pi -e 's|redhat-linux(?! mageia)|redhat-linux mageia| if $_ =~ /^os_support.*redhat-linux/ && $_ !~ /mageia/' */module.info #' perl -pi -e 's|/etc/smb\.conf|/etc/samba/smb\.conf|' samba/config-mageia (find . -name '*.cgi' ; find . -name '*.pl') | perl perlpath.pl /usr/bin/perl - rm -f mount/freebsd-mounts-* rm -f mount/openbsd-mounts-* find -name ".xvpics" -o -name ".*.swp" | xargs rm -rf %build # nothing to do here... %install rm -rf %{buildroot} # IMPORTANT: there is no %{_datadir} and so on, since the directories are decided by the post install script. mkdir -p %{buildroot}/usr/share/webmin mkdir -p %{buildroot}/%{_initrddir} mkdir -p %{buildroot}/usr/bin find -type f -print0 | xargs -0 chmod a+r find -type d -print0 | xargs -0 chmod a+rx cp -a * %{buildroot}/usr/share/webmin install -m755 %{SOURCE6} %{buildroot}/%{_initrddir}/webmin install -m755 %{SOURCE4} %{buildroot}/usr/share/webmin/postinstall.sh install -m755 %{SOURCE5} %{buildroot}/usr/bin mkdir -p %{buildroot}/%{_sysconfdir}/pam.d install -m755 %{SOURCE14} %{buildroot}/%{_sysconfdir}/pam.d/webmin rm -rf %{buildroot}/usr/share/webmin/*/{CVS,*/CVS} rm -f `find %{buildroot} -type f -name .cvsignore` # (gc) remove zero-length files (to check sometimes if they are still zero-length'ed) for i in /usr/share/webmin/caldera/images/letters/254.gif /usr/share/webmin/i4lctrl-0.6.7/lang/de /usr/share/webmin/caldera/images/letters/255.gif; do if [ -f $i ]; then rm -f %{buildroot}$i; fi done echo "rpm" > %{buildroot}/usr/share/webmin/install-type # (sb) remove development file rm -f %{buildroot}/usr/share/webmin/mount/macos-mounts.c echo 'blue-theme' > %{buildroot}%{_datadir}/webmin/defaulttheme # Install icons install -d -m 0755 %{buildroot}%{_liconsdir} install -d -m 0755 %{buildroot}%{_miconsdir} install -m 0644 %{SOURCE11} %{buildroot}%{_miconsdir}/webmin.png install -m 0644 %{SOURCE12} %{buildroot}%{_iconsdir}/webmin.png install -m 0644 %{SOURCE11} %{buildroot}%{_liconsdir}/webmin.png # Menu entry # XDG menu install -d %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/mandriva-%{name}.desktop << EOF [Desktop Entry] Name=%{name} Comment=%{summary} Exec=%{_bindir}/www-browser https://localhost:10000/ Icon=%{name} Terminal=false Type=Application Categories=X-MandrivaLinux-System-Configuration-Other;Settings; EOF rm -fr %{buildroot}/usr/share/webmin/acl/Authen-SolarisRBAC-0.1 #logrotate install -d %{buildroot}%{_sysconfdir}/logrotate.d install -m 0644 %{SOURCE15} %{buildroot}%{_sysconfdir}/logrotate.d/webmin %post if [ "$1" != 0 ]; then service webmin status >/dev/null 2>/dev/null && need_restart=1 service webmin stop >/dev/null 2>/dev/null || : else [[ -e /etc/cron.allow ]] && if [ "x`grep root /etc/cron.allow`" == "x" ] ; then echo root >> /etc/cron.allow fi fi /usr/share/webmin/postinstall.sh [[ -n $need_restart ]] && service webmin start >/dev/null 2>/dev/null || : %preun %_preun_service webmin %postun if [ "$1" = 0 ]; then rm -rf /etc/webmin /var/webmin /var/lib/webmin /var/run/webmin /var/log/webmin fi %clean rm -rf %{buildroot} %files %defattr(-, root, root, 0755) %doc README LICENCE %{_initrddir}/webmin %config(noreplace) %{_sysconfdir}/pam.d/webmin %config(noreplace) %{_sysconfdir}/logrotate.d/webmin /usr/share/webmin /usr/bin/%{name} %{_iconsdir}/%{name}.png %{_liconsdir}/%{name}.png %{_miconsdir}/%{name}.png %{_datadir}/applications/*.desktop