rules 1.47 KB
Newer Older
1
2
3
4
5
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

Yadd's avatar
Yadd committed
6
7
LMSHAREDIR=/usr/share/lemonldap-ng
LMVARDIR=/var/lib/lemonldap-ng
8

Yadd's avatar
Yadd committed
9
10
%:
	dh $@
11

Yadd's avatar
Yadd committed
12
override_dh_auto_configure:
Yadd's avatar
Yadd committed
13
	$(MAKE) configure STORAGECONFFILE=/etc/lemonldap-ng/lemonldap-ng.ini \
Yadd's avatar
Yadd committed
14
		PERLOPTIONS="INSTALLDIRS=vendor"
15

Yadd's avatar
Yadd committed
16
override_dh_auto_install:
17
18
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp \
			PREFIX=/usr/ \
Yadd's avatar
Yadd committed
19
			LMPREFIX=/usr/share/lemonldap-ng/ \
Yadd's avatar
Yadd committed
20
			BINDIR=$(LMSHAREDIR)/bin/ \
21
22
			DOCUMENTROOT=$(LMVARDIR) \
			EXAMPLESDIR=/examples/ \
Yadd's avatar
Yadd committed
23
24
25
26
			HANDLERDIR=$(LMVARDIR)/handler/ \
			PORTALSKINSDIR=$(LMSHAREDIR)/portal-skins/ \
			MANAGERSKINSDIR=$(LMSHAREDIR)/manager-skins/ \
			SESSIONSEXPLORERDATADIR=$(LMSHAREDIR)/sessions-explorer-imgs/ \
Yadd's avatar
Yadd committed
27
			STORAGECONFFILE=/etc/lemonldap-ng/lemonldap-ng.ini \
Yadd's avatar
Yadd committed
28
			TOOLSDIR=$(LMSHAREDIR)/ressources/ \
29
30
31
32
			CONFDIR=/etc/lemonldap-ng/ \
			CRONDIR=/etc/cron.d/ \
			DATADIR=$(LMVARDIR) \
			APACHEUSER=www-data \
Yadd's avatar
Yadd committed
33
			APACHEGROUP=www-data \
Yadd's avatar
Yadd committed
34
			DOCDIR=/usr/share/doc/lemonldap-ng-doc
35

36
37
	test -n "$$LOCALBUILD" || ./scripts/minifierjs $$(find debian/tmp/ -name '*.js')
	test -n "$$LOCALBUILD" || ./scripts/minifiercss $$(find debian/tmp/ -name '*.css')
Yadd's avatar
Yadd committed
38
39

	# Move perl scripts in /usr/share, links are created by *.postinst scripts
40
41
42
	mkdir debian/tmp/usr/share/lemonldap-ng/manager debian/tmp/usr/share/lemonldap-ng/portal
	mv debian/tmp/var/lib/lemonldap-ng/portal/*.pl debian/tmp/usr/share/lemonldap-ng/portal/
	mv debian/tmp/var/lib/lemonldap-ng/manager/*pl debian/tmp/usr/share/lemonldap-ng/manager/
43