3 # $Id: rules,v 1.2 2001-06-13 20:47:40 adam Exp $
6 # Sample debian/rules file - for GNU Hello (1.3).
7 # Copyright 1994,1995 by Ian Jackson.
8 # I hereby give you perpetual unlimited permission to copy,
9 # modify and relicense this file, provided that you do not remove
10 # my name from the file itself. (I assert my moral right of
11 # paternity under the Copyright, Designs and Patents Act 1988.)
12 # This file may have to be extensively modified
20 cd build; ../configure --prefix=/usr --enable-shared
21 cd build; $(MAKE) CFLAGS=-O2
22 cd build/doc; $(MAKE) CFLAGS=-O2
28 rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars
30 binary-indep: checkroot build
32 # There are no architecture-independent files to be uploaded
33 # generated by this package. If there were any they would be
36 binary-arch: checkroot build
39 install -d debian/tmp/DEBIAN\
40 -d debian/tmp/usr/share/doc/$(package)
41 install -m 755 debian/postinst debian/prerm debian/tmp/DEBIAN
42 install -m 644 debian/shlibs debian/tmp/DEBIAN
43 cd build; $(MAKE) prefix=`pwd`/../debian/tmp/usr install
44 if test -f doc/yaz.txt; then \
45 install -m 644 doc/*.html doc/*.ps doc/*.txt debian/tmp/usr/share/doc/$(package); \
47 install -m 644 build/doc/*.html build/doc/*.ps build/doc/*.txt debian/tmp/usr/share/doc/$(package); \
49 gzip debian/tmp/usr/share/doc/$(package)/*.ps
50 gzip debian/tmp/usr/share/doc/$(package)/*.txt
51 cp debian/copyright debian/tmp/usr/share/doc/$(package)/.
52 cp debian/changelog debian/tmp/usr/share/doc/$(package)/changelog.Debian
53 cp CHANGELOG debian/tmp/usr/share/doc/$(package)/changelog
54 strip --strip-debug debian/tmp/usr/lib/*.a
55 strip --strip-unneeded debian/tmp/usr/lib/lib*.so.$(soversion)
56 cp debian/shlibs debian/shlibs.local
57 dpkg-shlibdeps debian/tmp/usr/bin/yaz-client debian/tmp/usr/bin/yaz-ztest
59 chown -R root.root debian/tmp
60 chmod -R g-ws debian/tmp
61 dpkg --build debian/tmp ..
67 # Below here is fairly generic really
69 binary: binary-indep binary-arch
73 test root = "`whoami`"
75 .PHONY: binary binary-arch binary-indep clean checkroot