summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorMartin Lucina <mato@kotelna.sk>2010-06-30 12:31:08 +0200
committerMartin Lucina <martin@lucina.net>2012-01-23 08:53:22 +0100
commitcf026feae205bfeb7e007f6afd0e8d7b283865c8 (patch)
treec411edf7893fae55bd3498793f81254adf7130cd /debian/rules
parenta15854bd92db69fcd0b4444fe1b8fe3610a7acf6 (diff)
Imported Debian patch 2.0.7.dfsg-1debian/2.0.7.dfsg-1
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules92
1 files changed, 92 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..9003360
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,92 @@
+#!/usr/bin/make -f
+
+#export DH_VERBOSE=1
+
+DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
+
+ifneq (,$(filter $(DEB_HOST_ARCH),i386 amd64))
+ pgm_opt := --with-pgm
+else
+ pgm_opt :=
+endif
+
+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 \
+ $(pgm_opt) \
+ CFLAGS="$(CFLAGS)" \
+ LDFLAGS="-Wl,--as-needed -Wl,-z,defs" \
+
+ touch configure-stamp
+
+build: 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
+ rm -rf foreign/openpgm/libpgm-2.0.20rc5 config.log
+
+ 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
+ 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
+
+
+# build depends:
+# - python[-all]-dev
+# - ruby-dev
+# -> figure out ruby-headersdir option automatically
+# - openjdk-6-jdk (or whatever)
+# -> set JAVA_HOME automatically
+# - libglib2.0-dev