File: rules

package info (click to toggle)
ahven 1.2-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 396 kB
  • ctags: 16
  • sloc: ada: 2,752; makefile: 118; sh: 32
file content (78 lines) | stat: -rwxr-xr-x 1,720 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
#!/usr/bin/make -f

include /usr/share/dpatch/dpatch.make

CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

clean: unpatch
	dh_testdir
	dh_testroot
	rm -f build-stamp

	# required for git
	mkdir -p lib test_objects objects doc/api
	$(MAKE) clean
	rm -f lib/libahven.so.*

	dh_clean

build: patch-stamp build-stamp
build-stamp:
	dh_testdir

	CFLAGS="$(CFLAGS)" $(MAKE)
	# build docs as well
	$(MAKE) docs

	touch build-stamp

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	$(MAKE) PREFIX=$(CURDIR)/debian/tmp/usr install

	mv debian/tmp/usr/lib/ahven/libahven.so.* debian/tmp/usr/lib
	ln -sf libahven.so.`basename debian/tmp/usr/lib/libahven.so.*.* | sed -e 's/libahven.so.//'` debian/tmp/usr/lib/libahven.so
	ln -sf libahven.so.`basename debian/tmp/usr/lib/libahven.so.*.* | sed -e 's/libahven.so.//'` debian/tmp/usr/lib/libahven.so.`basename debian/tmp/usr/lib/libahven.so.*.* | sed -e 's/libahven.so.//' -e 's/\..*//'`

	mkdir -p debian/tmp/usr/share/ada/adainclude
	mv debian/tmp/usr/include/ahven debian/tmp/usr/share/ada/adainclude

	mkdir -p debian/tmp/usr/lib/ada/adalib
	mv debian/tmp/usr/lib/ahven debian/tmp/usr/lib/ada/adalib

	mv debian/tmp/usr/lib/gnat/* debian/tmp/usr/share/ada/adainclude
	rmdir debian/tmp/usr/lib/gnat

binary: binary-arch

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_installexamples
	dh_install --sourcedir=debian/tmp
	dh_lintian
	dh_strip --dbg-package=ahven-dbg
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-indep:

.PHONY: clean build install binary binary-arch binary-indep