summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-10-30 09:45:03 +0100
committerSebastien Helleu <flashcode@flashtux.org>2011-10-30 09:45:03 +0100
commit3a10291967772fc421c1c6b29ee140a5feb20b84 (patch)
tree0fa9115639d845bd78a71381cbe6ff54f19322cd /debian/rules
parent34e0226ee083b1cbd6277c0704288cb3c01d85d9 (diff)
downloadweechat-3a10291967772fc421c1c6b29ee140a5feb20b84.zip
core: sync debian files with debian git repository (use build flags from dpkg-buildflags if possible)
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules24
1 files changed, 18 insertions, 6 deletions
diff --git a/debian/rules b/debian/rules
index 17e24cc89..ea5f22c9c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,21 +1,33 @@
#!/usr/bin/make -f
+# Default build flags
+CFLAGS = -g -O2
+LDFLAGS = -Wl,-Bsymbolic-functions
+
+# dpkg >= 1.16.1 provides enhanced build flags (hardening features, etc.)
+DPKG_EXPORT_BUILDFLAGS = 1
+-include /usr/share/dpkg/buildflags.mk
+
builddir/Makefile:
mkdir -p builddir
cd builddir && \
cmake .. \
-DCMAKE_INSTALL_PREFIX:FILEPATH=/usr \
-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
- -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="-O2 -g $(CFLAGS)" \
- -DCMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING="-Wl,-z,defs" \
+ -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="$(CFLAGS)" \
+ -DCMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING="$(LDFLAGS)" \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
-build: build-stamp
-build-stamp: builddir/Makefile
- dh_testdir
+#build: build-stamp
+#build-stamp: builddir/Makefile
+# dh_testdir
+# $(MAKE) -C builddir VERBOSE=1
+# touch $@
+
+override_dh_auto_build: builddir/Makefile
$(MAKE) -C builddir
- touch $@
+ dh_auto_build
override_dh_auto_configure:
# the package also has autotools buildsys and