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
|
#!/usr/bin/make -f
binaries := $(shell dh_listpackages)
LIB_PKG := $(shell sed -rn 's/^Package:[[:space:]]*(libvte-[0-9\.-]+)[[:space:]]*$$/\1/p' debian/control)
UDEB_PKG := $(LIB_PKG)-udeb
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,-z,defs
export DPKG_GENSYMBOLS_CHECK_LEVEL = 4
include /usr/share/dpkg/default.mk
ifneq ($(filter libvte-2.91-gtk4-dev libvte-2.91-gtk4-doc,$(shell dh_listpackages)),)
GTK4=-Dgtk4=true
else
GTK4=-Dgtk4=false
endif
%:
dh $@
override_dh_auto_configure:
dh_auto_configure --builddirectory=build-deb -- \
-Ddocs=$(if $(filter %-doc,$(shell dh_listpackages)),true,false) \
-Dgir=true \
-Dgnutls=true \
$(GTK4)
ifneq ($(filter %-udeb,$(binaries)),)
CFLAGS='$(CFLAGS) -static-libgcc' \
CXXFLAGS='$(CXXFLAGS) -static-libgcc -static-libstdc++' \
dh_auto_configure --builddirectory=build-udeb -- \
-Ddocs=false \
-Dgir=false \
-Dgnutls=false \
-Dgtk4=false \
-Dicu=false \
-Dvapi=false \
-D_systemd=false
endif
override_dh_auto_build:
dh_auto_build --builddirectory=build-deb
ifneq ($(filter %-udeb,$(binaries)),)
dh_auto_build --builddirectory=build-udeb
endif
override_dh_auto_install:
dh_auto_install --builddirectory=build-deb \
--destdir=debian/tmp/deb
rm debian/tmp/deb/usr/bin/vte-2.91
rm -f debian/tmp/deb/usr/bin/vte-2.91-gtk4
ifneq ($(filter %-udeb,$(binaries)),)
dh_auto_install --builddirectory=build-udeb \
--destdir=debian/tmp/udeb
rm debian/tmp/udeb/usr/bin/vte-2.91
rm debian/tmp/udeb/usr/libexec/vte-urlencode-cwd
endif
mv debian/tmp/deb/etc/profile.d/vte.sh \
debian/tmp/deb/etc/profile.d/vte-2.91.sh
override_dh_auto_clean:
dh_auto_clean --builddirectory=build-deb
ifneq ($(filter %-udeb,$(binaries)),)
dh_auto_clean --builddirectory=build-udeb
endif
execute_before_dh_clean:
rm -f debian/libvte-2.91-common.install.hurd
override_dh_auto_test:
dh_auto_test --builddirectory=build-deb
override_dh_makeshlibs:
dh_makeshlibs -p$(LIB_PKG) --add-udeb=$(UDEB_PKG)
dh_makeshlibs --remaining-packages
override_dh_install:
grep -E -v 'lib/systemd' debian/libvte-2.91-common.install > debian/libvte-2.91-common.install.hurd
ifneq ($(filter %-udeb,$(binaries)),)
dh_install -p$(UDEB_PKG) --sourcedir=debian/tmp/udeb
endif
dh_install --remaining-packages --sourcedir=debian/tmp/deb
# Don't install the test apps currently. These could go in a separate binary package
override_dh_missing:
dh_missing -X usr/share/applications -X usr/share/xdg-terminals
# We only use dh_gnome to automatically run dh_translations in Ubuntu
override_dh_gnome:
|