summaryrefslogtreecommitdiffstats
path: root/debian/rules
blob: 1d543192be6bc7b7386c2ca9a3e9bdf679288d56 (plain)
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
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

# for dh_auto_test
TESTDIR=$(CURDIR)/debian/autotest

CONFIGURE_SWITCHES = -Dwith-proxy=yes -Dwith-otr=yes -Denable-true-color=yes -Dwith-perl=yes -Dwith-perl-lib=vendor -Dstatic-dependency=no -DPACKAGE_VERSION=$(DEB_VERSION_UPSTREAM)

%:
	dh $@ --buildsystem meson

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_SWITCHES)

override_dh_install:
	find debian/tmp -name '*.la' -delete
	dh_install
	find debian/irssi -name '*otr*' -delete

ABI = $(shell grep IRSSI_ABI_VERSION src/common.h | cut -d' ' -f3 )

override_dh_gencontrol:
	dh_gencontrol -- -Virssi:ABI="irssi-abi-$(ABI)"

override_dh_auto_test:
	mkdir -p $(TESTDIR)
	HOME=$(TESTDIR) dh_auto_test

override_dh_clean:
	dh_clean
	rm -rf $(TESTDIR)