| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
DPKG_EXPORT_BUILDFLAGS := 1 |
| 4 |
DEB_BUILD_MAINT_OPTIONS := hardening=+all |
| 5 |
DEB_ADAFLAGS_MAINT_APPEND := -gnatfno -gnatwa -gnatVa |
| 6 |
DEB_LDFLAGS_MAINT_APPEND := \ |
| 7 |
-Wl,--no-allow-shlib-undefined \ |
| 8 |
-Wl,--no-copy-dt-needed-entries \ |
| 9 |
-Wl,--no-undefined |
| 10 |
include /usr/share/dpkg/buildflags.mk |
| 11 |
include /usr/share/dpkg/buildopts.mk |
| 12 |
include $(wildcard /usr/share/ada/packaging.mk) |
| 13 |
# wildcard in case only Build-Depends-Indep are installed. |
| 14 |
|
| 15 |
%: |
| 16 |
dh $@ |
| 17 |
|
| 18 |
###################################################################### |
| 19 |
# clean target is OK. |
| 20 |
|
| 21 |
project := -Plib/gnat/aunit.gpr |
| 22 |
static := -XAUNIT_LIBRARY_KIND=static |
| 23 |
shared := -XAUNIT_LIBRARY_KIND=relocatable \ |
| 24 |
-XAUNIT_LIBRARY_VERSION=libaunit.so.$(aunit_SO_VERSION) |
| 25 |
|
| 26 |
override_dh_auto_build-arch: |
| 27 |
gprbuild $(project) $(static) $(GPRBUILDFLAGS) |
| 28 |
gprbuild $(project) $(shared) $(GPRBUILDFLAGS) |
| 29 |
|
| 30 |
override_dh_auto_install-arch: |
| 31 |
gprinstall $(project) $(static) $(static_GPRINSTALLFLAGS) |
| 32 |
gprinstall $(project) $(shared) $(call shared_GPRINSTALLFLAGS,aunit) |
| 33 |
|
| 34 |
###################################################################### |
| 35 |
INSTALLED_EXAMPLES := \ |
| 36 |
debian/libaunit-doc/usr/share/doc/libaunit-dev/examples/*/ |
| 37 |
|
| 38 |
.PHONY: execute_after_dh_installexamples-indep |
| 39 |
execute_after_dh_installexamples-indep: |
| 40 |
# Replace duplicate files with symlinks. |
| 41 |
rdfind -makeresultsfile false -makesymlinks true $(INSTALLED_EXAMPLES) |
| 42 |
# Make these symlinks relative. |
| 43 |
symlinks -r -s -c $(INSTALLED_EXAMPLES) |
| 44 |
|
| 45 |
override_dh_auto_build-indep: |
| 46 |
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) |
| 47 |
# Avoid dh_auto_build (make -jN would launch several sphinx). |
| 48 |
$(MAKE) -Cdoc aunit_cb.html aunit_cb.pdf aunit_cb.txt \ |
| 49 |
$(DEB_BUILD_OPTION_PARALLEL:%=SPHINXOPTS=-j%) |
| 50 |
endif |
| 51 |
|
| 52 |
override_dh_auto_install-indep: |