File: rules

package info (click to toggle)
saml 970418-9
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,188 kB
  • ctags: 1,703
  • sloc: ansic: 17,186; sh: 2,573; yacc: 497; perl: 264; makefile: 242; python: 242
file content (103 lines) | stat: -rwxr-xr-x 2,906 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This is the debhelper compatibility version to use.
export DH_COMPAT=3

package=saml

SLMAJ=0
SLMIN=970418

curdir=$(shell pwd)

ARCH=$(shell dpkg --print-architecture)
ifeq (,$(findstring $(ARCH),'alpha hurd-i386 i386 m68k sparc'))
noasm=-DNO_ASM
endif

ifeq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
OPTIM=-O0 -fomit-frame-pointer
DEBUG=
else
OPTIM=-O0 -g
DEBUG=-g
endif


build:
	dh_testdir
	cd lib && $(MAKE) noasm=$(noasm) OPTIM="$(OPTIM)" DEBUG="$(DEBUG)" && \
		  $(MAKE) noasm=$(noasm) OPTIM="$(OPTIM)" DEBUG="$(DEBUG)" \
			  SLMAJ=$(SLMAJ) SLMIN=$(SLMIN) shared
	cd induce && $(MAKE) noasm=$(noasm) OPTIM="$(OPTIM)" DEBUG="$(DEBUG)"
	cd factorint && $(MAKE) noasm=$(noasm) OPTIM="$(OPTIM)" DEBUG="$(DEBUG)"
	cd doc && texi2html *.texi
	cd python && $(MAKE) noasm=$(noasm) OPTIM="$(OPTIM)" DEBUG="$(DEBUG)"
	cd samuel && $(MAKE) noasm=$(noasm) OPTIM="$(OPTIM)" DEBUG="$(DEBUG)"
	touch build

clean:
	dh_testdir
	-make clean
	-rm -f induce/induce factorint/factorint samuel/samuel
	-rm -f lib/libs*
	-rm -f doc/*.html
	-rm -f build
	-rm -f python/saml1module.so
	dh_clean

binary-indep: build

binary-arch: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs usr/bin usr/include/saml usr/lib/$(package) \
		       usr/lib/python2.1/site-packages 
#			usr/share/lintian/overrides
	install -m644 lib/saml-util.h	\
		      lib/mnode.h	\
		      lib/saml-mtypes.h	\
		      lib/saml.h	\
		      lib/saml-errno.h	debian/saml/usr/include/saml
	install -m755 induce/induce debian/saml/usr/bin
#	install -m644 induce/Inducefile.m4 debian/saml/usr/lib/$(package)
	install -m755 factorint/factorint debian/saml/usr/bin
	install -m755 samuel/samuel debian/saml/usr/bin
	install -m644 python/saml1module.so debian/saml/usr/lib/python2.1/site-packages/.
	install -m644 lib/libsaml.a  debian/saml/usr/lib/
	install -m644 lib/libsaml.so.$(SLMAJ).$(SLMIN)  debian/saml/usr/lib
#	install -m644 debian/lintian debian/saml/usr/share/lintian/overrides/saml
	cd debian/saml/usr/lib && ln -s libsaml.so.$(SLMAJ).$(SLMIN) libsaml.so.$(SLMAJ)
	cd debian/saml/usr/lib && ln -s libsaml.so.$(SLMAJ) libsaml.so

	dh_installdocs README doc/*.html doc/*.texi
	dh_installexamples python/colourings.py	\
			   python/cyclo1.py	\
			   python/cyclotomic.py	\
			   python/fact.py	\
			   python/fission.form	\
			   python/fission.py	\
			   python/harmonic.py	\
			   python/harmonic.sh
	chmod +x debian/saml/usr/share/doc/$(package)/examples/*.py
	dh_installmanpages
	dh_installchangelogs
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs -V'saml >= 970418'
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean