summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules77
1 files changed, 77 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..8ff7728
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,77 @@
+#!/usr/bin/make -f
+
+#export DH_VERBOSE=1
+
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+ MAKEFLAGS += -j$(NUMJOBS)
+endif
+
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+
+ ./configure $(CROSS) \
+ --prefix=/usr \
+ --with-system-pgm \
+ CFLAGS="$(CFLAGS)" \
+ LDFLAGS="-Wl,--as-needed -Wl,-z,defs" \
+
+ touch configure-stamp
+
+build: build-arch build-indep
+build-arch: build-stamp
+build-indep: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ $(MAKE) $(MAKEFLAGS)
+
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ if [ -e Makefile ]; then make distclean; fi
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_prep
+ dh_installdirs
+
+ $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+
+
+binary-indep: build install
+
+binary-arch: build install
+ sed -i "/dependency_libs/ s/'.*'/''/" `find . -name '*.la'`
+ dh_testdir
+ dh_testroot
+ dh_install -X/usr/share/man --fail-missing
+ dh_installman
+ dh_installchangelogs
+ dh_installdocs
+ dh_lintian
+ dh_link
+ dh_strip --dbg-package=libzmq-dbg
+ dh_compress
+ dh_fixperms
+ dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
+
+# vim: set filetype=make