| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) |
| 4 |
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) |
| 5 |
|
| 6 |
CFLAGS_OPT = -O2 -fno-strict-aliasing -fno-strict-overflow |
| 7 |
|
| 8 |
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
| 9 |
CFLAGS_OPT = -O0 |
| 10 |
endif |
| 11 |
|
| 12 |
# Avoid embedding build paths for reproducible builds |
| 13 |
CFLAGS = -Wall -g $(CFLAGS_OPT) -ffile-prefix-map=$(CURDIR)=. |
| 14 |
|
| 15 |
%: |
| 16 |
dh $@ |
| 17 |
|
| 18 |
override_dh_auto_configure: |
| 19 |
$(MAKE) X-Configure name=$(DEB_HOST_ARCH_OS) |
| 20 |
sed "s%CFLAGS = .*%CFLAGS = $(CFLAGS)%" Makedefs > Makedefs.tmp |
| 21 |
echo "ASFLAGS = -Wa,--noexecstack" >> Makedefs.tmp |
| 22 |
mv Makedefs.tmp Makedefs |
| 23 |
|
| 24 |
override_dh_auto_build: |
| 25 |
$(MAKE) Icont |
| 26 |
$(MAKE) Ilib |
| 27 |
|
| 28 |
override_dh_auto_test: |
| 29 |
$(MAKE) Samples-icont |
| 30 |
$(MAKE) Test-icont |
| 31 |
|
| 32 |
override_dh_auto_install: |
| 33 |
install -d debian/icont/usr/bin |
| 34 |
install -m 755 bin/icont debian/icont/usr/bin |
| 35 |
install -d debian/icont/usr/share/man/man1 |
| 36 |
install -m 644 man/man1/icon.1 debian/icont/usr/share/man/man1/icon.1 |
| 37 |
install -m 644 man/man1/icont.1 debian/icont/usr/share/man/man1/icont.1 |
| 38 |
install -d debian/iconx/usr/bin |
| 39 |
install -m 755 bin/iconx debian/iconx/usr/bin |
| 40 |
install -d debian/iconx/usr/share/man/man1 |
| 41 |
install -m 644 man/man1/icon.1 debian/iconx/usr/share/man/man1/iconx.1 |
| 42 |
install -d debian/icon-ipl/usr/lib/icon-ipl |
| 43 |
cp -r lib/* ipl/procs/*.icn ipl/gprocs/*.icn debian/icon-ipl/usr/lib/icon-ipl |
| 44 |
|
| 45 |
override_dh_auto_clean: |
| 46 |
$(MAKE) Pure |