File: rules

package info (click to toggle)
pcc 1.2.0~DEVEL+20200630-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 5,236 kB
  • sloc: ansic: 105,570; yacc: 4,350; sh: 3,039; lex: 1,713; makefile: 720
file content (44 lines) | stat: -rwxr-xr-x 1,275 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
#!/usr/bin/make -f
#export DH_VERBOSE = 1


export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND =


%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		--libdir=\$${prefix}/lib/ \
		--with-libdir=/usr/lib/ \
		--libexecdir=\$${prefix}/bin/ \
		--with-incdir=/usr/include/ \
		--enable-native=no \
		--disable-stripping \
		--enable-multiarch=${DEB_TARGET_MULTIARCH} \
		target_alias=${DEB_TARGET_MULTIARCH} \
		BINPREFIX=${DEB_TARGET_GNU_TYPE}-

override_dh_install:
	dh_install
	rm -r debian/pcc/usr/lib
	mv debian/pcc/usr/bin/${DEB_TARGET_GNU_TYPE}-cpp debian/pcc/usr/bin/${DEB_TARGET_GNU_TYPE}-pcc-cpp
	mv debian/pcc/usr/share/man/man1/${DEB_TARGET_GNU_TYPE}-ccom.1 debian/pcc/usr/share/man/man1/ccom.1
	mv debian/pcc/usr/share/man/man1/${DEB_TARGET_GNU_TYPE}-cpp.1 debian/pcc/usr/share/man/man1/pcc-cpp.1

override_dh_installman:
	dh_installman
	ln -s ccom.1.gz debian/pcc/usr/share/man/man1/cxxcom.1.gz

override_dh_link:
	dh_link
	for name in ccom cxxcom pcc-cpp p++ pcc pcpp; do \
		ln -s ${DEB_TARGET_GNU_TYPE}-$$name debian/pcc/usr/bin/$$name; \
	done
	for name in p++ pcpp; do \
		ln -sf ${DEB_TARGET_GNU_TYPE}-pcc debian/pcc/usr/bin/${DEB_TARGET_GNU_TYPE}-$$name; \
	done