]> git.pld-linux.org Git - packages/pdns.git/commitdiff
- %%groupremove/%%userremove support, some standarization
authorankry <ankry@pld-linux.org>
Tue, 12 Oct 2004 12:35:24 +0000 (12:35 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    pdns.spec -> 1.36

pdns.spec

index 0e1627ebe4f5beee08632572d92c9fddbc5c372e..f4277c7803e04d58c591fad3246e5fc57987d418 100644 (file)
--- a/pdns.spec
+++ b/pdns.spec
@@ -20,16 +20,21 @@ BuildRequires:      flex
 BuildRequires: libstdc++-devel
 BuildRequires: libpq++-devel
 BuildRequires: mysql-devel
-BuildRequires: zlib-devel
 BuildRequires: openldap-devel
+BuildRequires: rpmbuild(macros) >= 1.159
+BuildRequires: zlib-devel
 PreReq:                rc-scripts
 Requires(pre): /bin/id
-Requires(pre): /usr/sbin/useradd
+Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
 Requires(post,preun):  /sbin/chkconfig
+Requires(postun):      /usr/sbin/groupdel
 Requires(postun):      /usr/sbin/userdel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+Provides:      group(djbdns)
 Provides:      nameserver
+Provides:      user(pdns)
 Obsoletes:     powerdns
 
 %description
@@ -139,21 +144,21 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-if [ -n "`getgid djbdns`" ]; then
-       if [ "`getgid djbdns`" != "32" ]; then
+if [ -n "`/usr/bin/getgid djbdns`" ]; then
+       if [ "`/usr/bin/getgid djbdns`" != "32" ]; then
                echo "Error: group djbdns doesn't have gid=32. Correct this before installing pdns." 1>&2
                exit 1
        fi
 else
-       /usr/sbin/groupadd -g 32 -r -f djbdns
+       /usr/sbin/groupadd -g 32 djbdns
 fi
-if [ -n "`id -u pdns 2>/dev/null`" ]; then
-       if [ "`id -u pdns`" != "30" ]; then
+if [ -n "`/bin/id -u pdns 2>/dev/null`" ]; then
+       if [ "`/bin/id -u pdns`" != "30" ]; then
                echo "Error: user pdns doesn't have uid=30. Correct this before installing pdns." 1>&2
                exit 1
        fi
 else
-       /usr/sbin/useradd -u 30 -r -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns 1>&2
+       /usr/sbin/useradd -u 30 -d /var/lib/pdns -s /bin/false -c "pdns User" -g djbdns pdns 1>&2
 fi
 
 %post
@@ -180,7 +185,8 @@ fi
 
 %postun
 if [ "$1" = "0" ]; then
-       /usr/sbin/userdel pdns
+       %userremove pdns
+       %groupremove djbdns
 fi
 
 %files
This page took 0.200621 seconds and 4 git commands to generate.