File: rules

package info (click to toggle)
apg 2.2.3.dfsg.1-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 696 kB
  • ctags: 731
  • sloc: ansic: 4,867; php: 744; sh: 186; makefile: 140; perl: 9
file content (27 lines) | stat: -rwxr-xr-x 923 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
#!/usr/bin/make -f

DEB_HOST_GNU_TYPE	?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE	?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
CC="$(DEB_HOST_GNU_TYPE)-gcc"
else
CC=gcc
endif

%:
	dh $@

override_dh_auto_build:
	make standalone CC=$(CC)

override_dh_auto_install:
	make install INSTALL_PREFIX=$(CURDIR)/debian/apg/usr
	mv $(CURDIR)/debian/apg/usr/bin/apg $(CURDIR)/debian/apg/usr/lib/apg/apg
	tar --create --file - --directory $(CURDIR)/php/apgonline/ . \
	  --clamp-mtime --mtime="$(SOURCE_DATE_EPOCH)" \
	  --mode=u=rwX,go=rX --sort=name | gzip --no-name > php.tar.gz
	install -D --mode=0644 php.tar.gz $(CURDIR)/debian/apg/usr/share/doc/apg/php.tar.gz
	rm php.tar.gz
	install -D --mode=0755 $(CURDIR)/debian/apg.wrapper $(CURDIR)/debian/apg/usr/bin/apg
	install -D --mode=0644 $(CURDIR)/debian/apg.conf $(CURDIR)/debian/apg/etc/apg.conf