~ubuntu-branches/ubuntu/lucid/loop-aes-utils/lucid-security

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Max Vozeler
  • Date: 2008-08-22 11:57:17 UTC
  • mfrom: (8.1.3 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080822115717-v8wfa8pxwlfvyje0
Tags: 2.13.1-4
* patches/losetup_add_option_f.dpatch: 
  - Added to support "find next free loop" in losetup.
    (closes: #495682)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# Uncomment this to turn on verbose mode.
3
3
#export DH_VERBOSE=1
4
4
 
 
5
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
6
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
7
DEB_HOST_ARCH_OS    ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 
8
 
 
9
debbuild = debian/build-deb
 
10
udebbuild = debian/build-udeb
 
11
 
5
12
CFLAGS = -Wall -g
6
13
 
7
 
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
8
 
        CFLAGS += -O0
 
14
confopts = --with-fsprobe=blkid
 
15
ifeq ($(DEB_HOST_ARCH_OS),linux)
 
16
  confopts += --with-selinux
 
17
endif
 
18
 
 
19
confopts_udeb = --with-fsprobe=blkid
 
20
 
 
21
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
 
22
  confbuild += --build $(DEB_HOST_GNU_TYPE)
9
23
else
10
 
        CFLAGS += -O2
 
24
  confbuild += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
11
25
endif
12
26
 
13
 
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
14
 
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
15
 
 
16
 
config-stamp: patch-stamp configure
17
 
        dh_testdir
18
 
        ./configure
19
 
        touch config-stamp
20
 
 
21
 
build: build-stamp
22
 
build-stamp: config-stamp
23
 
        dh_testdir
24
 
        $(MAKE) SUBDIRS="lib mount"
25
 
        touch build-stamp
 
27
build: build-deb build-udeb
 
28
 
 
29
$(debbuild)/config.status: patch-stamp
 
30
        mkdir -p $(debbuild)
 
31
        cd $(debbuild) && \
 
32
        CFLAGS="$(CFLAGS) -O2" \
 
33
        ../../configure $(confbuild) $(confopts)
 
34
 
 
35
build-deb: build-deb-stamp
 
36
build-deb-stamp: $(debbuild)/config.status
 
37
        dh_testdir
 
38
        $(MAKE) -C $(debbuild)
 
39
        touch $@
 
40
 
 
41
$(udebbuild)/config.status: patch-stamp
 
42
        mkdir -p $(udebbuild)
 
43
        cd $(udebbuild) && \
 
44
        CFLAGS="$(CFLAGS) -Os" \
 
45
        ../../configure $(confbuild) $(confopts_udeb)
 
46
 
 
47
build-udeb: build-udeb-stamp
 
48
build-udeb-stamp: $(udebbuild)/config.status
 
49
        dh_testdir
 
50
        $(MAKE) -C $(udebbuild)
 
51
        touch $@
26
52
 
27
53
clean: clean1 unpatch
28
54
clean1:
29
55
        dh_testdir
30
56
        dh_testroot
31
 
        rm -f build-stamp config-stamp
32
 
        $(MAKE) clean
 
57
        rm -f *-stamp
 
58
        rm -rf $(debbuild) $(udebbuild)
 
59
        [ ! -f Makefile ] || $(MAKE) distclean
33
60
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
34
61
        cp -f /usr/share/misc/config.sub config.sub
35
62
endif
47
74
        dh_clean -k
48
75
        dh_installdirs
49
76
 
50
 
        install -m 4755 -o root mount/mount $(DIR)/bin
51
 
        install -m 4755 -o root mount/umount $(DIR)/bin
52
 
        install -m 755 mount/losetup $(DIR)/sbin
53
 
        install -m 755 mount/swapon $(DIR)/sbin
 
77
        install -m 4755 -o root $(debbuild)/mount/mount $(DIR)/bin
 
78
        install -m 4755 -o root $(debbuild)/mount/umount $(DIR)/bin
 
79
        install -m 755 $(debbuild)/mount/losetup $(DIR)/sbin
 
80
        install -m 755 $(debbuild)/mount/swapon $(DIR)/sbin
54
81
        install -m 755 debian/loop-aes-keygen $(DIR)/usr/bin
55
82
 
56
83
        # lintian-override
59
86
        # udeb
60
87
        install -d $(DIR_UDEB)/bin
61
88
        install -d $(DIR_UDEB)/sbin
62
 
        install -m 755 mount/mount $(DIR_UDEB)/bin/mount-aes
63
 
        install -m 755 mount/umount $(DIR_UDEB)/bin/umount-aes
64
 
        install -m 755 mount/losetup $(DIR_UDEB)/sbin/losetup-aes
65
 
        install -m 755 mount/swapon $(DIR_UDEB)/sbin/swapon-aes
 
89
        install -m 755 $(udebbuild)/mount/mount $(DIR_UDEB)/bin/mount-aes
 
90
        install -m 755 $(udebbuild)/mount/umount $(DIR_UDEB)/bin/umount-aes
 
91
        install -m 755 $(udebbuild)/mount/losetup $(DIR_UDEB)/sbin/losetup-aes
 
92
        install -m 755 $(udebbuild)/mount/swapon $(DIR_UDEB)/sbin/swapon-aes
66
93
        install -m 755 debian/loop-aes-keygen $(DIR_UDEB)/bin
 
94
 
67
95
        # initramsfs-tools integration
68
 
        #install -m 755 debian/initramfs-tools-script $(DIR)/usr/share/initramfs-tools/scripts/local-top/loopaes
69
 
        #install -m 755 debian/initramfs-tools-hook $(DIR)/usr/share/initramfs-tools/hooks/loopaes
 
96
        install -m 755 debian/initramfs/script $(DIR)/usr/share/initramfs-tools/scripts/local-top/loopaes
 
97
        install -m 755 debian/initramfs/hook $(DIR)/usr/share/initramfs-tools/hooks/loopaes
 
98
        install -m 644 debian/initramfs/conf $(DIR)/usr/share/initramfs-tools/conf.d/loopaes
70
99
 
71
100
binary-indep: build install
72
101
 
73
102
binary-arch: build install
74
103
        dh_testdir
75
104
        dh_testroot
76
 
        dh_installchangelogs HISTORY
 
105
        dh_installchangelogs docs/v2.13-ReleaseNotes
77
106
        dh_installdocs debian/README
78
107
        dh_installman -A
79
108
        dh_installinit --name=checkfs-loop --no-start -- start 28 S .