]> www.ginac.de Git - ginac.git/blob - debian/rules
- fixed typos, fixed typos, fixed typos...
[ginac.git] / debian / rules
1 #!/usr/bin/make -f
2 # Made with the aid of debmake, by Christoph Lameter,
3 # based on the sample debian/rules file for GNU hello by Ian Jackson.
4
5 package=ginac
6
7 version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
8 version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*')
9
10 build:
11         dh_testdir
12         ./configure --prefix=/usr
13
14         -mkdir shared static
15         #
16         # First build the shared library
17         #
18         cd shared ; \
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`
22         #
23         # Build the static library (it does not need Position Independent Code,
24         # which reserves one register; thus, without -fPIC we get more efficient
25         # code).
26         #
27         cd static ; \
28              $(MAKE) -f ../Makefile VPATH=".." srcdir=".." \
29                   CFLAGS="-O2 -pipe" LDFLAGS="-s" progs
30         touch build
31
32 clean:
33         dh_testdir
34         dh_clean
35         -rm -f build
36         -$(MAKE) distclean
37         -rm -f `find . -name "*~"`
38         -rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core
39         -rm -f debian/*substvars
40
41 binary-indep: build
42         dh_testdir
43 # There are no architecture-independent files to be uploaded
44 # generated by this package.  If there were any they would be
45 # made here.
46
47 binary-arch: build
48         dh_testdir
49         -rm -rf debian/tmp `find debian/* -type d`
50         install -d debian/tmp
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
55
56         install -m644 shared/$(package).so.$(version) debian/tmp/usr/lib
57
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 ..
64
65 binary: binary-indep binary-arch
66
67 .PHONY: binary binary-arch binary-indep clean