File: rules

package info (click to toggle)
iptables 1.3.6.0debian1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,980 kB
  • ctags: 8,373
  • sloc: ansic: 37,782; makefile: 1,269; cpp: 340; sh: 52
file content (80 lines) | stat: -rwxr-xr-x 1,836 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/make -f

IPTABLES = iptables_profectio
KERNEL = kernel_profectio

BUILD_DIR := $(CURDIR)/debian/build
SRC_DIR := $(BUILD_DIR)/$(IPTABLES)
STAMP_DIR := $(BUILD_DIR)/stamp
DOCS_DIR := $(BUILD_DIR)/docs

MANDIR := MANDIR=/usr/share/man
BINDIR := BINDIR=/sbin
LIBDIR := LIBDIR=/lib
DESTDIR := DESTDIR=$(CURDIR)/debian/iptables
KERNEL_DIR := KERNEL_DIR=$(BUILD_DIR)/$(KERNEL)

BUILD_VARS := $(LIBDIR) $(KERNEL_DIR)
INSTALL_VARS := $(DESTDIR) $(MANDIR) $(LIBDIR) $(BINDIR) $(KERNEL_DIR)
BUILD_TARGETS := all ip6tables-save ip6tables-restore iptables.8 ip6tables.8 

build_howtos := $(foreach howto,$(wildcard $(CURDIR)/howtos/*.sgml),sgml2html $(howto);) 

manregex := $(SHELL) $(CURDIR)/scripts/manregex
MAN_PAGES := $(SRC_DIR)/*.8 

prep: $(STAMP_DIR)/prep
$(STAMP_DIR)/prep:
	install -d $(STAMP_DIR)
	cp -a iptables $(BUILD_DIR)/$(IPTABLES)
	cp -a linux $(BUILD_DIR)/$(KERNEL)
	touch $@

howtos: $(STAMP_DIR)/howtos
$(STAMP_DIR)/howtos:
	install -d $(DOCS_DIR)
	cd $(DOCS_DIR); $(build_howtos)
	touch $@

build: prep howtos
	dh_testdir

	$(MAKE) -C $(SRC_DIR) $(BUILD_TARGETS) $(BUILD_VARS)
	
	$(manregex) $(MAN_PAGES) 

	cd $(SRC_DIR); ar rcs libiptables.a iptables.o
	cd $(SRC_DIR); ar rcs libip6tables.a ip6tables.o

clean:
	dh_testdir
	rm -rf $(BUILD_DIR)
	dh_clean

install: build
	dh_testdir
	dh_testroot

	$(MAKE) -C $(SRC_DIR) install $(INSTALL_VARS)
	install -m0644 -D $(CURDIR)/debian/iptables.lintian \
		$(CURDIR)/debian/iptables/usr/share/lintian/overrides/iptables

binary-indep: build install

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_install
	dh_installdocs
	dh_installchangelogs
	dh_strip
	dh_compress
	dh_fixperms
	dh_shlibdeps -X.so
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: prep howtos build clean binary-indep binary-arch binary install