~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# debian/rules for Free Pascal
3
3
 
4
4
# Documentation type to use pdf/html
5
 
DOCTYPE=pdf
 
5
DOCTYPE=html
 
6
# HTML Converter l2h/4ht/hevea or html for (default)
 
7
CONVERTER=hevea
6
8
 
7
9
# Detect name of new compiler, take care that debian uses amd64 instead of x86_64
8
10
CPU_SOURCE=$(subst amd64,x86_64,$(shell dpkg-architecture -qDEB_BUILD_ARCH))
45
47
PACKAGEVERSION:=$(shell head -n 1 debian/changelog | awk '{ print $$2 }' | tr -d '[()]')
46
48
FPCVERSION:=$(shell echo $(PACKAGEVERSION) | awk -F '-' '{ print $$1 }')
47
49
FPCTARGET=$(CPU_TARGET)-linux
48
 
# Get directories       
 
50
# Get directories
49
51
PWD:=$(shell pwd)
50
52
BUILD_DIR=$(PWD)/debian/build
51
53
INSTALL_DIR=$(PWD)/debian/tmp
58
60
# Create default options
59
61
BUILDOPTS=PP=$(NEWPP)
60
62
INSTALLOPTS=PP=$(NEWPP) FPCMAKE=$(NEWFPCMAKE) INSTALL_PREFIX=$(INSTALL_DIR)/usr
61
 
DOCOPTS=PDFLATEX='save_size=10000 pdflatex'
62
 
 
63
 
export DH_COMPAT=2
64
 
# export DH_VERBOSE=1
65
 
 
66
 
###################
67
 
# Clean
68
 
#
69
 
 
70
 
clean:
 
63
 
 
64
 
 
65
clean: clean-patched unpatch
 
66
 
 
67
clean-patched:
71
68
        @echo "--- Cleaning"
72
69
        dh_testdir
73
70
        dh_testroot
74
71
        rm -f build-arch-stamp install-arch-stamp arrange-arch-stamp
75
 
        rm -f build-indep-stamp install-indep-stamp
76
 
 
 
72
        rm -f build-doc-stamp install-doc-stamp
77
73
        rm -f debian-files-stamp
78
 
        rm -f debian/*.files debian/*.docs debian/*.examples debian/*.postinst debian/*.postrm
 
74
        rm -f debian/*.files debian/*.docs debian/*.examples \
 
75
              debian/*.postinst debian/*.postrm
79
76
 
80
77
        $(MAKE) compiler_distclean
81
78
        $(MAKE) rtl_distclean
84
81
        $(MAKE) fv_distclean
85
82
        $(MAKE) ide_distclean
86
83
        $(MAKE) utils_distclean
87
 
 
88
 
        $(MAKE) -C docs clean
89
 
 
 
84
        $(MAKE) -C fpcdocs clean
90
85
        -(find . -name \*.a | xargs rm)
91
 
 
92
86
        dh_clean
93
87
 
 
88
patch: patch-stamp
 
89
 
 
90
patch-stamp:
 
91
        dpatch apply-all
 
92
        touch patch-stamp
 
93
 
 
94
unpatch:
 
95
        dpatch deapply-all
 
96
        rm -rf patch-stamp debian/patched
 
97
 
94
98
# Cannot do that because the control-file is often needed after a cleanup
95
99
#       rm -f debian/control
96
100
 
97
101
 
98
 
###################
99
102
# Debian files
100
 
#
101
103
 
102
104
debian-files: debian-files-stamp
103
105
debian-files-stamp:
 
106
        $(RM) debian/control.in debian/fp-compiler.conffiles
104
107
        @echo "--- Creating debian files"
105
108
        bash debian/fixdeb debian $(FPCTARGET) $(PPNEW)
106
 
 
107
109
        touch debian-files-stamp
108
110
 
109
 
 
110
 
###################
111
111
# Arch packages
112
 
#
113
112
 
114
 
build-arch: build-arch-stamp
 
113
build-arch: patch build-arch-stamp
115
114
build-arch-stamp: debian-files-stamp
116
115
        @echo "--- Building"
117
116
        dh_testdir
125
124
        $(MAKE) packages_extra_smart $(BUILDOPTS)
126
125
        $(MAKE) ide_all $(BUILDOPTS)
127
126
        $(MAKE) utils_all $(BUILDOPTS)
128
 
 
129
127
        touch build-arch-stamp
130
128
 
131
129
 
149
147
        bash debian/moveexamples $(EXAMPLE_TEMP) $(DOC_DIR)
150
148
 
151
149
# Install man pages and RTL demos and whatsnew and readme
152
 
        $(MAKE) man_install $(INSTALLOPTS) INSTALL_PREFIX=$(INSTALL_DIR)/usr/share
153
 
        $(MAKE) demo_install $(INSTALLOPTS) INSTALL_SOURCEDIR=$(DOC_DIR)/fp-compiler
154
 
        $(MAKE) doc_install $(INSTALLOPTS) INSTALL_DOCDIR=$(DOC_DIR)/fp-compiler
 
150
        $(MAKE) -C man installman $(INSTALLOPTS) INSTALL_PREFIX=$(INSTALL_DIR)/usr/share
 
151
        $(MAKE) -C demo sourceinstall $(INSTALLOPTS) INSTALL_SOURCEDIR=$(DOC_DIR)/fp-compiler
 
152
        $(MAKE) -C doc installdoc $(INSTALLOPTS) INSTALL_DOCDIR=$(DOC_DIR)/fp-compiler
155
153
 
156
154
# Create fpc.cfg which is included as conffile
157
 
        chmod 755 compiler/utils/samplecfg 
 
155
        chmod 755 compiler/utils/samplecfg
158
156
        compiler/utils/samplecfg "/usr/lib/fpc/\$$fpcversion" $(INSTALL_DIR)/etc
159
157
        touch install-arch-stamp
160
158
 
164
162
        dh_testdir
165
163
        dh_testroot
166
164
        dh_install -a --sourcedir=debian/tmp --list-missing
167
 
 
168
165
        touch arrange-arch-stamp
169
166
 
 
167
build-indep: patch
 
168
install-indep:
170
169
 
171
 
###################
172
170
# Documentation
173
 
#
174
171
 
175
 
build-indep: build-indep-stamp
176
 
# We depend on the new fpdoc
177
 
build-indep-stamp: debian-files-stamp build-arch-stamp
 
172
build-doc: patch build-doc-stamp
 
173
build-doc-stamp: debian-files-stamp
178
174
        @echo "--- Building Documentation"
179
175
        dh_testdir
180
 
 
181
 
        $(MAKE) -C docs $(DOCTYPE) $(DOCOPTS) $(BUILDOPTS) FPDOC=$(NEWFPDOC)
182
 
 
183
 
        touch build-indep-stamp
184
 
 
185
 
 
186
 
install-indep: install-indep-stamp
187
 
install-indep-stamp: debian-files build-indep
 
176
        $(MAKE) -C fpcdocs $(CONVERTER) $(BUILDOPTS) FPDOC=$(NEWFPDOC)
 
177
        touch build-doc-stamp
 
178
 
 
179
install-doc: install-doc-stamp
 
180
install-doc-stamp: build-doc-stamp debian-files-stamp 
188
181
        @echo "--- Installing Documentation"
189
182
        dh_testdir
190
183
        dh_testroot
191
184
        dh_clean -k
192
 
 
193
 
        $(MAKE) -C docs $(DOCTYPE)install $(INSTALLOPTS) INSTALL_DOCDIR=$(INSTALL_DIR)/usr/share/doc/fp-docs
194
 
 
195
 
        touch install-indep-stamp
 
185
        $(MAKE) -C fpcdocs $(DOCTYPE)install $(INSTALLOPTS) INSTALL_DOCDIR=$(INSTALL_DIR)/usr/share/doc/fp-docs
 
186
        touch install-doc-stamp
196
187
 
197
188
 
198
189
###################
199
190
# Generic
200
 
#
201
191
 
202
192
build: build-arch build-indep
203
 
 
204
193
install: install-arch install-indep
205
 
 
206
 
binary: binary-arch binary-indep 
 
194
binary: binary-arch binary-indep
207
195
 
208
196
 
209
197
###################
210
198
# Deb building
211
 
#
212
199
 
213
 
binary-indep: build-indep install-indep debian-files
 
200
binary-indep: build-doc install-doc debian-files
214
201
        @echo "--- Building: arch-indep packages"
215
202
        dh_testdir
216
203
        dh_testroot
217
204
        dh_installdocs -i
218
205
        dh_installchangelogs -i
219
 
        dh_installchangelogs -pfp-docs logs/Changes.docs
220
206
        dh_install -i --sourcedir=debian/tmp --list-missing
221
 
        dh_compress -i -X.pdf
 
207
        dh_compress -i
222
208
        dh_fixperms -i
223
209
        dh_installdeb -i
224
210
        dh_gencontrol -i
231
217
        dh_testroot
232
218
        dh_installdocs -a
233
219
        dh_installchangelogs -a
234
 
 
235
 
        dh_installchangelogs -pfp-compiler logs/Changes.compiler
236
 
        dh_installchangelogs -pfp-units-rtl logs/Changes.rtl
237
 
        dh_installchangelogs -pfp-units-fcl logs/Changes.fcl
238
 
        dh_installchangelogs -pfp-utils logs/Changes.utils
239
 
 
240
220
        dh_installexamples -a
241
221
        dh_compress -a
242
222
        dh_fixperms -a
247
227
        dh_builddeb -a
248
228
 
249
229
 
250
 
.PHONY: build clean binary debian-files \
251
 
        build-arch install-arch binary-arch \
252
 
        binary-indep
 
230
.PHONY: build clean binary binary-arch binary-indep debian-files \
 
231
        install install-indep install-arch