blob: d5a05df83c91b2882ef06ce3df178a13ed3a5ee0 (
plain) (
tree)
|
|
#!/usr/bin/make -f
#-*- makefile -*-
# Made with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# This version is for a hypothetical package that builds an
# architecture-dependant package, as well as an architecture-independant
# package.
package=sword
version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*')
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This is the debhelper compatability version to use.
#export DH_COMPAT=2
ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH)
ifeq ($(ARCH),alpha)
COMPILER_FLAGS=CFLAGS="-O0 -mieee" CXXFLAGS="-O0 -mieee"
endif
PHPENV=EXTRA_INCLUDES="-I../../../include -DSWIG"
PHPEXTDIR=`php-config --extension-dir`
configure: configure-stamp
configure-stamp:
dh_testdir
#autoheader
#autoconf
chmod 755 configure
#chmod 755 apps/console/diatheke/configure
chmod 755 bindings/swig/configure
$(COMPILER_FLAGS) ./configure --prefix=/usr --mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info --with-zlib \
--sysconfdir=/etc --enable-shared --with-icu
#cd apps/console/diatheke && ./configure --prefix=/usr
cd bindings/swig && $(COMPILER_FLAGS) ./configure --prefix=/usr \
--with-sword-dir=`pwd`/../.. --without-swigbin
cd bindings/swig && $(MAKE) perl_makebuild \
&& $(MAKE) php_makebuild
cd bindings/swig/php && phpize && \
$(COMPILER_FLAGS) ./configure --prefix=/usr --enable-Sword
touch configure.stamp
build: configure-stamp build-stamp
build-stamp:
dh_testdir
$(MAKE)
cd bindings/swig && $(MAKE) perl_makebuild
cd bindings/swig/perl && perl Makefile.PL INSTALLDIRS=vendor && \
$(MAKE) OPTIMIZE="-O2 -g -Wall"
cd bindings/swig/php && $(PHPENV) $(MAKE)
touch build-stamp
clean:
dh_testdir
dh_testroot
-$(MAKE) distclean
-cd bindings/swig/perl && $(MAKE) clean
-cd bindings/swig/php && $(MAKE) distclean && rm -rf modules
-cd bindings/swig && $(MAKE) distclean
rm -f build-stamp configure-stamp install-stamp lib/lib* \
config.h config.status config.log config.cache
dh_clean
install: install-stamp
install-stamp: build-stamp
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/tmp.
\$(MAKE) install DESTDIR=`pwd`/debian/tmp
cd bindings/swig/perl && \
$(MAKE) install PREFIX=`pwd`/../../../debian/libsword-perl/usr
#cd bindings/swig/php && \
$(MAKE) install DESTDIR=`pwd`/../../../debian/php-sword
dh_install bindings/swig/php/modules/*.so $(PHPEXTDIR)
dh_movefiles -pphp4-sword usr/lib/php4/*
dh_movefiles -plibsword-dev usr/lib/lib*so usr/lib/lib*.a \
usr/include/*
dh_movefiles -pdiatheke usr/bin/diatheke
dh_movefiles -plibsword-runtime usr/bin/*
mkdir -p debian/libsword-dev/usr/share/doc/libsword-dev/html
cp -R doc/api-documentation/html debian/libsword-dev/usr/share/doc/libsword-dev
mkdir -p debian/diatheke/usr/share/doc/diatheke/examples
cp -a apps/console/diatheke/cgi/index-public.html debian/diatheke/usr/share/doc/diatheke/examples
cp -a apps/console/diatheke/cgi/*.pl debian/diatheke/usr/lib/cgi-bin
cp -a apps/console/diatheke/README debian/diatheke/usr/share/doc/diatheke
touch install-stamp
# Build architecture-independent files here.
binary-indep: build install
dh_testdir
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installdocs
dh_installexamples
dh_installinfo
dh_installmenu
#dh_installmanpages
dh_installman
dh_undocumented
dh_installchangelogs ChangeLog
dh_strip
dh_link
dh_compress
dh_fixperms
dh_installdeb
dh_makeshlibs -V 'libsword1 (>=1.5.3-1)'
dh_perl
dh_shlibdeps -ldebian/tmp/usr/lib
dh_gencontrol
dh_md5sums
dh_builddeb
#source diff:
# @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|