lemonldap-ng/debian/rules

80 lines
2.9 KiB
Plaintext
Raw Normal View History

#!/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
NOTIFICATIONSDIR=$(LMVARDIR)/notifications
2012-12-14 13:54:06 +01:00
CONFSTORAGEDIR=$(LMVARDIR)/conf
FIRSTCONFFILE=$(CONFSTORAGEDIR)/lmConf-1
LMINIFILE=$(CONFDIR)/lemonldap-ng.ini
CAPTCHADIR=$(LMVARDIR)/captcha
CAPTCHAOUTPUTDIR=$(LMVARDIR)/portal/captcha_output
2012-11-03 07:03:45 +01:00
%:
dh $@
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"
2012-11-03 07:03:45 +01:00
override_dh_auto_install:
$(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/ \
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/ \
CONFDIR=/etc/lemonldap-ng/ \
CRONDIR=/etc/cron.d/ \
DATADIR=$(LMVARDIR) \
APACHEUSER=www-data \
2010-10-31 11:35:29 +01:00
APACHEGROUP=www-data \
2010-11-06 09:08:11 +01:00
DOCDIR=/usr/share/doc/lemonldap-ng-doc
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
# 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 \
debian/*/$(NOTIFICATIONSDIR) \
debian/liblemonldap-ng-common-perl/$(CONFSTORAGEDIR) \
debian/liblemonldap-ng-portal-perl/$(CAPTCHADIR) \
debian/liblemonldap-ng-portal-perl/$(CAPTCHADIR)/data \
debian/liblemonldap-ng-portal-perl/$(CAPTCHAOUTPUTDIR)
chgrp www-data debian/liblemonldap-ng-common-perl/$(LMINIFILE) \
debian/liblemonldap-ng-common-perl/$(FIRSTCONFFILE)
chmod 770 debian/*/$(SESSIONSDIR) debian/*/$(SESSIONSDIR)/lock
chmod 770 debian/*/$(NOTIFICATIONSDIR)
chmod 770 debian/liblemonldap-ng-portal-perl/$(CAPTCHADIR) \
debian/liblemonldap-ng-portal-perl/$(CAPTCHADIR)/data \
debian/liblemonldap-ng-portal-perl/$(CAPTCHAOUTPUTDIR)
chmod 750 debian/liblemonldap-ng-common-perl/$(CONFSTORAGEDIR)
chmod 640 debian/liblemonldap-ng-common-perl/$(FIRSTCONFFILE) \
debian/liblemonldap-ng-common-perl/$(LMINIFILE)