~ubuntu-branches/ubuntu/warty/iptables/warty

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Laurence J. Lane
  • Date: 2004-06-15 20:38:42 UTC
  • Revision ID: james.westby@ubuntu.com-20040615203842-o4o634vwht1cix5k
Tags: 1.2.9-10
* Closes: #246037, added default logging level to man pages, requested
  by Max Vozeler. Thanks.
* conslidated all man page patches to 003-man_pages.patch.
* added 006-64_32.patch, CVS pull, Sparc64 and HPPA makefile clean up
  for 64/32-bit builds. Reported by Igor Genibel. Thanks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
 
 
3
# Unpack the source and apply patches with either of
 
4
# "make prep" or "debian/rules prep" in the top directory.
 
5
 
 
6
# Change the kernel source/header and iptables source
 
7
# versions in prep.sh in the top directory.
 
8
 
 
9
# Custom build tips: Modify and repack iptables source
 
10
# into upstream/. Account for patches/*, patch-o-matic,
 
11
# and install directives in */debian/iptables*.install.
 
12
# Alternatively, you can unpack and then modify sources
 
13
# in debian/build/, but take note that the clean target
 
14
# WILL definitely erase all of your work amd various 
 
15
# build tools call the clean target by default.
 
16
 
 
17
# source directory symlinks, see prep.sh
 
18
IPTABLES = iptables_profectio
 
19
KERNEL = kernel_profectio
 
20
 
 
21
BUILD_DIR := $(CURDIR)/debian/build
 
22
SRC_DIR := $(BUILD_DIR)/$(IPTABLES)
 
23
STAMP_DIR := $(BUILD_DIR)/stamp
 
24
 
 
25
MANDIR = MANDIR=/usr/share/man
 
26
BINDIR = BINDIR=/sbin
 
27
LIBDIR = LIBDIR=/lib
 
28
DESTDIR := DESTDIR=$(CURDIR)/debian/iptables
 
29
KERNEL_DIR := KERNEL_DIR=$(BUILD_DIR)/$(KERNEL)
 
30
 
 
31
BUILD_VARS := $(LIBDIR) $(KERNEL_DIR)
 
32
INSTALL_VARS := $(DESTDIR) $(MANDIR) $(LIBDIR) $(BINDIR) $(KERNEL_DIR)
 
33
BUILD_TARGETS = all ip6tables-save ip6tables-restore
 
34
 
 
35
prep: $(STAMP_DIR)/prep-stamp
 
36
$(STAMP_DIR)/prep-stamp:
 
37
        $(MAKE) prep
 
38
        touch $@
 
39
 
 
40
build: $(STAMP_DIR)/build-stamp
 
41
$(STAMP_DIR)/build-stamp: prep
 
42
        dh_testdir
 
43
 
 
44
        $(MAKE) -C $(SRC_DIR) $(BUILD_TARGETS) $(BUILD_VARS)
 
45
 
 
46
        cd $(SRC_DIR); ar rcs libiptables.a iptables.o
 
47
        cd $(SRC_DIR); ar rcs libip6tables.a ip6tables.o
 
48
 
 
49
        touch $@
 
50
 
 
51
clean:
 
52
        dh_testdir
 
53
        rm -rf $(BUILD_DIR)
 
54
        dh_clean
 
55
 
 
56
install: build
 
57
        dh_testdir
 
58
        dh_testroot
 
59
 
 
60
        $(MAKE) -C $(SRC_DIR) install $(INSTALL_VARS)
 
61
        rm -rf $(SRC_DIR)/include/libipulog
 
62
        install -m0644 -D $(CURDIR)/debian/iptables.lintian.override \
 
63
        $(CURDIR)/debian/iptables/usr/share/lintian/overrides/iptables
 
64
 
 
65
binary-indep: build install
 
66
 
 
67
binary-arch: build install
 
68
        dh_testdir
 
69
        dh_testroot
 
70
        dh_install
 
71
        dh_installdocs
 
72
        dh_installexamples
 
73
        dh_installchangelogs
 
74
        dh_strip
 
75
        dh_compress
 
76
        dh_fixperms
 
77
        dh_shlibdeps -X.so
 
78
        dh_installdeb
 
79
        dh_gencontrol
 
80
        dh_md5sums
 
81
        dh_builddeb
 
82
 
 
83
binary: binary-indep binary-arch
 
84
.PHONY: prep build clean binary-indep binary-arch binary install