2004-07-24 16:55:48 +02:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
# -*- makefile -*-
|
|
|
|
# Sample debian/rules that uses debhelper.
|
|
|
|
# GNU copyright 1997 to 1999 by Joey Hess.
|
|
|
|
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
|
|
#export DH_VERBOSE=1
|
|
|
|
|
2015-02-25 16:35:19 +01:00
|
|
|
include /usr/share/python/python.mk
|
2004-07-24 16:55:48 +02:00
|
|
|
|
|
|
|
# These are used for cross-compiling and for saving the configure script
|
|
|
|
# from having to guess our platform (since we know it already)
|
|
|
|
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
|
|
|
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
|
|
|
|
2008-05-29 12:26:59 +02:00
|
|
|
DEB_TARGET_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
|
|
|
|
2007-07-26 20:07:30 +02:00
|
|
|
PYDEF := $(shell pyversions -vd)
|
|
|
|
PYVERS := $(shell pyversions -vr debian/control)
|
2015-02-25 16:35:19 +01:00
|
|
|
PY3VERS := $(shell py3versions -vr '>= 3.0')
|
2007-07-26 20:07:30 +02:00
|
|
|
OTHERPYVERS := $(filter-out $(PYDEF), $(PYVERS))
|
2004-07-24 16:55:48 +02:00
|
|
|
|
2015-02-25 19:11:38 +01:00
|
|
|
PERLARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}')
|
|
|
|
|
2013-12-29 10:27:20 +01:00
|
|
|
CFLAGS = `dpkg-buildflags --get CFLAGS`
|
|
|
|
CFLAGS += -Wall
|
|
|
|
LDFLAGS = `dpkg-buildflags --get LDFLAGS`
|
|
|
|
CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
|
2004-07-24 16:55:48 +02:00
|
|
|
|
|
|
|
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
|
|
|
INSTALL_PROGRAM += -s
|
|
|
|
endif
|
|
|
|
|
2004-07-27 17:31:37 +02:00
|
|
|
version=`ls src/.libs/lib*.so.* | \
|
|
|
|
awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
|
|
|
|
major=`ls src/.libs/lib*.so.* | \
|
|
|
|
awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
|
2004-07-24 16:55:48 +02:00
|
|
|
|
2008-05-29 12:26:59 +02:00
|
|
|
CONFIGURE_ARGS := \
|
|
|
|
--prefix=/usr \
|
|
|
|
--mandir=\$${prefix}/share/man \
|
|
|
|
--infodir=\$${prefix}/share/info \
|
|
|
|
--enable-tests=no \
|
|
|
|
--disable-gtk-doc \
|
|
|
|
--enable-perl \
|
2015-02-25 18:17:28 +01:00
|
|
|
--disable-java \
|
2013-12-29 10:30:02 +01:00
|
|
|
--with-php5-config-dir=/etc/php5/mods-available/
|
2008-05-29 12:26:59 +02:00
|
|
|
|
|
|
|
|
2004-07-24 16:55:48 +02:00
|
|
|
config.status: configure
|
|
|
|
dh_testdir
|
|
|
|
# Add here commands to configure the package.
|
2013-12-29 10:27:20 +01:00
|
|
|
CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) $(CONFIGURE_ARGS)
|
2004-07-24 16:55:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
build: build-stamp
|
|
|
|
build-stamp: config.status
|
|
|
|
dh_testdir
|
|
|
|
|
|
|
|
# Add here commands to compile the package.
|
|
|
|
$(MAKE)
|
2007-07-26 20:07:30 +02:00
|
|
|
set -e; \
|
|
|
|
for v in $(OTHERPYVERS); do \
|
2008-04-29 12:45:08 +02:00
|
|
|
rm -rf bindings/python$$v; \
|
|
|
|
cp -a bindings/python bindings/python$$v; \
|
|
|
|
sed "s/$(PYDEF)/$$v/g" bindings/python/Makefile > bindings/python$$v/Makefile; \
|
|
|
|
$(MAKE) -C bindings/python$$v clean; \
|
|
|
|
$(MAKE) -C bindings/python$$v; \
|
2007-07-26 20:07:30 +02:00
|
|
|
done
|
2004-07-24 16:55:48 +02:00
|
|
|
|
2015-02-25 16:35:19 +01:00
|
|
|
for v in $(PY3VERS); do \
|
|
|
|
rm -rf bindings/python$$v; \
|
|
|
|
cp -a bindings/python bindings/python$$v; \
|
|
|
|
sed "s/$(PYDEF)/$$v/g" bindings/python/Makefile > bindings/python$$v/Makefile; \
|
|
|
|
$(MAKE) -C bindings/python$$v clean; \
|
|
|
|
$(MAKE) -C bindings/python$$v; \
|
|
|
|
done
|
|
|
|
|
2004-07-24 16:55:48 +02:00
|
|
|
touch build-stamp
|
|
|
|
|
|
|
|
clean:
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
rm -f build-stamp
|
|
|
|
|
2008-04-29 22:29:43 +02:00
|
|
|
[ ! -f Makefile ] || $(MAKE) distclean
|
2004-07-24 16:55:48 +02:00
|
|
|
|
2007-07-26 20:07:30 +02:00
|
|
|
for v in $(OTHERPYVERS); do \
|
2008-04-29 12:45:08 +02:00
|
|
|
rm -rf bindings/python$$v; \
|
2007-07-26 20:07:30 +02:00
|
|
|
done
|
2004-07-24 16:55:48 +02:00
|
|
|
|
2015-02-25 16:35:19 +01:00
|
|
|
for v in $(PY3VERS); do \
|
|
|
|
rm -rf bindings/python$$v; \
|
|
|
|
done
|
|
|
|
|
2011-02-08 11:14:28 +01:00
|
|
|
rm -f config.log
|
|
|
|
|
2004-07-24 16:55:48 +02:00
|
|
|
dh_clean
|
|
|
|
|
|
|
|
install: build
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_clean -k
|
|
|
|
dh_installdirs
|
|
|
|
|
2015-02-25 19:11:38 +01:00
|
|
|
sed -e 's,$${archlib},$(PERLARCHLIB),g' debian/liblasso-perl.install.in > debian/liblasso-perl.install
|
|
|
|
|
2004-07-24 16:55:48 +02:00
|
|
|
# Add here commands to install the package into debian/tmp
|
2004-08-21 20:58:49 +02:00
|
|
|
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp \
|
|
|
|
GACUTIL="/usr/bin/gacutil -root $(CURDIR)/debian/tmp/usr/lib"
|
2007-07-26 20:07:30 +02:00
|
|
|
set -e; \
|
|
|
|
for v in $(OTHERPYVERS); do \
|
2008-04-29 12:45:08 +02:00
|
|
|
$(MAKE) -C bindings/python$$v install DESTDIR=$(CURDIR)/debian/tmp; \
|
2007-07-26 20:07:30 +02:00
|
|
|
done
|
2015-02-25 16:35:19 +01:00
|
|
|
for v in $(PY3VERS); do \
|
|
|
|
$(MAKE) -C bindings/python$$v install DESTDIR=$(CURDIR)/debian/tmp; \
|
|
|
|
done
|
2007-07-26 20:07:30 +02:00
|
|
|
|
2004-07-24 16:55:48 +02:00
|
|
|
# Build architecture-independent files here.
|
|
|
|
binary-indep: build install
|
2005-08-10 14:17:07 +02:00
|
|
|
#dh_makeclilibs -L liblasso-cil -r
|
2004-07-24 16:55:48 +02:00
|
|
|
|
|
|
|
# Build architecture-dependent files here.
|
|
|
|
binary-arch: build install
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2004-07-27 17:31:37 +02:00
|
|
|
dh_installchangelogs
|
2004-07-24 16:55:48 +02:00
|
|
|
dh_installdocs
|
2004-08-31 13:39:36 +02:00
|
|
|
dh_installexamples -XCVS
|
2004-07-24 16:55:48 +02:00
|
|
|
dh_installman
|
2008-04-29 12:45:08 +02:00
|
|
|
dh_install
|
2015-02-25 19:11:38 +01:00
|
|
|
chrpath -d $(CURDIR)/debian/liblasso-perl$(PERLARCHLIB)/auto/Lasso/Lasso.so
|
2004-07-24 16:55:48 +02:00
|
|
|
dh_link
|
|
|
|
dh_strip
|
2008-04-29 12:45:08 +02:00
|
|
|
dh_perl
|
2013-12-04 18:04:53 +01:00
|
|
|
dh_python2 -ppython-lasso
|
2015-02-25 16:35:19 +01:00
|
|
|
dh_python3 -ppython3-lasso
|
2004-07-24 16:55:48 +02:00
|
|
|
dh_compress
|
|
|
|
dh_fixperms
|
|
|
|
dh_makeshlibs -a -V
|
|
|
|
dh_installdeb
|
2004-09-07 13:16:45 +02:00
|
|
|
dh_shlibdeps -a
|
2011-02-08 11:14:28 +01:00
|
|
|
echo "php:Depends=phpapi-`php-config5 --phpapi`" >> $(CURDIR)/debian/php5-lasso.substvars
|
2004-07-24 16:55:48 +02:00
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|
|
|
|
|
|
|
|
binary: binary-indep binary-arch
|
2015-02-25 16:35:19 +01:00
|
|
|
.PHONY: build clean binary-indep binary-arch binary install
|