2007-04-15 19:26:34 +02:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
# -*- makefile -*-
|
|
|
|
# Sample debian/rules that uses debhelper.
|
|
|
|
# This file was originally written by Joey Hess and Craig Small.
|
|
|
|
# As a special exception, when this file is copied by dh-make into a
|
|
|
|
# dh-make output file, you may use that output file without restriction.
|
|
|
|
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
|
|
|
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
|
|
#export DH_VERBOSE=1
|
|
|
|
|
|
|
|
export PERL_MM_USE_DEFAULT=1
|
|
|
|
|
2008-06-13 16:35:50 +02:00
|
|
|
LM_ROOT=/var/lib/lemonldap-ng/
|
|
|
|
DEB_TMP_LM_ROOT=debian/tmp$(LM_ROOT)
|
2008-11-11 20:06:46 +01:00
|
|
|
LM_CONF_ROOT=/etc/lemonldap-ng/
|
|
|
|
DEB_TMP_LM_CONF_ROOT=debian/tmp$(LM_CONF_ROOT)
|
2007-04-15 19:26:34 +02:00
|
|
|
|
|
|
|
configure: configure-stamp
|
|
|
|
configure-stamp:
|
|
|
|
dh_testdir
|
|
|
|
# Add here commands to configure the package.
|
|
|
|
|
|
|
|
touch configure-stamp
|
|
|
|
|
|
|
|
|
|
|
|
build: build-stamp
|
|
|
|
|
|
|
|
build-stamp: configure-stamp
|
|
|
|
dh_testdir
|
|
|
|
|
|
|
|
# Add here commands to compile the package.
|
|
|
|
$(MAKE) INSTALLDIRS=vendor
|
|
|
|
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2007-07-08 15:49:23 +02:00
|
|
|
debconf-updatepo
|
2007-04-15 19:26:34 +02:00
|
|
|
rm -f build-stamp configure-stamp
|
|
|
|
|
|
|
|
# Add here commands to clean up after the build process.
|
2007-10-15 07:44:34 +02:00
|
|
|
[ ! -f Makefile ] || $(MAKE) clean
|
2007-04-15 19:26:34 +02:00
|
|
|
|
|
|
|
dh_clean
|
|
|
|
|
|
|
|
install: build
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_clean -k
|
|
|
|
dh_installdirs
|
|
|
|
|
|
|
|
# Add here commands to install the package into debian/lemonldap-ng.
|
2008-11-22 19:09:57 +01:00
|
|
|
$(MAKE) test
|
2007-04-29 14:07:20 +02:00
|
|
|
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp PREFIX=/usr
|
2008-05-18 11:26:41 +02:00
|
|
|
$(MAKE) example \
|
2008-11-11 20:06:46 +01:00
|
|
|
EXAMPLEROOT=debian/tmp/ \
|
|
|
|
DESTDOCSDIR=debian/tmp/docs/ \
|
|
|
|
REALDESTFILECONFDIR=$(LM_ROOT)conf/ \
|
2008-11-12 16:35:27 +01:00
|
|
|
DESTFILECONFDIR=$(LM_ROOT)conf/ \
|
|
|
|
REALROOT=/
|
2008-06-13 16:35:50 +02:00
|
|
|
|
|
|
|
# Debian example files
|
2008-11-11 20:06:46 +01:00
|
|
|
mv $(DEB_TMP_LM_CONF_ROOT)conf $(DEB_TMP_LM_ROOT)
|
2008-06-13 16:35:50 +02:00
|
|
|
cp $(DEB_TMP_LM_ROOT)handler/MyHandler.pm $(DEB_TMP_LM_ROOT)handler/MyHandler-Debian.pm
|
|
|
|
cp $(DEB_TMP_LM_ROOT)portal/index.pl $(DEB_TMP_LM_ROOT)portal/index-Debian.pl
|
|
|
|
cp $(DEB_TMP_LM_ROOT)portal/index_skin.pl $(DEB_TMP_LM_ROOT)portal/index_skin-Debian.pl
|
|
|
|
cp $(DEB_TMP_LM_ROOT)liberty-alliance-sp-portal/index.pl $(DEB_TMP_LM_ROOT)liberty-alliance-sp-portal/index-Debian.pl
|
|
|
|
cp $(DEB_TMP_LM_ROOT)manager/index.pl $(DEB_TMP_LM_ROOT)manager/index-Debian.pl
|
2008-11-11 20:06:46 +01:00
|
|
|
#perl -i -pe 's#__DIR__/?#'/var/lib/lemonldap-ng'#g;s#__CONFDIR__/?#'$(LM_ROOT)conf'#g;' \
|
|
|
|
# $(DEB_TMP_LM_ROOT)apache*-protected-area.conf
|
|
|
|
cp debian/handler-apache* $(DEB_TMP_LM_CONF_ROOT)
|
2008-06-13 16:35:50 +02:00
|
|
|
|
|
|
|
# System to use /etc/lemonldap-ng/storage.conf instead of setting
|
|
|
|
# manually the configStorage parameter
|
2008-11-17 17:59:56 +01:00
|
|
|
perl -000 -i -pe 's/(Lemonldap::NG::Common::Conf.*new\s*\(\s*){[^}]+}/$$1\$$Lemonldap::NG::Conf::configStorage/; s#^use#\nrequire "/usr/share/lemonldap-ng/configStorage.pm";\nuse#m;' \
|
2008-06-13 16:35:50 +02:00
|
|
|
$(DEB_TMP_LM_ROOT)manager/scripts/lmConfigEditor \
|
|
|
|
$(DEB_TMP_LM_ROOT)portal/scripts/purgeCentralCache
|
|
|
|
|
2008-12-01 18:48:37 +01:00
|
|
|
perl -000 -i -pe 's/(configStorage\s*=>\s*){[^}]+}/$$1\$$Lemonldap::NG::Conf::configStorage/s; s#^use#\nrequire "/usr/share/lemonldap-ng/configStorage.pm";\nuse#m;' \
|
|
|
|
$(DEB_TMP_LM_ROOT)handler/MyHandler-Debian.pm \
|
|
|
|
$(DEB_TMP_LM_ROOT)manager/*Debian.pl \
|
|
|
|
$(DEB_TMP_LM_ROOT)portal/*Debian.pl \
|
2008-06-13 16:35:50 +02:00
|
|
|
$(DEB_TMP_LM_ROOT)liberty-alliance-sp-portal/index-Debian.pl
|
2008-11-26 08:40:42 +01:00
|
|
|
|
|
|
|
# apply.conf is in /etc/lemonldap-ng/
|
2008-08-11 16:45:35 +02:00
|
|
|
perl -i -pe 's#(applyConfFile\s+=>\s+.*?)/\S*(apply\.conf)#$$1/etc/lemonldap-ng/$$2#' \
|
2008-11-11 20:06:46 +01:00
|
|
|
$(DEB_TMP_LM_ROOT)manager/*.pl \
|
2008-11-26 08:40:42 +01:00
|
|
|
|
|
|
|
# SInce Lenny, jquery.js is provided by libjs-jquery
|
2008-11-11 20:06:46 +01:00
|
|
|
rm -f $(DEB_TMP_LM_ROOT)portal/skins/pastel/jquery.js $(DEB_TMP_LM_ROOT)manager/jquery.js
|
|
|
|
perl -i -pe 's#(["'"'"'])[\w-\./]*jquery.js#$$1/javascript/jquery/jquery.js#' \
|
|
|
|
$(DEB_TMP_LM_ROOT)manager/sessions.pl \
|
|
|
|
$(DEB_TMP_LM_ROOT)portal/skins/pastel/header.tpl
|
2008-11-26 08:40:42 +01:00
|
|
|
|
2007-04-15 19:26:34 +02:00
|
|
|
# Build architecture-independent files here.
|
|
|
|
binary-indep: build install
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2007-10-15 07:29:29 +02:00
|
|
|
dh_installchangelogs changelog
|
2007-04-15 19:26:34 +02:00
|
|
|
dh_installdocs
|
2008-06-13 16:35:50 +02:00
|
|
|
mkdir $(DEB_TMP_LM_ROOT)protected
|
2007-05-01 16:53:26 +02:00
|
|
|
find debian/tmp/var/lib/lemonldap-ng -type f -perm /111 -exec chmod -x {} \;
|
2008-06-13 16:35:50 +02:00
|
|
|
chmod +x $(DEB_TMP_LM_ROOT)manager/scripts/lmConfigEditor
|
2008-05-18 11:26:41 +02:00
|
|
|
find debian/tmp/var/lib/lemonldap-ng -type f -name *.pl -exec chmod +x {} \;
|
2007-04-29 14:07:20 +02:00
|
|
|
dh_installexamples
|
|
|
|
dh_install
|
2008-11-26 08:40:42 +01:00
|
|
|
cd debian/lemonldap-ng/usr/share/doc/lemonldap-ng/examples && \
|
|
|
|
ln -s ../../liblemonldap-ng-handler-perl/examples handler && \
|
|
|
|
ln -s ../../liblemonldap-ng-manager-perl/examples manager && \
|
|
|
|
ln -s ../../liblemonldap-ng-portal-perl/examples portal && \
|
|
|
|
ln -s ../../liblemonldap-ng-conf-perl/examples/ conf
|
2008-02-26 20:43:05 +01:00
|
|
|
chmod +x debian/liblemonldap-ng-portal-perl/usr/share/lemonldap-ng/bin/purgeCentralCache
|
2007-04-15 19:26:34 +02:00
|
|
|
# dh_installmenu
|
2007-04-29 14:07:20 +02:00
|
|
|
dh_installdebconf
|
2007-04-15 19:26:34 +02:00
|
|
|
# dh_installlogrotate
|
|
|
|
# dh_installemacsen
|
|
|
|
# dh_installpam
|
|
|
|
# dh_installmime
|
|
|
|
# dh_python
|
|
|
|
# dh_installinit
|
2007-05-01 16:53:26 +02:00
|
|
|
dh_installcron
|
2007-04-15 19:26:34 +02:00
|
|
|
# dh_installinfo
|
|
|
|
dh_installman
|
|
|
|
dh_link
|
|
|
|
dh_strip
|
|
|
|
dh_compress
|
|
|
|
dh_fixperms
|
|
|
|
# dh_perl
|
|
|
|
# dh_makeshlibs
|
|
|
|
dh_installdeb
|
|
|
|
dh_shlibdeps
|
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|
|
|
|
|
2008-02-26 20:43:05 +01:00
|
|
|
# Build architecture-dependent files here.
|
|
|
|
binary-arch: build install
|
|
|
|
|
2007-04-15 19:26:34 +02:00
|
|
|
binary: binary-indep binary-arch
|
|
|
|
.PHONY: build clean binary-indep binary-arch binary install configure
|