File: rules

package info (click to toggle)
apq 3.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,824 kB
  • sloc: ada: 2,794; ansic: 2,053; sh: 987; makefile: 180
file content (68 lines) | stat: -rwxr-xr-x 1,645 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
#!/usr/bin/make -f

PN = apq
PV = 3.2.0
LIBDIR = debian/tmp/usr/lib/$(PN)-debug/relocatable
CPUS := $(shell getconf _NPROCESSORS_ONLN)

%:
	dh ${@}

override_dh_auto_clean:
	$(MAKE) distclean
	$(MAKE) -C manual clean

	# Restore original file mode
	chmod 755 samples/Makefile

	rm -f manual/*.out
	rm -f lib/*

override_dh_auto_configure:
	./configure --enable-debug --prefix=./debian/tmp/usr/ --processor=$(CPUS)

override_dh_auto_build:
	dh_auto_build
	$(MAKE) -C manual

override_dh_auto_install:
	dh_auto_install
	rm -f $(LIBDIR)/lib$(PN).so

	chmod 644 $(LIBDIR)/*
	chmod 644 debian/tmp/usr/lib/$(PN)-debug/static/lib$(PN).a

	ln -sf lib$(PN).so.`basename $(LIBDIR)/lib$(PN).so.*.* | sed -e 's/lib$(PN).so.//'` $(LIBDIR)/lib$(PN).so

	mv $(LIBDIR)/*.so* debian/tmp/usr/lib
	mv debian/tmp/usr/lib/$(PN)-debug/static/lib$(PN).a debian/tmp/usr/lib

	chrpath -d debian/tmp/usr/lib/lib$(PN).so.*.*

	mkdir -p debian/tmp/usr/share/ada/adainclude
	mv debian/tmp/usr/src/$(PN) debian/tmp/usr/share/ada/adainclude
	chmod -R 444 debian/tmp/usr/share/ada/adainclude/$(PN)/*

	cp debian/misc/*.gpr debian/tmp/usr/share/ada/adainclude

	mkdir -p debian/tmp/usr/lib/ada/adalib/$(PN)
	mv $(LIBDIR)/*.ali debian/tmp/usr/lib/ada/adalib/$(PN)
	chmod -R 444 debian/tmp/usr/lib/ada/adalib/$(PN)/*

	chmod 644 samples/Makefile

	rm -rf debian/tmp/usr/lib/apq
	rm -rf debian/tmp/usr/lib/apq-debug
	rm -rf debian/tmp/usr/lib/gnat

override_dh_install:
	dh_install --fail-missing

override_dh_install_changelogs:
	dh_install_changelogs NEWS

override_dh_compress:
	dh_compress -X.ads -X.adb -XMakefile

override_dh_strip:
	dh_strip --dbg-package=lib$(PN)$(PV)-dbg