~ubuntu-branches/ubuntu/jaunty/mailcrypt/jaunty

« back to all changes in this revision

Viewing changes to debian/rules.in

  • Committer: Bazaar Package Importer
  • Author(s): Davide G. M. Salvetti
  • Date: 2007-01-28 12:08:23 UTC
  • mfrom: (2.1.5 edgy)
  • Revision ID: james.westby@ubuntu.com-20070128120823-344fs3vl88wzbpya
Tags: 3.5.8+CVS.2005.04.29.1-10
* po/cs.po: New file; thanks to Martin Šín.  (Closes: #382926)
* po/de.po: Updated file; thanks to Helge Kreutzmann.  (Closes: #407728)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include "variables"
2
 
<:##############################################################################:>//
3
 
<:# WARNING: The rules file AUTOMATICALLY REGENERATE itself from this very one #:>//
4
 
<:#     Read the GNU Make Manual if you don't understand Makefile Remaking!    #:>//
5
 
<:##############################################################################:>//
6
2
#! /usr/bin/make -f
7
3
#
8
 
# BEWARE: The rules file is AUTOMATICALLY GENERATED from rules.in
9
 
#
10
 
# rules file for Debian <:=$PACKAGE:> package.
11
 
# $Id: rules.in,v 1.11 2002/09/01 15:08:41 salve Exp $
 
4
# rules for <:=${PACKAGE}:>
12
5
#
13
6
<:=@COPYRIGHT:>//
14
7
 
15
 
tmp     := $(shell pwd)/debian/tmp/
16
 
 
17
 
SHELL           := /bin/bash
18
 
INSTDIR         := install -m 755 -d
19
 
INSTPROG        := install -m 755 -s
20
 
INSTDATA        := install -m 644
21
 
INSTSCRIPT      := install -m 755
22
 
 
23
 
DFILES  :=      debian/README debian/config debian/copyright debian/docbase \
24
 
                debian/install debian/preinst debian/postinst debian/prerm \
25
 
                debian/postrm debian/remove debian/templates
26
 
# WARNING: debian/rules SHOULD NOT be in $(DFILES), for Debian policy
27
 
# (it's CVS registered), lest it will be deleted by clean.
28
 
# Beside, it's automatically remade by make
29
 
 
30
 
debian/system.variables: /home/salve/Debian/Packages/system.variables
31
 
        $(INSTDATA) $< $@
 
8
checkdir=test -f debian/rules
 
9
checkroot=test root = "$$(whoami)"
 
10
fixperms=chmod -R a+rX .
 
11
 
 
12
tmp := $(shell pwd)/debian/tmp/
 
13
 
 
14
SHELL := /bin/bash
 
15
INSTDIR := install -m 755 -d
 
16
INSTPROG := install -m 755 -s
 
17
INSTDATA := install -m 644
 
18
INSTSCRIPT := install -m 755
 
19
STRIP := strip -R .note -R .comment
 
20
 
 
21
<:# DO NOT include <% debian/rules %> or <% debian/templates %> :>//
 
22
DFILES := debian/README debian/copyright \
 
23
debian/config debian/postinst debian/prerm debian/postrm \
 
24
debian/docbase debian/lintian \
 
25
debian/bug.presubj debian/bug.script \
 
26
debian/install debian/remove
 
27
 
 
28
<:# <% Debconf %> templates :>//
 
29
DCSOURCES := $(shell cat debian/po/POTFILES.in \
 
30
                | perl -pe 's|^\[[^]]+\] +(.*)$$|debian/$${1}|')
 
31
DFILES += $(patsubst %templates, %templates.dcobj, $(DCSOURCES))
 
32
 
 
33
SCRIPTS := configure install-sh
 
34
SOURCES := *.in *.el load-path.hack
 
35
<:# Hacks needed by configure. :>//
 
36
MAKEFILEHACKS := tests/Makefile.in tests/remailer/Makefile.in
 
37
 
 
38
.PHONY: pre-build
 
39
pre-build:
 
40
        autoconf || true
32
41
 
33
42
debian/rules: debian/variables
34
43
 
35
 
# Eperl is simply great: thanks, Ralf!
36
 
% :: %.in
37
 
        eperl -P -o $@ $<
 
44
<:# Eperl is simply great: thanks, Ralf! :>//
 
45
%:: %.in
 
46
        eperl -d DEBIAN_DIR="$(shell pwd)/debian/" \
 
47
                -I "$(shell pwd)/debian/" -P -o $@ $<
 
48
 
 
49
debian/po/templates.pot: $(DCSOURCES)
 
50
        umask 0022 && debconf-updatepo --verbose --podir=debian/po/
 
51
        @touch $@
 
52
 
 
53
%.dcobj: % debian/po/templates.pot
 
54
        po2debconf --verbose --podir debian/po $< > $@
38
55
 
39
56
build: $(DFILES)
40
57
        $(checkdir)
41
 
        ./configure
 
58
        chmod a+x ./configure;  <:# next upstream release remove me :>//
 
59
        ./configure --infodir=<:=${info}:>
42
60
        $(MAKE) MAKEINFO="makeinfo --verbose" \
43
 
                TEXI2HTML="texi2html -verbose" \
 
61
                TEXI2HTML="texi2html --Verbose" \
44
62
                info html
45
63
        touch build
46
64
 
 
65
.PHONY: clean
47
66
clean:
48
67
        $(checkdir)
49
 
        -rm -rf build core trashcan $(tmp) debian/files* debian/substvars
50
 
        -rm -f  $(DFILES)
 
68
        -rm -rf build core $(tmp) debian/{files*,substvars}
 
69
        -rm -f debian/po/updatepo
51
70
        -$(MAKE) distclean
52
 
 
53
 
binary: binary-indep binary-arch
54
 
 
55
 
binary-arch: checkroot build
56
 
        $(checkdir)
57
 
 
58
 
binary-indep: checkroot build
59
 
        $(checkdir)
 
71
        -rm -f $(DFILES)
 
72
        $(fixperms)
 
73
 
 
74
.PHONY: binary
 
75
binary: binary-arch binary-indep
 
76
 
 
77
.PHONY: binary-indep
 
78
binary-indep: build
 
79
        $(checkdir)
 
80
        $(checkroot)
60
81
        -rm -rf $(tmp)
61
82
 
62
 
#       install package
63
 
        $(INSTDIR) $(tmp)/<:=$info:> $(tmp)/<:=$lisp:>
64
 
        $(INSTDATA) <:=$SOURCES:> $(tmp)/<:=$lisp:>
65
 
        $(INSTDATA) <:=$INFOS:> $(tmp)/<:=$info:>
66
 
        gzip -9frv $(tmp)/<:=$info:>
67
 
 
68
 
#       install Debian doc
69
 
        $(INSTDIR) $(tmp)/<:=$doc:> $(tmp)/<:=$html:>
70
 
        $(INSTDATA) <:=$DOCS:> $(tmp)/<:=$doc:>
71
 
        $(INSTDATA) debian/README $(tmp)/<:=$doc:>/README.Debian
72
 
        $(INSTDATA) ChangeLog $(tmp)/<:=$doc:>
73
 
        $(INSTDATA) debian/changelog $(tmp)/<:=$doc:>/changelog.Debian
74
 
        gzip -9frv $(tmp)/<:=$doc:>
75
 
        ln -sf ChangeLog.gz $(tmp)/<:=$doc:>/changelog.gz
76
 
        $(INSTDATA) debian/copyright $(tmp)/<:=$doc:>
77
 
        $(INSTDATA) <:=$HTMLS:> $(tmp)/<:=$html:>
78
 
        ln -snf mailcrypt_toc.html $(tmp)/<:=$html:>/index.html
79
 
 
80
 
#       install Debian system files
81
 
        $(INSTDIR) $(tmp)/<:=$ecode:>/{install,remove} $(tmp)/<:=$docbase:>
82
 
        $(INSTDATA) debian/<:=$PACKAGE:>-init.el $(tmp)/<:=$lisp:>/../
83
 
        $(INSTDATA) debian/docbase $(tmp)/<:=$docbase:>/<:=$PACKAGE:>
84
 
        $(INSTSCRIPT) debian/install $(tmp)/<:=$ecode:>/install/<:=$PACKAGE:>
85
 
        $(INSTSCRIPT) debian/remove $(tmp)/<:=$ecode:>/remove/<:=$PACKAGE:>
86
 
 
87
 
#       install Debian control files
88
 
        $(INSTDIR) $(tmp)/<:=$debian:>
89
 
        $(INSTDATA) debian/templates $(tmp)/<:=$debian:>
90
 
        $(INSTSCRIPT) debian/{config,preinst,postinst,prerm,postrm} $(tmp)/<:=$debian:>
91
 
 
92
 
#       standard stuff
93
 
#-#     cd $(tmp) && du -k * | grep -v 'DEBIAN' | sort -k 2 -o $(tmp)/<:=$debian:>/du
 
83
<:# install package :>//
 
84
        $(INSTDIR) $(tmp)/<:=${lisp}:>
 
85
        $(INSTDATA) debian/<:=${PACKAGE}:>-init.el $(tmp)/<:=${lisp}:>/../
 
86
        $(INSTSCRIPT) $(SCRIPTS) $(tmp)/<:=${lisp}:>/
 
87
        $(INSTDATA) $(SOURCES) $(tmp)/<:=${lisp}:>/
 
88
        umask 0022; for i in $(MAKEFILEHACKS); do \
 
89
                $(INSTDIR) $(tmp)/<:=${lisp}:>/$${i%/*}/; \
 
90
                echo -e "clean distclean:\n\trm -f Makefile\n" \
 
91
                        > $(tmp)/<:=${lisp}:>/$${i}; \
 
92
        done
 
93
        $(INSTDIR) $(tmp)/<:=${info}:>
 
94
        umask 0022; echo -e "\nFile: dir\tNode: Top\tTop\n" \
 
95
                > $(tmp)/<:=${info}:>/dir
 
96
        $(MAKE) INSTALL_INFO="/usr/sbin/install-info" \
 
97
                install-info infodir=$(tmp)/<:=${info}:> \
 
98
                && rm $(tmp)/<:=${info}:>/dir{,.old}
 
99
        gzip -9frv $(tmp)/<:=${info}:>
 
100
 
 
101
<:# install Debian doc :>//
 
102
        $(INSTDIR) $(tmp)/<:=${doc}:> $(tmp)/<:=${docsrc}:> \
 
103
                $(tmp)/<:=${html}:>
 
104
        $(INSTDATA) <:=${DOCS}:> $(tmp)/<:=$doc:>
 
105
        $(INSTDATA) <:=${DOCSRCS}:> $(tmp)/<:=${docsrc}:>
 
106
        $(INSTDATA) debian/README $(tmp)/<:=${doc}:>/README.Debian
 
107
        $(INSTDATA) ChangeLog $(tmp)/<:=${doc}:>
 
108
        $(INSTDATA) debian/changelog $(tmp)/<:=${doc}:>/changelog.Debian
 
109
        gzip -9frv $(tmp)/<:=${doc}:>
 
110
        ln -sf ChangeLog.gz $(tmp)/<:=${doc}:>/changelog.gz
 
111
        $(INSTDATA) debian/copyright $(tmp)/<:=${doc}:>
 
112
        $(INSTDATA) htmls/*.html $(tmp)/<:=${html}:>
 
113
        ln -snf mailcrypt_toc.html $(tmp)/<:=${html}:>/index.html
 
114
 
 
115
<:# install Debian system files :>//
 
116
        $(INSTDIR) $(tmp)/<:=${ecode}:>/{install,remove}
 
117
        $(INSTSCRIPT) debian/install \
 
118
                $(tmp)/<:=${ecode}:>/install/<:=${PACKAGE}:>
 
119
        $(INSTSCRIPT) debian/remove \
 
120
                $(tmp)/<:=${ecode}:>/remove/<:=${PACKAGE}:>
 
121
        $(INSTDIR) $(tmp)/<:=${docbase}:>
 
122
        $(INSTDATA) debian/docbase $(tmp)/<:=${docbase}:>/<:=${PACKAGE}:>
 
123
        $(INSTDIR) $(tmp)/<:=${bug}:>
 
124
        $(INSTDATA) debian/bug.presubj $(tmp)/<:=${bug}:>/presubj
 
125
        $(INSTSCRIPT) debian/bug.script $(tmp)/<:=${bug}:>/script
 
126
        $(INSTDIR) $(tmp)/<:=${lintian}:>
 
127
        $(INSTDATA) debian/lintian $(tmp)/<:=${lintian}:>/<:=${PACKAGE}:>
 
128
 
 
129
<:# install Debian control files :>//
 
130
        $(INSTDIR) $(tmp)/<:=${debian}:>
 
131
        $(INSTDATA) debian/templates.dcobj \
 
132
                $(tmp)/<:=${debian}:>/templates
 
133
        $(INSTSCRIPT) debian/{config,postinst,postrm,prerm} \
 
134
                $(tmp)/<:=${debian}:>
 
135
 
 
136
<:# standard stuff :>//
94
137
        cd $(tmp) && md5sum \
95
 
                $$(find ./ -path './DEBIAN' -prune -o -type f -printf "%P\n") \
96
 
                | sort -k 2 -o $(tmp)/<:=$debian:>/md5sums
 
138
                $$(find ./ -path './DEBIAN' -prune \
 
139
                -o -type f -printf "%P\n") \
 
140
                | sort -k 2 -o $(tmp)/<:=${debian}:>/md5sums
97
141
        dpkg-gencontrol -isp
98
142
        chown -R root.root $(tmp)
99
143
        chmod -R go=rX $(tmp)
100
144
        dpkg --build $(tmp) ..
101
145
 
102
 
checkdir = test -f debian/rules
103
 
 
104
 
checkroot:
 
146
.PHONY: binary-arch
 
147
binary-arch: build
105
148
        $(checkdir)
106
 
        test root = "$$(whoami)"
107
 
 
 
149
        $(checkroot)
 
150
 
 
151
.PHONY: build-package
 
152
build-package:
 
153
        dpkg-buildpackage -rfakeroot -tc -i
 
154
 
 
155
.PHONY: source diff
108
156
source diff:
109
157
        @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
110
158
 
111
 
.PHONY: binary binary-arch binary-indep clean checkroot
 
159
# arch-tag: 7f6799c7-dca1-4d84-8038-1ad9c2888751<:='-child':>
112
160
<:
113
161
# local variables:
114
162
# mode: makefile
 
163
# coding: utf-8
 
164
# ispell-local-dictionary: "american"
 
165
# ispell-check-comments: exclusive
115
166
# end:
 
167
#
 
168
# LocalWords:  Eperl Ralf
116
169
:>//