2 # Made with the aid of debmake, by Christoph Lameter,
3 # based on the sample debian/rules file for GNU hello by Ian Jackson.
7 version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
8 version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*')
12 ./configure --prefix=/usr
16 # First build the shared library
19 $(MAKE) -f ../Makefile VPATH=".." srcdir=".." \
20 CFLAGS="-O2 -fPIC -pipe" ; \
21 gcc -shared -Wl,-soname,$(package).so.$(version_major) -o $(package).so.$(version) `ls *.o`
23 # Build the static library (it does not need Position Independent Code,
24 # which reserves one register; thus, without -fPIC we get more efficient
28 $(MAKE) -f ../Makefile VPATH=".." srcdir=".." \
29 CFLAGS="-O2 -pipe" LDFLAGS="-s" progs
37 -rm -f `find . -name "*~"`
38 -rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core
39 -rm -f debian/*substvars
43 # There are no architecture-independent files to be uploaded
44 # generated by this package. If there were any they would be
49 -rm -rf debian/tmp `find debian/* -type d`
51 cd debian/tmp && install -d `cat ../dirs`
52 install -m644 static/$(package).a debian/tmp/usr/lib/
53 install -m644 static/gdbm.h dbm.h ndbm.h debian/tmp/usr/include/
54 install -m644 gdbm.3 debian/tmp/usr/share/man/man3/gdbm.3gdbm
56 install -m644 shared/$(package).so.$(version) debian/tmp/usr/lib
58 $(MAKE) install prefix=`pwd`/debian/tmp/usr
59 debstd -m ChangeLog NEWS README
60 dpkg-gencontrol -pginac1-dev
61 chown -R root.root debian/tmp
62 chmod -R go=rX debian/tmp
63 dpkg --build debian/tmp ..
65 binary: binary-indep binary-arch
67 .PHONY: binary binary-arch binary-indep clean