134 lines
4.4 KiB
Makefile
Executable File
134 lines
4.4 KiB
Makefile
Executable File
#!/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
|
|
|
|
LM_ROOT=/var/lib/lemonldap-ng/
|
|
DEB_TMP_LM_ROOT=debian/tmp$(LM_ROOT)
|
|
LM_CONF_ROOT=/etc/lemonldap-ng/
|
|
DEB_TMP_LM_CONF_ROOT=debian/tmp$(LM_CONF_ROOT)
|
|
|
|
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
|
|
debconf-updatepo
|
|
rm -f build-stamp configure-stamp
|
|
|
|
# Add here commands to clean up after the build process.
|
|
[ ! -f Makefile ] || $(MAKE) clean
|
|
|
|
dh_clean
|
|
|
|
install: build
|
|
dh_testdir
|
|
dh_testroot
|
|
dh_clean -k
|
|
dh_installdirs
|
|
|
|
# Add here commands to install the package into debian/lemonldap-ng.
|
|
#$(MAKE) test
|
|
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp PREFIX=/usr
|
|
$(MAKE) example \
|
|
EXAMPLEROOT=debian/tmp/ \
|
|
DESTDOCSDIR=debian/tmp/docs/ \
|
|
REALDESTFILECONFDIR=$(LM_ROOT)conf/ \
|
|
DESTFILECONFDIR=$(LM_ROOT)conf/
|
|
|
|
# Debian example files
|
|
mv $(DEB_TMP_LM_CONF_ROOT)conf $(DEB_TMP_LM_ROOT)
|
|
cp $(DEB_TMP_LM_ROOT)handler/MyHandler.pm $(DEB_TMP_LM_CONF_ROOT)MyHandler.pm
|
|
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
|
|
#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)
|
|
|
|
# System to use /etc/lemonldap-ng/storage.conf instead of setting
|
|
# manually the configStorage parameter
|
|
perl -000 -i -pe 's/(Lemonldap::NG::Manager::Conf.*new\s*\(\s*){[^}]+}/$$1\$$Lemonldap::NG::Conf::configStorage/; s#^use#\nrequire "/usr/share/lemonldap-ng/configStorage.pm";\nuse#m;' \
|
|
$(DEB_TMP_LM_ROOT)manager/scripts/lmConfigEditor \
|
|
$(DEB_TMP_LM_ROOT)portal/scripts/purgeCentralCache
|
|
|
|
perl -000 -i -pe 's/(configStorage\s*=>\s*){[^}]+}/$$1\$$Lemonldap::NG::Conf::configStorage/; s#^use#\nrequire "/usr/share/lemonldap-ng/configStorage.pm";\nuse#m;' \
|
|
$(DEB_TMP_LM_CONF_ROOT)MyHandler.pm \
|
|
$(DEB_TMP_LM_ROOT)manager/*.pl \
|
|
$(DEB_TMP_LM_ROOT)portal/*.pl \
|
|
$(DEB_TMP_LM_ROOT)liberty-alliance-sp-portal/index-Debian.pl
|
|
perl -i -pe 's#(applyConfFile\s+=>\s+.*?)/\S*(apply\.conf)#$$1/etc/lemonldap-ng/$$2#' \
|
|
$(DEB_TMP_LM_ROOT)manager/*.pl \
|
|
$(DEB_TMP_LM_ROOT)handler/MyHandler-Debian.pm
|
|
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
|
|
# Build architecture-independent files here.
|
|
binary-indep: build install
|
|
dh_testdir
|
|
dh_testroot
|
|
dh_installchangelogs changelog
|
|
dh_installdocs
|
|
mkdir $(DEB_TMP_LM_ROOT)protected
|
|
find debian/tmp/var/lib/lemonldap-ng -type f -perm /111 -exec chmod -x {} \;
|
|
chmod +x $(DEB_TMP_LM_ROOT)manager/scripts/lmConfigEditor
|
|
find debian/tmp/var/lib/lemonldap-ng -type f -name *.pl -exec chmod +x {} \;
|
|
dh_installexamples
|
|
dh_install
|
|
chmod +x debian/liblemonldap-ng-portal-perl/usr/share/lemonldap-ng/bin/purgeCentralCache
|
|
# dh_installmenu
|
|
dh_installdebconf
|
|
# dh_installlogrotate
|
|
# dh_installemacsen
|
|
# dh_installpam
|
|
# dh_installmime
|
|
# dh_python
|
|
# dh_installinit
|
|
dh_installcron
|
|
# 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
|
|
|
|
# Build architecture-dependent files here.
|
|
binary-arch: build install
|
|
|
|
binary: binary-indep binary-arch
|
|
.PHONY: build clean binary-indep binary-arch binary install configure
|