File: rules

package info (click to toggle)
sarg 2.3.11-1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 5,372 kB
  • sloc: ansic: 13,463; sh: 4,369; xml: 387; makefile: 167; php: 146; sed: 16
file content (56 lines) | stat: -rwxr-xr-x 2,210 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
#export DH_OPTIONS=-v

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

INSTALL = install
INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
INSTALL_SCRIPT  = $(INSTALL) -p    -o root -g root  -m  755
INSTALL_DIR     = $(INSTALL) -p -d -o root -g root  -m  755

%:
	dh  $@

override_dh_auto_configure:
	chmod 755 configure
	dh_auto_configure -Sautoconf -- --prefix=/usr \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info \
		--bindir=/usr/bin \
		--sysconfdir=/etc/sarg \
		--enable-fontdir=/usr/share/fonts/truetype/ttf-dejavu \
		--enable-imagedir=/usr/share/sarg/images \
		--enable-sargphp=/usr/share/sarg



override_dh_auto_install:
	dh_auto_install
	$(INSTALL_FILE) debian/sarg.conf debian/sarg/etc/sarg
	$(INSTALL_FILE) debian/sarg.hosts debian/sarg/etc/sarg/exclude_hosts
	$(INSTALL_FILE) debian/sarg.users debian/sarg/etc/sarg/exclude_users
	$(INSTALL_FILE) debian/sarg.usertab debian/sarg/etc/sarg/usertab
	rm -r debian/sarg/usr/share/fonts
	$(INSTALL_SCRIPT) debian/sarg-reports debian/sarg/usr/sbin/sarg-reports
	$(INSTALL_FILE) debian/sarg-reports.conf debian/sarg/etc/sarg
	$(INSTALL_SCRIPT) debian/sarg-reports.cron.daily debian/sarg/etc/cron.daily/sarg
	$(INSTALL_SCRIPT) debian/sarg-reports.cron.weekly debian/sarg/etc/cron.weekly/sarg
	$(INSTALL_SCRIPT) debian/sarg-reports.cron.monthly debian/sarg/etc/cron.monthly/sarg
	$(INSTALL_FILE) css.tpl debian/sarg/usr/share/doc/sarg
	rm debian/sarg/usr/share/sarg/sarg-php/COPYING
	mv debian/sarg/usr/share/sarg/sarg-php/INSTALL debian/sarg/usr/share/doc/sarg/README.sarg.php
	mv debian/sarg/usr/share/sarg/sarg-php/LANGUAGES debian/sarg/usr/share/doc/sarg/LANGUAGES.sarg.php
	chmod 644 debian/sarg/etc/sarg/sarg.*
	chmod 755 debian/sarg/etc/sarg
	chmod 755 debian/sarg/etc/sarg/user_limit_block
	chmod 755 debian/sarg/usr/sbin/sarg-reports
	chmod 755 debian/sarg/etc/cron.daily/sarg
	chmod 755 debian/sarg/etc/cron.weekly/sarg
	chmod 755 debian/sarg/etc/cron.monthly/sarg