~ubuntu-branches/ubuntu/jaunty/gnupg2/jaunty

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Urlichs
  • Date: 2005-04-07 10:13:19 UTC
  • Revision ID: james.westby@ubuntu.com-20050407101319-rgc8m274vudkrfb9
Tags: 1.9.15-6
* Move gpg-protect-tool to the gpgsm package.
  Closes: #303492.
  High urgency because this renders gpgsm unuseable for some people.
* gpg-agent: Override max-cache-ttl if a higher default is set.
  Closes: #302692.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# debian/rules file - for GNUPG (1.9)
 
3
# Copyright 1994,1995 by Ian Jackson.
 
4
# Copyright 1998-2003 by James Troup.
 
5
# Copyright 2003-2004 by Matthias Urlichs.
 
6
 
7
# I hereby give you perpetual unlimited permission to copy,
 
8
# modify and relicense this file, provided that you do not remove
 
9
# my name from the file itself.  (I assert my moral right of
 
10
# paternity under the Copyright, Designs and Patents Act 1988.)
 
11
# This file may have to be extensively modified
 
12
 
 
13
CFLAGS=-Wall -g
 
14
 
 
15
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
16
        CFLAGS += -O0
 
17
else
 
18
        CFLAGS += -O2
 
19
endif
 
20
 
 
21
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 
22
        INSTALL_PROGRAM += -s
 
23
endif
 
24
 
 
25
install_dir=install -d -m 755
 
26
install_file=install -m 644
 
27
install_script=install -m 755
 
28
install_binary=install -m 755 -s
 
29
 
 
30
config: config-stamp
 
31
config-stamp: configure
 
32
        dh_testdir
 
33
        chmod +x configure
 
34
        env CFLAGS="$(CFLAGS)" \
 
35
        ./configure --enable-maintainer-mode \
 
36
                --prefix=/usr --libexecdir=/usr/lib/ --with-included-gettext \
 
37
                --with-zlib=/usr --infodir=/usr/share/info/
 
38
        touch config-stamp
 
39
 
 
40
build: build-stamp
 
41
build-stamp: config
 
42
        $(MAKE)
 
43
        $(MAKE) -C doc
 
44
        touch build-stamp
 
45
 
 
46
test: test-stamp
 
47
test-stamp: build-stamp
 
48
        dh_testdir
 
49
        # XXX run the actual tests here!
 
50
        touch test-stamp
 
51
 
 
52
clean:
 
53
        dh_testdir
 
54
        -rm -f config-stamp build-stamp test-stamp
 
55
        -$(MAKE) -i distclean || $(MAKE) -f Makefile.in distclean
 
56
 
 
57
        # make distclean does not remove newly generated binary gmo files
 
58
        rm -f po/*.gmo
 
59
 
 
60
        dh_clean
 
61
 
 
62
        -test -r /usr/share/misc/config.sub && \
 
63
                cp -f /usr/share/misc/config.sub config.sub
 
64
        -test -r /usr/share/misc/config.guess && \
 
65
                cp -f /usr/share/misc/config.guess config.guess
 
66
 
 
67
        -if test -f aclocal.m4 ; then touch aclocal.m4; else aclocal-1.7 -I m4; fi
 
68
        -if test -f config.h.in ; then touch config.h.in; else autoheader; fi
 
69
        -if test -f Makefile.in ; then find . -name Makefile.in -exec touch {} \; ;\
 
70
                else automake-1.7 --copy --add-missing; fi
 
71
 
 
72
        -if test -f configure ; then touch configure; else autoconf; fi
 
73
        -rm -rf autom4te.cache
 
74
 
 
75
        -if test -f version ; then touch version; else \
 
76
                dpkg-parsechangelog | sed -ne 's/^Version:[     ]*//p' > version; fi
 
77
 
 
78
 
 
79
binary-common:
 
80
        dh_testdir
 
81
        dh_testroot
 
82
        dh_clean -k
 
83
 
 
84
        dh_installdirs
 
85
 
 
86
        for i in */ChangeLog; do \
 
87
                $(install_file) $$i debian/gnupg2/usr/share/doc/gnupg2/changelog.$$(dirname $$i); done
 
88
        mv debian/gnupg2/usr/share/doc/gnupg2/changelog.agent debian/gnupg-agent/usr/share/doc/gnupg-agent/changelog
 
89
        mv debian/gnupg2/usr/share/doc/gnupg2/changelog.sm debian/gpgsm/usr/share/doc/gpgsm/changelog
 
90
        ln -s changelog.g10.gz debian/gnupg2/usr/share/doc/gnupg2/changelog.gz
 
91
 
 
92
 
 
93
binary-indep: binary-common
 
94
 
 
95
#       mkdir -p debian/tmp/usr/share/info
 
96
#       cp doc/gnupg.info debian/tmp/usr/share/info/gnupg2.info
 
97
#       cd debian/tmp/usr/share/info; mv gnupg.info gnupg2.info
 
98
#       dh_installinfo -i debian/tmp/usr/share/info/gnupg2.info
 
99
 
 
100
# turned off 'cause there is no -doc package
 
101
#       dh_movefiles -i
 
102
#
 
103
#       dh_installdocs -i README NEWS THANKS TODO
 
104
#       dh_installinfo -i debian/tmp/usr/share/info/gnupg2.info
 
105
#       dh_installchangelogs -i
 
106
#
 
107
#       dh_strip -i
 
108
#       dh_compress -i
 
109
#       dh_fixperms -i
 
110
#
 
111
#       dh_makeshlibs -i
 
112
#       dh_installdeb -i
 
113
#       dh_shlibdeps -i
 
114
#       dh_gencontrol -i
 
115
#       dh_md5sums -i
 
116
#       dh_builddeb -i
 
117
 
 
118
binary-arch:    build test binary-common
 
119
        $(MAKE) DESTDIR=`pwd`/debian/tmp libexecdir=/usr/lib/gnupg2 pkglibdir=/usr/lib/gnupg2 pkgdatadir=/usr/share/gnupg2 install
 
120
        # shouldn't be here; it's a symlink to /etc/locale.alias in Debian
 
121
        -rm -f debian/tmp/usr/share/locale/locale.alias
 
122
 
 
123
# Now move the gnupg2 stuff to /usr/{share,lib}/gnupg2
 
124
        mkdir -p debian/tmp/usr/lib/gnupg
 
125
        mv debian/tmp/usr/lib/gnupg2/pcsc-wrapper debian/tmp/usr/lib/gnupg/
 
126
        mv debian/tmp/usr/lib/gnupg2/gpg-protect-tool debian/tmp/usr/lib/
 
127
 
 
128
        dh_movefiles -a
 
129
 
 
130
        dh_installdocs -a README NEWS THANKS TODO
 
131
        dh_installchangelogs -a
 
132
 
 
133
        $(install_dir) debian/gnupg2/usr/share/lintian/overrides/
 
134
        $(install_file) debian/gnupg2.lintian debian/gnupg2/usr/share/lintian/overrides/gnupg2
 
135
        $(install_file) debian/gpgsm.lintian debian/gpgsm/usr/share/lintian/overrides/gpgsm
 
136
        $(install_file) debian/gnupg-agent.lintian debian/gnupg-agent/usr/share/lintian/overrides/gnupg-agent
 
137
        $(install_file) debian/gnupg-agent.xsession debian/gnupg-agent/etc/X11/Xsession.d/90gpg-agent
 
138
 
 
139
        dh_strip -a
 
140
        dh_compress -a
 
141
        dh_fixperms -a
 
142
 
 
143
        #chmod 4755 debian/gnupg2/usr/bin/gpgv2 debian/gnupg2/usr/bin/gpg2
 
144
        #chmod 4755 debian/gnupg-agent/usr/bin/gpg-agent debian/gpgsm/usr/bin/gpgsm
 
145
 
 
146
        dh_makeshlibs -a
 
147
        dh_installdeb -a
 
148
        dh_shlibdeps -a
 
149
        dh_gencontrol -a
 
150
        dh_md5sums -a
 
151
        dh_builddeb -a
 
152
 
 
153
# Below here is fairly generic really
 
154
 
 
155
binary:         binary-indep binary-arch
 
156
 
 
157
.PHONY: binary binary-arch binary-indep clean test build binary-common