mingw: update fetch script to Pidgin 2.13.0
[siplcs.git] / contrib / debian / rules
blob1c8a61a7778ce68e996e52507fa95eb07a6cc502
1 #!/usr/bin/make -f
3 include /usr/share/cdbs/1/class/autotools.mk
4 include /usr/share/cdbs/1/rules/debhelper.mk
6 HAVE_APPSTREAM := $(strip $(shell (/usr/bin/appstream-validate >/dev/null --version || /usr/bin/appstreamcli >/dev/null --version) && echo yes))
7 HAVE_APPSTREAM_LEGACY := $(strip $(shell . /etc/os-release; echo $${ID}-$${VERSION_ID} | grep -q '^debian-8$$' && echo yes))
9 DEB_CONFIGURE_EXTRA_FLAGS := --enable-purple
10 # detect if package telepathy-glib is available
11 ifneq ($(shell pkg-config --exists telepathy-glib && echo FOUND),)
12 DEB_CONFIGURE_EXTRA_FLAGS += --enable-telepathy
13 else
14 DEB_CONFIGURE_EXTRA_FLAGS += --disable-telepathy
15 endif
16 ifeq ($(HAVE_APPSTREAM),)
17 DEB_CONFIGURE_EXTRA_FLAGS += --without-appstream
18 endif
20 # run tests
21 DEB_MAKE_CHECK_TARGET := check
23 # don't run unnecessary ldconfig on postinst and postrm.
24 DEB_DH_MAKESHLIBS_ARGS_pidgin-sipe=-n
26 clean::
27 dh_testdir
29 # git snapshot does not contain a configure script
30 debian/stamp-autotools-files: $(DEB_CONFIGURE_SCRIPT)
31 $(DEB_BUILDDIR)/config.status: $(DEB_CONFIGURE_SCRIPT)
33 $(DEB_CONFIGURE_SCRIPT):
34 ./autogen.sh
36 binary-post-install/pidgin-sipe::
37 rm -f debian/pidgin-sipe/usr/share/doc/pidgin-sipe/README
38 rm -r debian/pidgin-sipe/usr/share/pixmaps/pidgin/protocols/24
39 rm -r debian/pidgin-sipe/usr/share/pixmaps/pidgin/protocols/32
40 rm debian/pidgin-sipe/usr/lib/purple-2/libsipe.la
41 ifeq ($(HAVE_APPSTREAM)-$(HAVE_APPSTREAM_LEGACY),yes-yes)
42 mv debian/pidgin-sipe/usr/share/metainfo debian/pidgin-sipe/usr/share/appdata
43 endif
45 .PHONY: update-debian-control