1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
#!/usr/bin/make -f
# 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
BUILD5=$(CURDIR)/debian/php5-idn
PHP_EX5=$(shell /usr/bin/php-config5 --extension-dir)
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
build:
@echo "Not use this."
build-stamp:
dh_testdir
touch build-stamp
build-stamp-php5: build-stamp
[ ! -f Makefile ] || $(MAKE) distclean
phpize --clean
phpize5
chmod a+x ./configure
./configure --prefix=$(BUILD5)/usr --with-php-config=/usr/bin/php-config5
-$(MAKE) DESTDIR=$(BUILD5)
touch build-stamp-php5
clean:
dh_testdir
dh_testroot
rm -rf build-stamp build-stamp-php5
rm -rf tests/CVS
rm -rf CVS
rm -rf debian/CVS
rm -rf debian/po/CVS
rm -rf reference/CVS
rm -rf reference/functions/CVS
rm -rf entities/CVS
[ ! -f Makefile ] || $(MAKE) distclean
phpize --clean
debconf-updatepo
dh_clean
install: build-php5
build-php5: build-stamp-php5
dh_testdir
dh_testroot
dh_installdirs
mkdir -p debian/php5-idn$(PHP_EX5)
install -m 644 -o root -g root modules/idn.so debian/php5-idn$(PHP_EX5)/idn.so
binary-indep:
binary-arch-php5: DH_OPTIONS='--package=php5-idn'
binary-arch-php5: build-php5
dh_testdir
dh_testroot
dh_installdirs
dh_installchangelogs CHANGES
dh_installdebconf
dh_installdocs
dh_install
# config
mkdir -p debian/php5-idn/usr/share/php5-idn/
cp debian/idn.ini debian/php5-idn/usr/share/php5-idn/idn.ini-dist
dh_link
dh_strip
dh_compress
dh_fixperms
dh_installdeb --package=php5-idn
dh_shlibdeps
echo "php:Depends=phpapi-`php-config5 --phpapi`" >> debian/php5-idn.substvars
dh_gencontrol --package=php5-idn
dh_md5sums
dh_builddeb --package=php5-idn
binary-arch: binary-arch-php5
binary: binary-indep binary-arch
.PHONY: build-php5 clean binary-indep binary-arch binary install
|