summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 400ca69ce55828db0df07158d284affb75d29bec (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
#!/usr/bin/make -f

BUILDDIR = builddir

$(BUILDDIR)/Makefile:
	mkdir -p $(BUILDDIR)
	cd $(BUILDDIR) && \
	cmake .. \
		-DCMAKE_INSTALL_PREFIX:FILEPATH=/usr \
		-DENABLE_DOC:BOOL=ON \
		-DENABLE_MAN:BOOL=ON \
		-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
		-DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="$(CFLAGS) -D_FORTIFY_SOURCE=2" \
		-DCMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING="$(LDFLAGS)" \
		-DCMAKE_SKIP_RPATH:BOOL=ON \
		-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON

override_dh_auto_build: $(BUILDDIR)/Makefile
	dh_auto_build

override_dh_auto_configure:
	# the package also has autotools buildsys and
	# debhelper try to use it but that's not needed
	echo

override_dh_strip:
	dh_strip --dbg-package=weechat-dbg

%:
	dh $@ --parallel --builddirectory=$(BUILDDIR)