* postinst: corrected permission for /var/lib/locate in postinst again.
[findutils.git] / debian / rules
blob26c9c90a70b36e7e5fa584e146fb3a0e738b3ff3
1 #!/usr/bin/make -f
2 # Sample debian.rules file - for GNU Hello (1.3).
3 # Copyright 1994,1995 by Ian Jackson.
4 # I hereby give you perpetual unlimited permission to copy,
5 # modify and relicense this file, provided that you do not remove
6 # my name from the file itself. (I assert my moral right of
7 # paternity under the Copyright, Designs and Patents Act 1988.)
8 # This file may have to be extensively modified
9 # Copyright 1996 by Kevin Dalley
13 CC = gcc
14 CFLAGS = -O2
15 LDFLAGS = -s
17 package = findutils
19 build:
20 $(checkdir)
21 ./configure --prefix=/usr
22 $(MAKE) localstatedir='$(prefix)/var/lib/locate' \
23 libexecdir=/usr/lib/locate \
24 CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
25 cd doc ; makeinfo find.texi
26 touch build
28 clean:
29 $(checkdir)
30 -rm -f build
31 -$(MAKE) -i distclean || $(MAKE) -f Makefile.in distclean
32 -rm -rf *~ debian/tmp debian/*~ debian/files*
34 binary-indep: checkroot build
35 $(checkdir)
36 # There are no architecture-independent files to be uploaded
37 # generated by this package. If there were any they would be
38 # made here.
40 binary-arch: checkroot build
41 $(checkdir)
42 -rm -rf debian/tmp
43 install -d debian/tmp debian/tmp/DEBIAN
44 install -d debian/tmp/usr/doc/$(package)
45 install -d debian/tmp/usr/bin
46 install -d debian/tmp/usr/lib
47 install -d debian/tmp/usr/lib/locate
48 install -d debian/tmp/etc
49 install -d debian/tmp/etc/cron.daily
50 install -d debian/tmp/var
51 install -d debian/tmp/var/lib
52 install -d debian/tmp/var/lib/locate
53 install debian/{postinst,postrm,preinst,conffiles} debian/tmp/DEBIAN/.
54 install debian/cron.find debian/tmp/etc/cron.daily/find
55 install debian/updatedb.conf debian/tmp/etc/updatedb.conf
56 $(MAKE) prefix=`pwd`/debian/tmp/usr \
57 localstatedir=`pwd`/debian/tmp/var/lib/locate \
58 libexecdir=`pwd`/debian/tmp/usr/lib/locate \
59 CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
60 INSTALL_PROGRAM='install -c' \
61 install
62 gzip -9v debian/tmp/usr/info/*
63 gzip -9v debian/tmp/usr/man/*/*
64 cp debian/copyright debian/tmp/usr/doc/$(package)/.
65 cp debian/changelog debian/tmp/usr/doc/$(package)/changelog.Debian
66 cp ChangeLog debian/tmp/usr/doc/$(package)/changelog
67 gzip -9v debian/tmp/usr/doc/$(package)/changelog{,.Debian}
68 dpkg-shlibdeps find/find
69 dpkg-gencontrol
70 dpkg --build debian/tmp ..
72 define checkdir
73 test -f find/find.c -a -f debian/rules
74 endef
76 # Below here is fairly generic really
78 binary: binary-indep binary-arch
80 source diff:
81 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
83 checkroot:
84 $(checkdir)
85 test root = "`whoami`"
87 .PHONY: binary binary-arch binary-indep clean checkroot