File: rules

package info (click to toggle)
cln 1.3.1-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 11,056 kB
  • ctags: 16,803
  • sloc: cpp: 81,043; sh: 10,611; ansic: 3,281; makefile: 1,302
file content (72 lines) | stat: -rwxr-xr-x 2,595 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
#!/usr/bin/make -f

package=cln

version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*')

build:
	dh_testdir
	./configure --prefix=/usr `dpkg-architecture -qDEB_HOST_GNU_TYPE`
	# * ARM: CLN's assembler support is not working properly (it was only
	#   'theoretically' ported by copying from code that had once worked in
	#   CLISP under BSD). Same for armel.
	# * HPPA: Assembler support is not working properly.  Somebody needs to
	#   investigate but currently I don't have the inspiration for fixing
	#   things on exotic architectures.
	# * SPARC: With some versions of GCC, there are apparently problems in
	#   passing return values in %g1.
	case `dpkg-architecture -qDEB_HOST_ARCH` in \
	  arm|armel|hppa|sparc) \
	    ${MAKE} CPPFLAGS="-DNO_ASM" CXXFLAGS="-O2";; \
	  *) \
	    ${MAKE} CXXFLAGS="-O2";; \
	esac
	(cd doc; ${MAKE} cln.html)
	touch build

clean:
	dh_testdir
	dh_clean
	-rm -f build
	[ ! -f Makefile ] || ${MAKE} distclean
	-rm -f `find . -name "*~"`
	-rm -rf debian/tmp `find debian/* -type d ! -name CVS` debian/files* core
	-rm -rf debian/.libs debian/*.o
	-rm -f debian/*substvars

binary-indep: build
	dh_testdir
	dh_testroot
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch: build
	dh_testdir
	dh_testroot
	dh_installdirs
	# Let's see what the buildd logs say...
	-${MAKE} check
	${MAKE} install prefix=${CURDIR}/debian/tmp/usr bindir=${CURDIR}/debian/pi/usr/bin mandir=${CURDIR}/debian/pi/usr/share/man datadir=${CURDIR}/debian/libcln-dev/usr/share
	${MAKE} install-html prefix=${CURDIR}/debian/libcln-dev/usr htmldir=${CURDIR}/debian/libcln-dev/usr/share/doc/libcln-dev/html
	# This installs into libdir, but we must not set libdir because it affects the .la file:
	mv ${CURDIR}/debian/tmp/usr/lib/pkgconfig/* ${CURDIR}/debian/libcln-dev/usr/lib/pkgconfig/
	dh_installdocs ChangeLog NEWS README TODO
	dh_installexamples -plibcln-dev ${CURDIR}/examples/contfrac.cc ${CURDIR}/examples/e.cc ${CURDIR}/examples/fibonacci.cc ${CURDIR}/examples/legendre.cc ${CURDIR}/examples/lucaslehmer.cc ${CURDIR}/examples/nextprime.cc ${CURDIR}/examples/perfnum.cc
	/usr/bin/install -m 644 debian/libcln-dev.doc-base ${CURDIR}/debian/libcln-dev/usr/share/doc-base/libcln-dev
	dh_installchangelogs
	dh_install --sourcedir=debian/tmp
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean