2009-12-16 14:43:50 +01:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
2010-04-10 13:23:09 +02:00
|
|
|
#export DH_VERBOSE=1
|
2009-12-16 14:43:50 +01:00
|
|
|
|
2010-04-10 13:23:09 +02:00
|
|
|
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
2009-12-16 14:43:50 +01:00
|
|
|
|
2010-04-10 13:23:09 +02:00
|
|
|
ifneq (,$(filter $(DEB_HOST_ARCH),i386 amd64))
|
|
|
|
pgm_opt := --with-pgm
|
|
|
|
else
|
|
|
|
pgm_opt :=
|
|
|
|
endif
|
2009-12-16 14:43:50 +01:00
|
|
|
|
2010-04-10 13:23:09 +02:00
|
|
|
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
|
|
|
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
|
|
|
MAKEFLAGS += -j$(NUMJOBS)
|
|
|
|
endif
|
2009-12-16 14:43:50 +01:00
|
|
|
|
|
|
|
|
|
|
|
configure: configure-stamp
|
|
|
|
configure-stamp:
|
|
|
|
dh_testdir
|
|
|
|
|
2010-04-10 13:23:09 +02:00
|
|
|
# hack: check that we're building from dsfg-free orig tarball
|
|
|
|
if tar tzf foreign/openpgm/libpgm-*.tar.gz | grep -q rfc3208.txt;then \
|
|
|
|
echo "Remove RFC documents from orig tar."; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
2009-12-16 14:43:50 +01:00
|
|
|
|
|
|
|
./configure $(CROSS) \
|
2010-04-10 13:23:09 +02:00
|
|
|
--prefix=/usr \
|
|
|
|
$(pgm_opt) \
|
|
|
|
CFLAGS="$(CFLAGS)" \
|
|
|
|
LDFLAGS="-Wl,--as-needed -Wl,-z,defs" \
|
2009-12-16 14:43:50 +01:00
|
|
|
|
|
|
|
touch configure-stamp
|
|
|
|
|
|
|
|
build: build-stamp
|
2010-04-10 13:23:09 +02:00
|
|
|
|
|
|
|
build-stamp: configure-stamp
|
2009-12-16 14:43:50 +01:00
|
|
|
dh_testdir
|
|
|
|
|
2010-04-10 13:23:09 +02:00
|
|
|
$(MAKE) $(MAKEFLAGS)
|
2009-12-16 14:43:50 +01:00
|
|
|
|
|
|
|
touch $@
|
|
|
|
|
2010-04-10 13:23:09 +02:00
|
|
|
clean:
|
2009-12-16 14:43:50 +01:00
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
rm -f build-stamp configure-stamp
|
|
|
|
|
2010-04-10 13:23:09 +02:00
|
|
|
if [ -e Makefile ]; then make distclean; fi
|
|
|
|
rm -rf foreign/openpgm/libpgm-2.0.20rc5 config.log
|
2009-12-16 14:43:50 +01:00
|
|
|
|
2010-04-10 13:23:09 +02:00
|
|
|
dh_clean
|
2009-12-16 14:43:50 +01:00
|
|
|
|
|
|
|
install: build
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2010-04-10 13:23:09 +02:00
|
|
|
dh_prep
|
2009-12-16 14:43:50 +01:00
|
|
|
dh_installdirs
|
|
|
|
|
|
|
|
$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
|
2009-12-16 17:19:20 +01:00
|
|
|
|
2009-12-16 14:43:50 +01:00
|
|
|
|
|
|
|
binary-indep: build install
|
|
|
|
|
|
|
|
binary-arch: build install
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2010-04-10 13:23:09 +02:00
|
|
|
dh_install -X/usr/share/man --fail-missing
|
2009-12-16 14:43:50 +01:00
|
|
|
dh_installman
|
2010-04-10 13:23:09 +02:00
|
|
|
dh_installchangelogs
|
|
|
|
dh_installdocs
|
|
|
|
dh_lintian
|
2009-12-16 14:43:50 +01:00
|
|
|
dh_link
|
2010-04-10 13:23:09 +02:00
|
|
|
dh_strip --dbg-package=libzmq-dbg
|
2009-12-16 14:43:50 +01:00
|
|
|
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
|
2010-04-10 13:23:09 +02:00
|
|
|
|
|
|
|
# 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
|