#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This has to be exported to make some magic below work. export DH_OPTIONS ARCHLIB := $(shell perl -MConfig -e 'print $$Config{vendorarch}') DEB_BUILD_MULTIARCH := $(shell dpkg-architecture -qDEB_BUILD_MULTIARCH) DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) autoreconf: aclocal autoreconf -f -i override_dh_autoreconf: dh_autoreconf debian/rules -- autoreconf cp -p /usr/share/misc/config.* . override_dh_auto_configure: dh_auto_configure -- \ --cache-file=config.cache \ --includedir=/usr/include/ossp \ --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ --without-perl \ --without-dce \ --with-cxx \ $(shell dpkg-buildflags --export=cmdline) override_dh_auto_build: dh_auto_build # rebuild man pages make man # build perl bindings cd perl; \ /usr/bin/perl Makefile.PL INSTALLDIRS=vendor COMPAT=1 make -C perl \ CC="$(CC)" \ OPTIMIZE="$(shell dpkg-buildflags --get CPPFLAGS; dpkg-buildflags --get CFLAGS)" \ OTHERLDFLAGS="$(shell dpkg-buildflags --get LDFLAGS)" ifeq ($(DEB_BUILD_MULTIARCH),$(DEB_HOST_MULTIARCH)) make -C perl test endif # build php bindings #cd php; \ #phpize5; \ #mkdir build-php5; \ #cd build-php5; \ #CC="$(CC)" CFLAGS="$(CFLAGS) -I../.. -L../.. -L../../.libs" \ #../configure \ # --cache-file=../config.cache \ # --enable-uuid \ # --disable-static \ # --with-php-config=php-config5; \ #make; \ #cd ..; \ #LD_LIBRARY_PATH=`pwd`/../.libs \ #php5 -q -d "safe_mode=0" -d "extension=uuid.so" -d "extension_dir=./build-php5/modules" uuid.ts 5 override_dh_auto_install: dh_auto_install cd perl; make install DESTDIR=$(CURDIR)/debian/libossp-uuid-perl chrpath debian/libossp-uuid-perl/$(ARCHLIB)/auto/OSSP/uuid/uuid.so && \ chrpath -d debian/libossp-uuid-perl/$(ARCHLIB)/auto/OSSP/uuid/uuid.so #cd php/build-php5; make install INSTALL_ROOT=$(CURDIR)/debian/php5-uuid #chmod -x debian/php5-uuid/usr/lib/php5/*/uuid.so #chrpath debian/php5-uuid/usr/lib/php5/*/uuid.so && \ #chrpath -d debian/php5-uuid/usr/lib/php5/*/uuid.so override_dh_install: dh_install # rename manpages to not conflict with libuuid-dev for i in debian/libossp-uuid-dev/usr/share/man/man3/*.3; do mv $$i $${i}ossp; done install -D -m 644 debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/uuid.pc \ debian/libossp-uuid-dev/usr/lib/pkgconfig/ossp-uuid.pc #override_dh_gencontrol: # dh_gencontrol -- -Vphp5-uuid:Depends=phpapi-$(shell php-config5 --phpapi) override_dh_auto_clean: cd perl; test -f Makefile && touch Makefile && make distclean || true #rm -rf php/build-php5 cd php; phpize --clean || true dh_auto_clean rm -f config.guess config.sub rm -f uuid.1 uuid.3 uuid++.3 uuid-config.1 %: dh $@ --with autoreconf