*** empty log message ***
[findutils.git] / debian / rules
blobf08dc176ed2d280b213f7864a01bda98915b0668
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 -m 0644 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/man[15]/*
64 install -m 0444 debian/copyright debian/tmp/usr/doc/$(package)/.
65 install -m 0444 debian/changelog \
66 debian/tmp/usr/doc/$(package)/changelog.Debian
67 install -m 0444 ChangeLog debian/tmp/usr/doc/$(package)/changelog
68 install -m 0444 debian/README.debian \
69 debian/tmp/usr/doc/$(package)
70 gzip -9v debian/tmp/usr/doc/$(package)/changelog{,.Debian}
71 dpkg-shlibdeps debian/tmp/usr/bin/{find,locate,xargs}
72 dpkg-gencontrol
73 dpkg --build debian/tmp ..
75 define checkdir
76 test -f find/find.c -a -f debian/rules
77 endef
79 # Below here is fairly generic really
81 binary: binary-indep binary-arch
83 source diff:
84 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
86 checkroot:
87 $(checkdir)
88 test root = "`whoami`"
90 .PHONY: binary binary-arch binary-indep clean checkroot