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
|
#!/usr/bin/make -f
include /usr/share/dpkg/architecture.mk
FLAVOURS = gtk3
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
API_VERSION = 0.1
CONFIGURE_COMMON_FLAGS = -DENABLE_TESTS=ON -DENABLE_BINDINGS_MONO=OFF
CONFIGURE_FLAGS_gtk3 = -DFLAVOUR_GTK3=ON -DENABLE_GTKDOC=ON
export DPKG_GENSYMBOLS_CHECK_LEVEL = 4
CFLAGS += -fPIC
%:
dh $@ --with gir
override_dh_auto_configure: $(FLAVOURS:%=doconfigure-%)
doconfigure-%:
dh_auto_configure --builddirectory=build/$* -- $(CONFIGURE_FLAGS_$*) $(CONFIGURE_COMMON_FLAGS)
override_dh_auto_build: $(FLAVOURS:%=dobuild-%)
dobuild-%:
dh_auto_build --builddirectory=build/$*
override_dh_auto_install: $(FLAVOURS:%=doinstall-%)
doinstall-%:
dh_auto_install --builddirectory=build/$* --destdir=debian/tmp/$*
override_dh_install:
find debian/tmp -name \*.la -exec rm {} \;
find debian/tmp -name \*.a -exec rm {} \;
rm -rf debian/tmp/*/usr/lib/mono
rm -rf debian/tmp/*/usr/share/vala/vapi/ayatana-appindicator*-0.1.deps
mkdir -p debian/tmp/gtk3/usr/share/doc/libayatana-appindicator3-dev/
mv debian/tmp/gtk3/usr/share/gtk-doc/html/libayatana-appindicator3 debian/tmp/gtk3/usr/share/doc/libayatana-appindicator3-dev/html
ln -s libayatana-appindicator3.so debian/tmp/gtk3/usr/lib/$(DEB_HOST_MULTIARCH)/libappindicator3.so
ln -s libayatana-appindicator3.so.1 debian/tmp/gtk3/usr/lib/$(DEB_HOST_MULTIARCH)/libappindicator3.so.1
dh_install -plibayatana-appindicator-doc --sourcedir=debian/tmp/gtk3
dh_install -plibayatana-appindicator3-1 --sourcedir=debian/tmp/gtk3
dh_install -plibayatana-appindicator3-dev --sourcedir=debian/tmp/gtk3
dh_install -pgir1.2-ayatanaappindicator3-0.1 --sourcedir=debian/tmp/gtk3
override_dh_missing:
dh_missing -plibayatana-appindicator-doc --fail-missing --sourcedir=debian/tmp/gtk3
dh_missing -plibayatana-appindicator3-1 --fail-missing --sourcedir=debian/tmp/gtk3
dh_missing -plibayatana-appindicator3-dev --fail-missing --sourcedir=debian/tmp/gtk3
dh_missing -pgir1.2-ayatanaappindicator3-0.1 --fail-missing --sourcedir=debian/tmp/gtk3
override_dh_link:
dh_link -plibayatana-appindicator-doc
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
mkdir -p $(CURDIR)/debian/tmphome-gtk3/.local/share
mkdir -p $(CURDIR)/debian/tmphome-gtk3/.cache
export HOME=$(CURDIR)/debian/tmphome-gtk3 \
&& export XDG_DATA_HOME=$(CURDIR)/debian/tmphome-gtk3/.local/share \
&& export XDG_CACHE_HOME=$(CURDIR)/debian/tmphome-gtk3/.cache \
&& unset DBUS_SESSION_BUS_ADDRESS \
&& dh_auto_test --no-parallel --builddirectory=build/gtk3
# View test's log file for better debugging of problems when built in clean chroots.
if [ -e build/gtk3/tests/test-suite.log ]; then cat build/gtk3/tests/test-suite.log; fi
rm -Rf $(CURDIR)/debian/tmphome-gtk3
endif
override_dh_auto_clean:
dh_auto_clean
rm -rf build
override_dh_installchangelogs:
dh_installchangelogs NEWS
get-orig-source:
uscan --noconf --force-download --rename --download-current-version --destdir=..
|