the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: dlocate
Version: 0.5
Revision: 5
License: GPL
Maintainer: Ben Hines
Description: Fast alternative to dpkg -L and dpkg -S
Depends: grep-dctrl, cron-service, findutils
Source: mirror:debian:pool/main/d/%n/%n_%v-0.1.tar.gz
SourceDirectory: %n-%v
Source-MD5: e4cb6ee9c917e3b5f385fce8ed56a80f
Patch: %n.patch
PatchScript: <<
perl -pi.bak -e 's|/usr/lib|%p/lib|' dlocate update-dlocatedb update-dpkg-list
perl -pi.bak -e 's|/var|%p/var|' dlocate update-dlocatedb update-dpkg-list debian/cron.daily
perl -pi.bak -e 's|/usr/bin|%p/bin|' dlocate
perl -pi.bak -e 's|/usr/sbin|%p/sbin|' dlocate debian/cron.daily
<<
CompileScript: echo None
InstallScript:<<
mkdir -p %i/bin
mkdir -p %i/sbin
mkdir -p %i/share/man/man1
mkdir -p %i/share/man/man8
mkdir -p %i/etc/cron.daily
/usr/bin/install dlocate %i/bin
/usr/bin/install update-dlocatedb %i/sbin
/usr/bin/install update-dpkg-list %i/sbin
/usr/bin/install debian/dlocate.1 %i/share/man/man1
/usr/bin/install debian/update-dlocatedb.8 %i/share/man/man8
/usr/bin/install debian/cron.daily %i/etc/cron.daily/%n
<<
DocFiles: debian/README.Debian debian/changelog debian/copyright
DescDetail: <<
Uses GNU locate to greatly speed up finding out which package a file
belongs to (i.e. a very fast dpkg -S). many other uses, including
options to view all files in a package, calculate disk space used, view
and check md5sums, list man pages, etc.
<<
DescPort: <<
dmacks:
Remember to quote dlocate args when passing to locate.
Pass "--" (getopt end-of-flags flag) when passing dlocate
args to locate in case in case the args begin with -
Gracefully handle multiple slashes in -S mode
<<
DescUsage: <<
Adds a cron.daily script, used to update the locate daily as part of your
cron tasks.
<<
Homepage: http://packages.debian.org/unstable/utils/dlocate.html
PostInstScript: <<
case "$1" in
configure)
# generate initial dlocate database
mkdir -p %p/var/lib/dlocate
%p/sbin/update-dlocatedb >/dev/null 2>&1 &
# generate initial 'dpkg -l' file
LINES=40 COLUMNS=200 %p/bin/dpkg -l "*" | sed -e '1,5d' -e 's/ */ /g' >%p/var/lib/dlocate/dpkg-list
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
;;
esac
<<
PostRmScript: <<
if [ "$1" = "purge" ]; then
rm -f %p/var/lib/dlocate/*
rmdir %p/var/lib/dlocate/
fi
<<
diff -Nurd -x'*~' dlocate-0.5.orig/dlocate dlocate-0.5/dlocate
--- dlocate-0.5.orig/dlocate 2002-03-10 07:36:31.000000000 -0500
+++ dlocate-0.5/dlocate 2006-05-19 13:25:55.000000000 -0400
@@ -87,7 +87,8 @@
fi
;;
"-S")
- $LOCATE -d $DLOCATEDB $PKG | grep ":.*$PKG.*"
+ FILES=`echo $PKG | sed 's|//*|/|g'`
+ $LOCATE -d $DLOCATEDB -- "$FILES" | grep ":.*$FILES.*"
;;
"-s")
if [ -e $DPKG_INFO/$PKG.list ] ; then
@@ -150,7 +151,7 @@
fi
;;
*)
- $LOCATE -d $DLOCATEDB "$PKG"
+ $LOCATE -d $DLOCATEDB -- "$PKG"
;;
esac
Package: dlocate
Version: 0.5
Revision: 5
License: GPL
Maintainer: Ben Hines
Description: Fast alternative to dpkg -L and dpkg -S
Depends: grep-dctrl, cron-service, findutils
Source: mirror:debian:pool/main/d/%n/%n_%v-0.1.tar.gz
SourceDirectory: %n-%v
Source-MD5: e4cb6ee9c917e3b5f385fce8ed56a80f
Patch: %n.patch
PatchScript: <<
perl -pi.bak -e 's|/usr/lib|%p/lib|' dlocate update-dlocatedb update-dpkg-list
perl -pi.bak -e 's|/var|%p/var|' dlocate update-dlocatedb update-dpkg-list debian/cron.daily
perl -pi.bak -e 's|/usr/bin|%p/bin|' dlocate
perl -pi.bak -e 's|/usr/sbin|%p/sbin|' dlocate debian/cron.daily
<<
CompileScript: echo None
InstallScript:<<
mkdir -p %i/bin
mkdir -p %i/sbin
mkdir -p %i/share/man/man1
mkdir -p %i/share/man/man8
mkdir -p %i/etc/cron.daily
/usr/bin/install dlocate %i/bin
/usr/bin/install update-dlocatedb %i/sbin
/usr/bin/install update-dpkg-list %i/sbin
/usr/bin/install debian/dlocate.1 %i/share/man/man1
/usr/bin/install debian/update-dlocatedb.8 %i/share/man/man8
/usr/bin/install debian/cron.daily %i/etc/cron.daily/%n
<<
DocFiles: debian/README.Debian debian/changelog debian/copyright
DescDetail: <<
Uses GNU locate to greatly speed up finding out which package a file
belongs to (i.e. a very fast dpkg -S). many other uses, including
options to view all files in a package, calculate disk space used, view
and check md5sums, list man pages, etc.
<<
DescPort: <<
dmacks:
Remember to quote dlocate args when passing to locate.
Pass "--" (getopt end-of-flags flag) when passing dlocate
args to locate in case in case the args begin with -
Gracefully handle multiple slashes in -S mode
<<
DescUsage: <<
Adds a cron.daily script, used to update the locate daily as part of your
cron tasks.
<<
Homepage: http://packages.debian.org/unstable/utils/dlocate.html
PostInstScript: <<
case "$1" in
configure)
# generate initial dlocate database
mkdir -p %p/var/lib/dlocate
%p/sbin/update-dlocatedb >/dev/null 2>&1 &
# generate initial 'dpkg -l' file
LINES=40 COLUMNS=200 %p/bin/dpkg -l "*" | sed -e '1,5d' -e 's/ */ /g' >%p/var/lib/dlocate/dpkg-list
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
;;
esac
<<
PostRmScript: <<
if [ "$1" = "purge" ]; then
rm -f %p/var/lib/dlocate/*
rmdir %p/var/lib/dlocate/
fi
<<
diff -Nurd -x'*~' dlocate-0.5.orig/dlocate dlocate-0.5/dlocate
--- dlocate-0.5.orig/dlocate 2002-03-10 07:36:31.000000000 -0500
+++ dlocate-0.5/dlocate 2006-05-19 13:25:55.000000000 -0400
@@ -87,7 +87,8 @@
fi
;;
"-S")
- $LOCATE -d $DLOCATEDB $PKG | grep ":.*$PKG.*"
+ FILES=`echo $PKG | sed 's|//*|/|g'`
+ $LOCATE -d $DLOCATEDB -- "$FILES" | grep ":.*$FILES.*"
;;
"-s")
if [ -e $DPKG_INFO/$PKG.list ] ; then
@@ -150,7 +151,7 @@
fi
;;
*)
- $LOCATE -d $DLOCATEDB "$PKG"
+ $LOCATE -d $DLOCATEDB -- "$PKG"
;;
esac