Author: glen Date: Sun Jul 20 08:43:26 2008 GMT Module: SPECS Tag: HEAD ---- Log message: - some cleanups, cosmetics, adapter
---- Files affected: SPECS: usermin.spec (1.2 -> 1.3) ---- Diffs: ================================================================ Index: SPECS/usermin.spec diff -u SPECS/usermin.spec:1.2 SPECS/usermin.spec:1.3 --- SPECS/usermin.spec:1.2 Sun Jul 20 09:57:57 2008 +++ SPECS/usermin.spec Sun Jul 20 10:43:20 2008 @@ -8,35 +8,34 @@ Version: 1.300 Release: 0.1 License: Freeware +###### Unknown group! Group: System/Tools Source0: http://www.webmin.com/download/%{name}-%{version}.tar.gz # Source0-md5: d5da4ecbf388b740edc1f25b15ddd39a -Requires: webserver +Requires: %{__perl} Requires: /bin/rm Requires: /bin/sh -Requires: /usr/bin/perl -BuildArch: noarch -BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +Requires: webserver +BuildArch: noarch +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _libexecdir %{_libdir} %description A web-based user account administration interface for Unix systems. -After installation, enter the URL http://localhost:20000/ into your +After installation, enter the URL <http://localhost:20000/> into your browser and login as any user on your system. %description -l pl.UTF-8 Oparty na WWW interfejs do administrowania kontami użytkowników. Po zainstalowaniu wystarczy w przeglądarce wpisać URL -http://localhost:20000/ i zalogować jako dowolny użytkownik. +<http://localhost:20000/> i zalogować jako dowolny użytkownik. %prep %setup -q - -%build -(find . -name '*.cgi' ; find . -name '*.pl') | perl perlpath.pl %{__perl} - +find -name '*.cgi' -o -name '*.pl' | %{__perl} perlpath.pl %{__perl} - rm -f mount/freebsd-mounts-* rm -f mount/openbsd-mounts-* chmod -R og-w . @@ -48,7 +47,7 @@ install -d $RPM_BUILD_ROOT/etc/rc.d/init.d install -d $RPM_BUILD_ROOT/etc/pam.d -cp -rp * $RPM_BUILD_ROOT%{_libexecdir}/usermin +cp -a * $RPM_BUILD_ROOT%{_libexecdir}/usermin cp usermin-daemon $RPM_BUILD_ROOT/etc/sysconfig/usermin cp usermin-init $RPM_BUILD_ROOT/etc/rc.d/init.d/usermin cp usermin-pam $RPM_BUILD_ROOT/etc/pam.d/usermin @@ -66,11 +65,13 @@ %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/usermin %post +# $inetd never used inetd=`grep "^inetd=" %{_sysconfdir}/usermin/miniserv.conf 2>/dev/null | sed -e 's/inetd=//g'` if [ "$1" != 1 ]; then # Upgrading the RPM, so stop the old usermin properly - if [ "" != "1" ]; then - /etc/rc.d/init.d/usermin stop >/dev/null 2>&1 + # XXX looks wrong, $inetd check or $? should be here instead? + if [ "$1" != "1" ]; then + /sbin/service usermin stop fi fi cd %{_libexecdir}/usermin @@ -88,24 +89,27 @@ nouninstall=1 nostart=1 export config_dir var_dir perl autoos port ssl nochown autothird noperlpath nouninstall nostart allow -./setup.sh >/var/lib/usermin/usermin-setup.out 2>&1 +./setup.sh > /var/lib/usermin/usermin-setup.out 2>&1 rm -f /var/lock/subsys/usermin -if [ "" != "1" ]; then +if [ "$1" != "1" ]; then # XXX: only if it was running before upgrade! - #/etc/rc.d/init.d/usermin start >/dev/null 2>&1 </dev/null + #/sbin/service usermin start fi -cat >%{_sysconfdir}/usermin/uninstall.sh <<EOFF + +# XXX: move uninstall.sh creation to %%install or rather discard +cat > %{_sysconfdir}/usermin/uninstall.sh <<'EOF' #!/bin/sh printf "Are you sure you want to uninstall Usermin? (y/n) : " read answer printf "\n" -if [ "\$answer" = "y" ]; then +if [ "$answer" = "y" ]; then echo "Removing usermin RPM .." rpm -e usermin echo "Done!" fi -EOFF +EOF chmod +x %{_sysconfdir}/usermin/uninstall.sh + port=`grep "^port=" %{_sysconfdir}/usermin/miniserv.conf | sed -e 's/port=//g'` perl -e 'use Net::SSLeay' >/dev/null 2>/dev/null sslmode=0 @@ -124,23 +128,11 @@ %preun if [ "$1" = 0 ]; then - grep root=%{_libexecdir}/usermin %{_sysconfdir}/usermin/miniserv.conf >/dev/null 2>&1 + grep -q root=%{_libexecdir}/usermin %{_sysconfdir}/usermin/miniserv.conf if [ "$?" = 0 ]; then # RPM is being removed, and no new version of usermin # has taken it's place. Stop the server - /etc/rc.d/init.d/usermin stop >/dev/null 2>&1 - /bin/true - fi -fi - -%postun -if [ "$1" = 0 ]; then - grep root=%{_libexecdir}/usermin %{_sysconfdir}/usermin/miniserv.conf >/dev/null 2>&1 - if [ "$?" = 0 ]; then - # RPM is being removed, and no new version of usermin - # has taken it's place. Delete the config files - # XXX: wrong - #rm -rf %{_sysconfdir}/usermin /var/lib/usermin + /sbin/service usermin stop || : fi fi @@ -150,6 +142,9 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.3 2008/07/20 08:43:20 glen +- some cleanups, cosmetics, adapter + Revision 1.2 2008/07/20 07:57:57 qboosh - pl, partial cleanup ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/usermin.spec?r1=1.2&r2=1.3&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
