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

aspseek.spec

index 2b25071b633c1ec01d5cccce282111155793c6f1..aa78e6a5eeed4ea5afe475cd1f5016a583cccefa 100644 (file)
@@ -19,6 +19,7 @@ BuildRequires:        apache(EAPI)-devel
 BuildRequires: openssl-devel >= 0.9.7d
 BuildRequires: mysql-devel
 BuildRequires: libstdc++-devel
+BuildRequires: rpmbuild(macros) >= 1.159
 BuildRequires: zlib-devel
 Requires(pre): /bin/id
 Requires(pre): /usr/sbin/useradd
@@ -28,6 +29,7 @@ Requires(post,preun): /sbin/chkconfig
 Requires(post,postun): /sbin/ldconfig
 Requires:      webserver
 Requires:      %{name}-db-%{version}
+Provides:      user(aspseek)
 Obsoletes:     swish++
 Obsoletes:     mnogosearch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -139,13 +141,13 @@ touch $RPM_BUILD_ROOT/var/log/aspseek.log
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-if [ -n "`id -u aspseek 2>/dev/null`" ]; then
-       if [ "`id -u aspseek`" != "50" ]; then
+if [ -n "`/bin/id -u aspseek 2>/dev/null`" ]; then
+       if [ "`/bin/id -u aspseek`" != 50 ]; then
                echo "Error: user aspseek doesn't have uid=50. Correct this before installing aspseek." 1>&2
                exit 1
        fi
 else
-       /usr/sbin/useradd -u 50 -r -d /srv/aspseek -s /bin/false -c "ASPSEEK User" -g root aspseek 1>&2
+       /usr/sbin/useradd -u 50 -d /srv/aspseek -s /bin/false -c "ASPSEEK User" -g root aspseek 1>&2
 fi
 
 %post
@@ -153,6 +155,13 @@ fi
 /sbin/chkconfig --add %{name}
 touch /var/log/aspseek.log
 chown aspseek:root /var/log/aspseek.log
+# create $HOME if possible, we are not allowed to remove it later
+if [ ! -d /srv/aspseek ]; then
+       if mkdir /srv/aspseek; then
+               chown aspseek:root /srv/aspseek
+               chmod 755 /srv/aspseek
+       fi
+fi
 
 %preun
 if [ "$1" = "0" ]; then
@@ -165,7 +174,7 @@ fi
 %postun
 /sbin/ldconfig
 if [ "$1" = "0" ]; then
-       /usr/sbin/userdel aspseek
+       %userremove aspseek
 fi
 
 %post db-mysql
This page took 0.071513 seconds and 4 git commands to generate.