Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=2ff61490e1e64252714d5ab2a1dc764272fbc115

commit 2ff61490e1e64252714d5ab2a1dc764272fbc115
Author: voroskoi <[EMAIL PROTECTED]>
Date:   Tue Nov 6 14:35:26 2007 +0100

slocate-3.1-3-i686
added conflics=('mlocate')
added provides=('locate')
using locate group insted of slocate, updated .install accordingly
do not use locate with setgid which makes locate group useless
ok vmiklos@

diff --git a/source/base/slocate/FrugalBuild b/source/base/slocate/FrugalBuild
index fdc391f..ff72f5b 100644
--- a/source/base/slocate/FrugalBuild
+++ b/source/base/slocate/FrugalBuild
@@ -3,22 +3,29 @@

pkgname=slocate
pkgver=3.1
-pkgrel=2
+pkgrel=3
pkgdesc="Security Enhanced version of the GNU Locate"
url="http://www.geekreview.org/slocate";
depends=('util-linux' 'frugalware')
groups=('base')
archs=('i686' 'x86_64')
backup=('etc/updatedb.conf')
+conflicts=('mlocate')
+provides=('locate')
up2date="$pkgver"
source=(http://ftp.frugalware.org/pub/other/sources/slocate/$pkgname-$pkgver.tar.bz2
 \
slocate updatedb.conf fix-install.patch)
+sha1sums=('730cd64b2b0c22576cd368666f54686a3d5b339b' \
+          'e3c1276602b0fc0b4e726a7684e5ba2c5c96cdc7' \
+          'c6b00373d0391537743f25b89b21a01042a0b6cd' \
+          '6ad38f272f0b459397889e1fbcaf9ecba2259698')

build() {
Fcd
Fpatchall
# Fixup for cflags
Fsed "CFLAGS=-Wall -Wshadow" "CFLAGS=${CFLAGS}" src/Makefile
+       Fsed '#define DB_GROUP "slocate"' '#define DB_GROUP "locate"' 
src/slocate.h
make || return 1
Fmkdir /usr/bin
Fmakeinstall
@@ -36,8 +43,4 @@ build() {
chgrp 21 $Fdestdir/var/lib/slocate || Fdie
}

-sha1sums=('730cd64b2b0c22576cd368666f54686a3d5b339b'\
-          'e3c1276602b0fc0b4e726a7684e5ba2c5c96cdc7'\
-          'c6b00373d0391537743f25b89b21a01042a0b6cd'\
-          'dffd2053a870972fdd4b902a2b23f4271abb24a5')
# optimization OK
diff --git a/source/base/slocate/fix-install.patch 
b/source/base/slocate/fix-install.patch
index f0d2eb8..8352291 100644
--- a/source/base/slocate/fix-install.patch
+++ b/source/base/slocate/fix-install.patch
@@ -21,7 +21,7 @@ diff -Naur slocate-3.1.orig/src/Makefile 
slocate-3.1/src/Makefile
install:
-       -groupadd slocate
-       install -m 2755 -o root -g slocate slocate /usr/local/bin/
-+      install -m 2755 -o root -g slocate slocate $(DESTDIR)/usr/bin/
++      install -m 755 -o root -g 21 slocate $(DESTDIR)/usr/bin/

uninstall:
rm -f /usr/local/bin/slocate
diff --git a/source/base/slocate/slocate.install 
b/source/base/slocate/slocate.install
index e8ab259..fda5bb8 100644
--- a/source/base/slocate/slocate.install
+++ b/source/base/slocate/slocate.install
@@ -1,19 +1,16 @@
# arg 1:  the new package version
post_install() {
-  sbin/ldconfig -r . &>/dev/null
-  usr/sbin/groupadd -g 21 slocate &>/dev/null
+       /sbin/ldconfig -r . &>/dev/null
+       if [ `/usr/bin/grep slocate /etc/group |wc -l` != 0 ]; then
+               /usr/sbin/groupdel slocate
+       fi
+       if [ `/usr/bin/grep locate /etc/group |wc -l` == 0 ]; then
+               /usr/sbin/groupadd -g 21 locate
+       fi
}

-# arg 1:  the new package version
-# arg 2:  the old package version
post_upgrade() {
-  echo "WARNING slocate: You need to run updatedb because 2.x and 3.x db not 
compatible!"
-  /bin/true
-}
-
-# arg 1:  the old package version
-pre_remove() {
-  usr/sbin/groupdel slocate &>/dev/null
+       post_install
}

op=$1
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to