use Pre-Depends: ${shlibs:Pre-Depends}
[findutils.git] / debian / rules
blob7c3a50fb929c78cdd0dbe08702d0b8a77d899f79
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,prerm,preinst} debian/tmp/DEBIAN/.
54 install -m 0644 debian/conffiles debian/tmp/DEBIAN/.
55 install debian/cron.find debian/tmp/etc/cron.daily/find
56 install -m 0644 debian/updatedb.conf debian/tmp/etc/updatedb.conf
57 $(MAKE) prefix=`pwd`/debian/tmp/usr \
58 localstatedir=`pwd`/debian/tmp/var/lib/locate \
59 libexecdir=`pwd`/debian/tmp/usr/lib/locate \
60 CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
61 INSTALL_PROGRAM='install -c' \
62 install
63 gzip -9v debian/tmp/usr/info/*
64 gzip -9v debian/tmp/usr/man/man[15]/*
65 install -m 0644 debian/copyright debian/tmp/usr/doc/$(package)/.
66 install -m 0644 debian/changelog \
67 debian/tmp/usr/doc/$(package)/changelog.Debian
68 gzip -9v debian/tmp/usr/doc/$(package)/changelog.Debian
69 for file in ChangeLog INSTALL NEWS README TODO; do \
70 install -m 0644 $$file \
71 debian/tmp/usr/doc/$(package);\
72 gzip -9v debian/tmp/usr/doc/$(package)/$$file;\
73 done
74 ln -s ChangeLog.gz debian/tmp/usr/doc/$(package)/changelog.gz
75 install -m 0644 debian/README.debian \
76 debian/tmp/usr/doc/$(package)
77 dpkg-shlibdeps -dPre-Depends debian/tmp/usr/bin/{find,locate,xargs}
78 dpkg-gencontrol
79 dpkg --build debian/tmp ..
81 define checkdir
82 test -f find/find.c -a -f debian/rules
83 endef
85 # Below here is fairly generic really
87 binary: binary-indep binary-arch
89 source diff:
90 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
92 checkroot:
93 $(checkdir)
94 test root = "`whoami`"
96 .PHONY: binary binary-arch binary-indep clean checkroot