ca694bd7079ca634e0a407c6cd8efe4226b3f4a4
[ginac.git] / debian / rules
1 #!/usr/bin/make -f
2
3 package=ginac
4
5 version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
6 version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*')
7
8 build:
9         dh_testdir
10         ./configure --prefix=/usr
11         $(MAKE) CXXFLAGS="-O2"
12         touch build
13
14 clean:
15         dh_testdir
16         dh_clean
17         -rm -f build
18         -$(MAKE) distclean
19         -rm -f `find . -name "*~"`
20         -rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core
21         -rm -f debian/*substvars
22
23 binary-indep: build
24         dh_testdir
25         dh_testroot
26
27 binary-arch: build
28         dh_testdir
29         dh_testroot
30         dh_installdirs
31         # When is Automake going to honor FHS?
32         $(MAKE) install prefix=`pwd`/debian/tmp/usr infodir=`pwd`/debian/tmp/usr/share/info mandir=`pwd`/debian/tmp/usr/share/man
33         # Automake generated Makefile.in do install-info, which is bad for us:
34         -rm -f `pwd`/debian/tmp/usr/share/info/dir*
35         dh_installdocs ChangeLog NEWS README
36         dh_installchangelogs
37         dh_installmenu
38         dh_movefiles
39         dh_strip
40         dh_compress
41         dh_fixperms
42         dh_makeshlibs
43         dh_installdeb
44         dh_shlibdeps
45         dh_gencontrol
46         dh_md5sums
47         dh_builddeb
48
49 binary: binary-indep binary-arch
50
51 .PHONY: binary binary-arch binary-indep clean