#!/usr/bin/make -f $(foreach line,$(shell sed -n '\ s/^ gnat-\([0-9.]\+\),$$/ GNAT_VERSION:=\1 /p;\ s/^Package: lib[a-z-]\+\([0-9.]\+\)$$/ SOVERSION:=\1 /p;\ ' debian/control),$(eval $(line))) DPKG_EXPORT_BUILDFLAGS := 1 DEB_BUILD_MAINT_OPTIONS := hardening=+all DEB_ADAFLAGS_MAINT_APPEND := -gnatfno -gnatwa -gnatVa DEB_LDFLAGS_MAINT_APPEND := \ -Wl,--no-allow-shlib-undefined \ -Wl,--no-copy-dt-needed-entries \ -Wl,--no-undefined include /usr/share/dpkg/buildflags.mk include $(wildcard /usr/share/ada/debian_packaging-$(GNAT_VERSION).mk) # wildcard in case only Build-Depends-Indep are installed. %: dh $@ ###################################################################### # Ignore upstream Makefile/configure. .PHONY: $(addprefix override_dh_auto_,configure build-arch build-indep test install) # clean target is OK. override_dh_auto_build-arch: # static library dh_auto_build -- GPRBUILD='gprbuild $(BUILDER_OPTIONS)' # shared library SOVERSION=$(SOVERSION) dh_auto_build -- GPRBUILD='gprbuild $(BUILDER_OPTIONS)' ###################################################################### INSTALLED_EXAMPLES := \ debian/libaunit-doc/usr/share/doc/libaunit-doc/examples/*/ .PHONY: execute_after_dh_installexamples-indep execute_after_dh_installexamples-indep: # Replace duplicate files with symlinks. rdfind -makeresultsfile false -makesymlinks true $(INSTALLED_EXAMPLES) # Make these symlinks relative. symlinks -r -s -c $(INSTALLED_EXAMPLES) override_dh_auto_build-indep: ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) # Replace sphinx.sty copy with with packaged one. ln -fs /usr/share/sphinx/texinputs/sphinx.sty doc/share/sphinx.sty $(MAKE) -Cdoc aunit_cb.html aunit_cb.pdf aunit_cb.txt endif