File: rules

package info (click to toggle)
shorewall-lite 5.2.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 392 kB
  • sloc: sh: 1,171; xml: 262; perl: 168; makefile: 29
file content (50 lines) | stat: -rwxr-xr-x 1,478 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-

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

# shorewall version
export VFULL=`grep "^VERSION=" install.sh | head -n 1 | cut -f 2 -d "="`
export V=`grep "^VERSION=" install.sh | head -n 1 | cut -f 2 -d "=" | cut -f 1-3 -d "."`
VMAJOR:=$(shell echo $(V) |cut -f 1 -d .)
VMINOR:=$(shell echo $(V) |cut -f 2 -d .)
VPATCH:=$(shell echo $(V) |cut -f 3 -d .)
NEXTPATCH:=$(shell expr $(VPATCH) + 1 2>/dev/null || expr `echo $(VPATCH) | cut -f 1 -d - ` + 1)


SRWL=$(CURDIR)/debian/shorewall-lite

%:
	dh $@ 

debian/po/templates.pot: debian/shorewall.templates
	@debconf-updatepo

override_dh_auto_configure:
	true

override_dh_auto_build:
	true

override_dh_install:
	echo 'shorewall:current=$(VMAJOR).$(VMINOR).$(VPATCH)~' \
		>> debian/shorewall-lite.substvars
	echo 'shorewall:next=$(VMAJOR).$(VMINOR).$(NEXTPATCH)~' \
		>> debian/shorewall-lite.substvars
	DESTDIR=$(SRWL) $(CURDIR)/install.sh $(CURDIR)/debian/shorewallrc

override_dh_installinit:
	dh_installinit --onlyscripts --no-start

override_dh_fixperms:
	# Temporary zones are only available to root
	chmod 750 $(SRWL)/var/lib/shorewall-lite
	# These should not be executable
	chmod 644 $(SRWL)/etc/shorewall-lite/shorewall-lite.conf
	# Global configuration has to be fully readable
	chmod 644 $(SRWL)/usr/share/shorewall-lite/*
	# Must be executable
	chmod 755 $(SRWL)/usr/share/shorewall-lite/shorecap
	dh_fixperms -Xetc/shorewall-lite -Xvar/lib/shorewall-lite