~siretart/cryptsetup/debian

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Reinhard Tartler
  • Date: 2008-06-13 19:34:53 UTC
  • Revision ID: siretart@tauware.de-20080613193453-ywl35m67ce8pzvp3
import cryptsetup_1.0.6-1.dsc

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
        INSTALL_PROGRAM += -s
27
27
endif
28
28
 
29
 
CRYPTSETUP_UDEB=cryptsetup-udeb
30
 
 
31
 
UDEBNAME=$(CRYPTSETUP_UDEB)_$(DEBVERSION)_$(shell dpkg --print-architecture).udeb
32
 
 
33
 
# Include dpatch stuff.
34
 
include /usr/share/dpatch/dpatch.make
35
 
 
36
 
config.status: configure.in patch
 
29
# Include quilt stuff.
 
30
include /usr/share/quilt/quilt.make
 
31
 
 
32
configure: configure-stamp
 
33
configure-stamp: $(QUILT_STAMPFN)
37
34
        dh_testdir
38
35
        find -xtype f ! -name manifest > manifest
39
 
 
40
36
        # mini autogen.sh
41
37
        rm -f ltmain.sh
42
38
        cp /usr/share/libtool/ltmain.sh ltmain.sh
45
41
        autoheader
46
42
        automake-1.9 --add-missing --gnu
47
43
        autoconf
48
 
        
49
44
        CFLAGS="$(CFLAGS)" ./configure $(confflags) \
50
45
                --prefix=/usr \
51
46
                --sbindir=/sbin \
52
47
                --mandir=/usr/share/man
53
48
                #--enable-static \
54
 
        
55
49
        find -xtype f > manifest.new
56
50
        diff manifest manifest.new | grep '>' | cut -b3- > config.mess
 
51
        touch $@
57
52
 
58
53
build: build-stamp
59
 
 
60
 
build-stamp: config.status
 
54
build-stamp: configure-stamp
61
55
        dh_testdir
62
56
        asciidoc -d manpage -b docbook debian/crypttab.5.txt
63
57
        asciidoc -d manpage -b docbook debian/cryptdisks_start.8.txt
77
71
        # cannot depend on libraries in /usr !
78
72
        gcc lib/.libs/*.o src/*.o luks/.libs/*.o -o src/cryptsetup.static \
79
73
                -lpopt -ldevmapper -luuid /usr/lib/libgcrypt.a /usr/lib/libgpg-error.a
80
 
        touch build-stamp
81
 
 
82
 
clean: clean-patched unpatch
83
 
 
84
 
clean-patched:
 
74
        gcc debian/askpass.c -o debian/askpass
 
75
        touch $@
 
76
 
 
77
clean: unpatch
85
78
        dh_testdir
86
79
        dh_testroot
87
 
        rm -f build-stamp 
88
 
 
89
80
        if test -f Makefile; then $(MAKE) clean; fi
90
81
        if test -f config.mess; then rm -f `cat config.mess`; fi
91
 
 
92
82
        rm -f debian/crypttab.5 debian/crypttab.5.xml debian/luksformat.8
93
83
        rm -f debian/cryptdisks_start.8 debian/cryptdisks_start.8.xml
94
84
        rm -f debian/cryptdisks_stop.8 debian/cryptdisks_stop.8.xml
 
85
        rm -f debian/askpass
95
86
        rm -f config.mess
96
87
        rm -rf autom4te.cache 
97
88
        rm -f src/cryptsetup.static
98
 
 
99
 
        dh_clean 
100
 
 
101
 
install: build
 
89
        dh_clean configure-stamp build-stamp install-stamp
 
90
 
 
91
install: install-stamp
 
92
install-stamp: build-stamp
102
93
        dh_testdir
103
94
        dh_testroot
104
 
        dh_clean -a -k
 
95
        dh_clean
105
96
        dh_installdirs
106
97
        mkdir -p $(CURDIR)/debian/cryptsetup-udeb/
107
 
 
108
98
        $(MAKE) DESTDIR=$(CURDIR)/debian/cryptsetup install
109
99
        cp src/cryptsetup.static $(CURDIR)/debian/cryptsetup/sbin/cryptsetup
110
 
 
111
100
        install -m 0644 debian/cryptdisks.functions $(CURDIR)/debian/cryptsetup/lib/cryptsetup/
112
101
        install -m 0755 debian/checks/* $(CURDIR)/debian/cryptsetup/lib/cryptsetup/checks/
113
102
        install -m 0755 debian/scripts/luksformat $(CURDIR)/debian/cryptsetup/usr/sbin/
129
118
        install -m 0755 debian/initramfs/cryptopensc-script-local-bottom \
130
119
                $(CURDIR)/debian/cryptsetup/usr/share/initramfs-tools/scripts/local-bottom/cryptopensc
131
120
        install -m 0644 debian/bash_completion $(CURDIR)/debian/cryptsetup/etc/bash_completion.d/cryptsetup
 
121
        install -m 0755 debian/askpass $(CURDIR)/debian/cryptsetup/lib/cryptsetup/askpass
132
122
        rmdir $(CURDIR)/debian/cryptsetup/usr/lib/cryptsetup
 
123
        touch $@
133
124
 
134
125
binary-indep: build install
135
126
# We have nothing to do by default.
137
128
binary-arch: build install
138
129
        dh_testdir
139
130
        dh_testroot
140
 
        dh_installchangelogs ChangeLog
141
 
        dh_installdocs
142
 
        dh_installexamples debian/scripts/gen-ssl-key debian/scripts/gen-old-ssl-key debian/usbcrypto.udev
 
131
        dh_installchangelogs -a ChangeLog
 
132
        dh_installdocs -a
 
133
        dh_installexamples -a debian/scripts/gen-ssl-key debian/scripts/gen-old-ssl-key debian/usbcrypto.udev
143
134
        dh_installinit -a --no-start --name=cryptdisks-early --update-rcd-params="start 26 S . start 59 0 6 ."
144
135
        dh_installinit -a --no-start --name=cryptdisks --update-rcd-params="start 28 S . start 48 0 6 ."
 
136
        dh_installman -a debian/crypttab.5 debian/luksformat.8 debian/cryptdisks_start.8 debian/cryptdisks_stop.8
145
137
        cp -a $(CURDIR)/debian/cryptsetup/etc $(CURDIR)/debian/cryptsetup-udeb/
146
138
        cp -a $(CURDIR)/debian/cryptsetup/lib $(CURDIR)/debian/cryptsetup-udeb/
147
139
        cp -a $(CURDIR)/debian/cryptsetup/sbin $(CURDIR)/debian/cryptsetup-udeb/
148
 
        
149
140
        # Get rid of libcryptsetup.so since it has no stable API.
150
141
        # We instead statically link the relevant code
151
142
        # into the cryptsetup executable, so the .so is not needed.
152
143
        rm -rf $(CURDIR)/debian/cryptsetup/usr/lib
153
 
 
154
 
#       dh_install
155
 
        dh_installman debian/crypttab.5 debian/luksformat.8 debian/cryptdisks_start.8 debian/cryptdisks_stop.8
156
 
        dh_link -a
157
144
        dh_strip -a
158
145
        dh_compress -a
159
146
        dh_fixperms -a
161
148
        dh_installdeb -a
162
149
        dh_shlibdeps -a
163
150
        dh_gencontrol -a
164
 
        dh_md5sums
 
151
        dh_md5sums -a
165
152
        dh_builddeb -a
166
153
 
167
154
binary: binary-indep binary-arch
168
 
 
169
 
.PHONY: build clean clean-patched install binary-indep binary-arch binary patch unpatch
 
155
.PHONY: configure build clean install binary-indep binary-arch binary patch unpatch