2007-04-15 19:26:34 +02:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
|
|
#export DH_VERBOSE=1
|
|
|
|
|
2010-10-31 11:35:29 +01:00
|
|
|
LMSHAREDIR=/usr/share/lemonldap-ng
|
2012-12-14 13:54:06 +01:00
|
|
|
LMVARDIR =/var/lib/lemonldap-ng
|
|
|
|
TMP = $(CURDIR)/debian/tmp
|
|
|
|
|
|
|
|
CONFDIR=/etc/lemonldap-ng
|
|
|
|
SESSIONSDIR=$(LMVARDIR)/sessions
|
2013-12-10 15:23:34 +01:00
|
|
|
PSESSIONSDIR=$(LMVARDIR)/psessions
|
2013-11-01 23:00:54 +01:00
|
|
|
NOTIFICATIONSDIR=$(LMVARDIR)/notifications
|
2012-12-14 13:54:06 +01:00
|
|
|
CONFSTORAGEDIR=$(LMVARDIR)/conf
|
|
|
|
FIRSTCONFFILE=$(CONFSTORAGEDIR)/lmConf-1
|
|
|
|
LMINIFILE=$(CONFDIR)/lemonldap-ng.ini
|
2013-11-05 15:36:00 +01:00
|
|
|
CAPTCHADIR=$(LMVARDIR)/captcha
|
2007-04-15 19:26:34 +02:00
|
|
|
|
2012-11-03 07:03:45 +01:00
|
|
|
%:
|
|
|
|
dh $@
|
2008-12-24 08:22:42 +01:00
|
|
|
|
2012-11-03 07:03:45 +01:00
|
|
|
override_dh_auto_configure:
|
2009-12-03 11:08:33 +01:00
|
|
|
$(MAKE) configure STORAGECONFFILE=/etc/lemonldap-ng/lemonldap-ng.ini \
|
2012-11-03 07:03:45 +01:00
|
|
|
PERLOPTIONS="INSTALLDIRS=vendor"
|
2007-04-15 19:26:34 +02:00
|
|
|
|
2012-11-03 07:03:45 +01:00
|
|
|
override_dh_auto_install:
|
2008-12-24 08:22:42 +01:00
|
|
|
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp \
|
|
|
|
PREFIX=/usr/ \
|
2010-05-02 12:52:56 +02:00
|
|
|
LMPREFIX=/usr/share/lemonldap-ng/ \
|
2010-10-31 11:35:29 +01:00
|
|
|
BINDIR=$(LMSHAREDIR)/bin/ \
|
2008-12-24 08:22:42 +01:00
|
|
|
DOCUMENTROOT=$(LMVARDIR) \
|
|
|
|
EXAMPLESDIR=/examples/ \
|
2010-10-31 11:35:29 +01:00
|
|
|
HANDLERDIR=$(LMVARDIR)/handler/ \
|
|
|
|
PORTALSKINSDIR=$(LMSHAREDIR)/portal-skins/ \
|
|
|
|
MANAGERSKINSDIR=$(LMSHAREDIR)/manager-skins/ \
|
|
|
|
SESSIONSEXPLORERDATADIR=$(LMSHAREDIR)/sessions-explorer-imgs/ \
|
2009-12-03 11:08:33 +01:00
|
|
|
STORAGECONFFILE=/etc/lemonldap-ng/lemonldap-ng.ini \
|
2010-10-31 11:35:29 +01:00
|
|
|
TOOLSDIR=$(LMSHAREDIR)/ressources/ \
|
2008-12-24 08:22:42 +01:00
|
|
|
CONFDIR=/etc/lemonldap-ng/ \
|
|
|
|
CRONDIR=/etc/cron.d/ \
|
|
|
|
DATADIR=$(LMVARDIR) \
|
|
|
|
APACHEUSER=www-data \
|
2010-10-31 11:35:29 +01:00
|
|
|
APACHEGROUP=www-data \
|
2014-04-18 12:17:08 +02:00
|
|
|
DEFDOCDIR=/usr/share/doc/lemonldap-ng-doc \
|
|
|
|
FRDOCDIR=/usr/share/doc/lemonldap-ng-fr-doc
|
2014-06-29 22:21:11 +02:00
|
|
|
|
2012-06-18 10:37:55 +02:00
|
|
|
test -n "$$LOCALBUILD" || ./scripts/minifierjs $$(find debian/tmp/ -name '*.js')
|
|
|
|
test -n "$$LOCALBUILD" || ./scripts/minifiercss $$(find debian/tmp/ -name '*.css')
|
2010-11-06 09:08:11 +01:00
|
|
|
|
2012-12-14 13:54:06 +01:00
|
|
|
mkdir $(TMP)/$(LMSHAREDIR)/manager $(TMP)/$(LMSHAREDIR)/portal
|
|
|
|
mv $(TMP)/$(LMVARDIR)/portal/*.pl $(TMP)/$(LMSHAREDIR)/portal/
|
|
|
|
mv $(TMP)/$(LMVARDIR)/manager/*pl $(TMP)/$(LMSHAREDIR)/manager/
|
|
|
|
|
|
|
|
override_dh_compress:
|
|
|
|
dh_compress -X favicon.ico
|
2008-11-26 08:40:42 +01:00
|
|
|
|
2013-04-17 11:54:01 +02:00
|
|
|
# Fix lemonldap-ng dirs permissions and owner since dh_fixperms change them:
|
|
|
|
# * global configuration dirs must be writable by www-data but not readable
|
|
|
|
# by all (also sessions, captcha,... dirs)
|
|
|
|
# * lemonldap-ng.ini must not be readable by all
|
|
|
|
override_dh_fixperms:
|
|
|
|
dh_fixperms
|
|
|
|
chown www-data:www-data \
|
|
|
|
debian/*/$(SESSIONSDIR) \
|
|
|
|
debian/*/$(SESSIONSDIR)/lock \
|
2013-12-10 15:23:34 +01:00
|
|
|
debian/*/$(PSESSIONSDIR) \
|
|
|
|
debian/*/$(PSESSIONSDIR)/lock \
|
2013-11-01 23:00:54 +01:00
|
|
|
debian/*/$(NOTIFICATIONSDIR) \
|
2013-10-28 21:35:33 +01:00
|
|
|
debian/liblemonldap-ng-common-perl/$(CONFSTORAGEDIR) \
|
2014-12-19 10:07:29 +01:00
|
|
|
debian/liblemonldap-ng-portal-perl/$(CAPTCHADIR)
|
2013-10-28 21:35:33 +01:00
|
|
|
chgrp www-data debian/liblemonldap-ng-common-perl/$(LMINIFILE) \
|
|
|
|
debian/liblemonldap-ng-common-perl/$(FIRSTCONFFILE)
|
2013-11-05 20:12:03 +01:00
|
|
|
chmod 770 debian/*/$(SESSIONSDIR) debian/*/$(SESSIONSDIR)/lock \
|
2013-12-10 15:23:34 +01:00
|
|
|
debian/*/$(PSESSIONSDIR) debian/*/$(PSESSIONSDIR)/lock \
|
2013-11-05 20:12:03 +01:00
|
|
|
debian/*/$(NOTIFICATIONSDIR) \
|
2014-12-19 10:07:29 +01:00
|
|
|
debian/liblemonldap-ng-portal-perl/$(CAPTCHADIR)
|
2013-10-28 21:35:33 +01:00
|
|
|
chmod 750 debian/liblemonldap-ng-common-perl/$(CONFSTORAGEDIR)
|
|
|
|
chmod 640 debian/liblemonldap-ng-common-perl/$(FIRSTCONFFILE) \
|
|
|
|
debian/liblemonldap-ng-common-perl/$(LMINIFILE)
|