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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
|
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
# Upstream documentation uses the @today macro which causes
# unreproducible builds.
include /usr/share/dpkg/pkg-info.mk
export FORCE_SOURCE_DATE = 1
# Reset all flags because dpkg's default buildflags propagate and
# become hardcoded in gnustep-make as GNUstep's build system, which is
# clearly undesirable (Bug#879085).
CFLAGS := -g -O2
CXXFLAGS := $(CFLAGS)
OBJCFLAGS :=
CPPFLAGS :=
LDFLAGS :=
# Instal in a temp dir
export DESTDIR=$(CURDIR)/debian/tmp
%:
dh $@ \
--builddirectory=build-gnustep-make
# Overriding the AC_PATH_PROG test for bash is necessary because it
# produces different results with merged /usr, leading to
# unreproducible builds. Similarly, GNUMAKE is deliberately set to
# make: as of make-dfsg/4.3-1 the make package provides a
# /usr/bin/gmake symlink, but as of December 2021 it is missing on
# GNU/Hurd and GNU/kFreeBSD since they provide only older versions of
# make-dfsg. Since gnustep-config is in the arch:all package it is
# set to "gmake" which then gives empty output when invoked on
# architectures lacking the symlink.
override_dh_auto_configure:
dh_auto_configure -- \
--with-layout=debian-multiarch \
SHELLPROG=/bin/bash GNUMAKE=make LATEX2HTML=latex2html
# For cross builds, restore the generic values of the build tools.
ifneq (,$(filter cross,$(DEB_BUILD_PROFILES)))
sed -i s'/[[:lower:]].\+-gcc/gcc/g' build-gnustep-make/config.make
sed -i s'/[[:lower:]].\+-g++/g++/g' build-gnustep-make/config.make
sed -i s'/[[:lower:]].\+-ar$$/ar/g' build-gnustep-make/config.make
sed -i s'/[[:lower:]].\+-ranlib/ranlib/g' build-gnustep-make/config.make
endif
# We don't have a gnustep-make installation to use, we create a temporary one
# in the subdirectory ./tmp-installation, then run make again passing
# GNUSTEP_MAKEFILES and PATH set to point to the new makefile installation
override_dh_auto_build-indep:
dh_auto_build
pod2man debian/dh_gnustep/dh_gnustep debian/dh_gnustep/dh_gnustep.1
# Support "nodoc" in DEB_BUILD_PROFILES and DEB_BUILD_OPTIONS. If
# present in DEB_BUILD_PROFILES, the gnustep-make-doc package is not
# built. If present only in DEB_BUILD_OPTIONS, the gnustep-make-doc
# package is built but it's empty (as per Policy ยง4.9.1). Note that
# the presence of "nodoc" in DEB_BUILD_PROFILES implies its presence
# in DEB_BUILD_OPTIONS (as of 13th of February 2023, documented in
# https://wiki.debian.org/BuildProfileSpec#Registered_profile_names).
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
mkdir $(CURDIR)/Documentation/build-gnustep-make-doc; \
cd $(CURDIR)/Documentation/build-gnustep-make-doc; \
../../configure --prefix="$(CURDIR)/Documentation/temp-installation" \
--with-layout=debian-multiarch; \
$(MAKE); \
$(MAKE) install
$(MAKE) -C Documentation \
messages=yes \
GNUSTEP_MAKEFILES=$(CURDIR)/Documentation/temp-installation/share/GNUstep/Makefiles \
PATH="$$PATH:$(CURDIR)/Documentation/temp-installation/bin"
endif
override_dh_auto_install-indep:
dh_auto_install -- DESTDIR=$(CURDIR)/debian/tmp
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
test -d Documentation/temp-installation && $(MAKE) -C Documentation install \
messages=yes \
GNUSTEP_MAKEFILES=$(CURDIR)/Documentation/temp-installation/share/GNUstep/Makefiles \
GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \
PATH="$$PATH:$(CURDIR)/Documentation/temp-installation/bin" \
DESTDIR=""
# Delete files which we ship in /usr/share/doc.
$(RM) -r debian/tmp/usr/share/GNUstep/Documentation/Developer/Make/ReleaseNotes
dh_installdirs -pgnustep-make-doc usr/share/doc/gnustep-make-doc
cp TestFramework/README \
debian/gnustep-make-doc/usr/share/doc/gnustep-make-doc/README.TestFramework
cp debian/gnustep-make-doc.install.in debian/gnustep-make-doc.install
cp debian/gnustep-make-doc.links.in debian/gnustep-make-doc.links
endif
override_dh_gencontrol-arch:
dh_gencontrol -pgnustep-multiarch -- \
-Vlocal:DEB-HOST-GNU-TYPE=$(DEB_HOST_GNU_TYPE)
dh_gencontrol --remaining-packages
|