~svn/ubuntu/oneiric/subversion/ppa

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2005-06-29 13:09:32 UTC
  • mfrom: (1.1.1 upstream) (0.1.2 sarge)
  • Revision ID: james.westby@ubuntu.com-20050629130932-vzt4595e7q8wtfqy
Tags: 1.2.0-1ubuntu1
Resynchronise with Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# Set this variable to 'yes' to build the libsvn-javahl package.
4
4
ENABLE_JAVAHL=no
5
5
 
 
6
DEB_BUILDDIR=$(PWD)/build-tree/subversion-1.2.0
 
7
 
6
8
# This is the debhelper compatability version to use.
7
9
export DH_COMPAT=3
8
10
PWD              := $(shell pwd)
26
28
                --with-neon=/usr \
27
29
                --prefix=/usr \
28
30
                --with-berkeley-db=/usr \
29
 
                --enable-debug \
30
31
                --with-editor=/usr/bin/editor \
31
32
                --with-apxs=/usr/bin/apxs2 \
32
33
                --disable-mod-activation \
33
34
                --with-swig=/usr
34
35
 
 
36
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 
37
  confflags+= --enable-debug 
 
38
endif
 
39
 
35
40
ifeq ($(ENABLE_JAVAHL), yes)
36
41
  # jikes 1.22 cannot compile javahl.
37
42
  confflags += --enable-javahl --without-jikes --with-jdk=/usr/lib/kaffe
46
51
 
47
52
TESTARCHS=
48
53
TESTARCHS+=alpha
 
54
TESTARCHS+=amd64
49
55
TESTARCHS+=arm 
50
56
TESTARCHS+=hppa 
51
57
TESTARCHS+=hurd-i386 
119
125
debian/stamp-configure: debian/stamp-autogen
120
126
        dh_testdir
121
127
 
122
 
        # Ensure config.{sub|guess} are up to date.
123
 
        rm -f $(DEB_BUILDDIR)/ac-helpers/config.sub \
124
 
                $(DEB_BUILDDIR)/ac-helpers/config.guess
125
 
        ln -s /usr/share/misc/config.sub \
126
 
                $(DEB_BUILDDIR)/ac-helpers/config.sub
127
 
        ln -s /usr/share/misc/config.guess \
128
 
                $(DEB_BUILDDIR)/ac-helpers/config.guess
129
 
 
130
128
        cd $(DEB_BUILDDIR) && ./configure \
 
129
                $(confflags) CFLAGS="-g -Wall -O2" \
 
130
 
 
131
        [ -d build-tree/23 ] || cp -a $(DEB_BUILDDIR) build-tree/23
 
132
 
 
133
        touch $@
 
134
 
 
135
debian/stamp-configure23: debian/stamp-configure
 
136
        dh_testdir
 
137
 
 
138
        cd build-tree/23 && PYTHON=/usr/bin/python2.3 ./configure \
131
139
                $(confflags) CFLAGS="-g -Wall" \
132
140
 
133
141
        touch $@
134
142
 
135
 
build: debian/stamp-build
 
143
build: debian/stamp-build debian/stamp-build23
136
144
debian/stamp-build: debian/stamp-configure
137
145
        dh_testdir
138
146
 
147
155
                javahl_javahdir=/usr/include/svn-javahl
148
156
endif
149
157
 
150
 
        # In Bug #220107 it was pointed out that libsvn_swig_py isn't
151
 
        # linked in a pre-link friendly way.  The ideal would be to find 
152
 
        # a clean patch to the upstream build system but this will have to 
153
 
        # do for now.
154
 
        rm $(DEB_BUILDDIR)/subversion/bindings/swig/$(LIBSVN_SWIG_PY)
155
 
        $(MAKE) subversion/bindings/swig/$(LIBSVN_SWIG_PY) \
156
 
                EXTRA_LDFLAGS="-lpython$(PYTHON_VER) -lswigpy-$(SWIG_VER)" \
157
 
                -C $(DEB_BUILDDIR)
158
 
 
159
 
        touch $@
 
158
        touch $@
 
159
 
 
160
debian/stamp-build23: debian/stamp-configure23
 
161
        dh_testdir
 
162
 
 
163
        $(MAKE) -C build-tree/23 all swig-py \
 
164
                swig_pydir=/usr/lib/python2.3/site-packages/libsvn \
 
165
                swig_pydir_extra=/usr/lib/python2.3/site-packages/svn
 
166
 
 
167
        touch $@
 
168
 
160
169
 
161
170
clean:: debian/control cleanbuilddir
162
171
        dh_testdir
164
173
        dh_clean
165
174
        $(MAKE) -C debian/tools clean
166
175
        rm -f debian/stamp-*
 
176
        rm -rf debian/tmp2.3
167
177
 
168
178
install: build
169
179
        dh_testdir
177
187
                swig_pydir=/usr/lib/python$(PYTHON_VER)/site-packages/libsvn \
178
188
                swig_pydir_extra=/usr/lib/python$(PYTHON_VER)/site-packages/svn \
179
189
                -C $(DEB_BUILDDIR)
 
190
        rm -f debian/tmp/usr/lib/python$(PYTHON_VER)/site-packages/libsvn/*.*a
180
191
 
181
192
ifeq ($(ENABLE_JAVAHL), yes)
182
193
        $(MAKE) -C $(DEB_BUILDDIR) install-javahl \
186
197
                javahl_javahdir=/usr/include/svn-javahl
187
198
endif
188
199
 
 
200
        rm -rf debian/tmp2.3
 
201
        mkdir -p debian/tmp2.3
 
202
        $(MAKE) local-install install-swig-py \
 
203
                INSTALL_MOD_SHARED=echo \
 
204
                DESTDIR=$(PWD)/debian/tmp2.3 \
 
205
                swig_pydir=/usr/lib/python2.3/site-packages/libsvn \
 
206
                swig_pydir_extra=/usr/lib/python2.3/site-packages/svn \
 
207
                -C build-tree/23
 
208
        rm -f debian/tmp2.3/usr/lib/python2.3/site-packages/libsvn/*.*a
 
209
        mkdir -p debian/python2.3-subversion/usr/lib
 
210
        mv debian/tmp2.3/usr/lib/python2.3 debian/python2.3-subversion/usr/lib/
 
211
 
189
212
        # Create our default configuration files to be installed in
190
213
        # /etc/subversion/
191
 
        $(MAKE) -C debian/tools DEB_SRCDIR=$(PWD)/$(DEB_SRCDIR) \
 
214
        $(MAKE) -C debian/tools DEB_SRCDIR=$(DEB_BUILDDIR) \
192
215
               LD_LIBRARY_PATH="$(SVN_LD_LIBRARY_PATH)"
193
216
 
194
217
        LD_PRELOAD="$(SVN_LD_PRELOAD)" \
211
234
          echo "Running Testsuite, this may take a while, "      ;  \
212
235
          echo "edit debian/rules to disable"                    ;  \
213
236
          echo "################################################";  \
214
 
          if ! LD_PRELOAD="$(SVN_LD_PRELOAD)" \
 
237
          if ! LC_ALL=C LD_PRELOAD="$(SVN_LD_PRELOAD)" \
215
238
               LD_LIBRARY_PATH="$(SVN_LD_LIBRARY_PATH)" \
216
239
               /usr/bin/time $(MAKE) -C $(DEB_BUILDDIR) check ; then \
217
240
                echo "Testsuite failed" ; \
222
245
          echo "################################################";  \
223
246
          echo "Running basic tests." ; \
224
247
          echo "################################################";  \
225
 
          if ! LD_PRELOAD="$(SVN_LD_PRELOAD)" \
 
248
          if ! LC_ALL=C LD_PRELOAD="$(SVN_LD_PRELOAD)" \
226
249
               LD_LIBRARY_PATH="$(SVN_LD_LIBRARY_PATH)" \
227
250
               /usr/bin/time $(MAKE) -C $(DEB_BUILDDIR) check \
228
251
               TESTS=subversion/tests/clients/cmdline/basic_tests.py ; then \
295
318
                debian/tools/svn-defaults/servers \
296
319
                debian/subversion/etc/subversion
297
320
 
298
 
        rm -f $(DEB_BUILDDIR)/doc/book/tools/xsl
299
 
        ln -s /usr/share/xml/docbook/stylesheet/nwalsh/ \
300
 
                $(DEB_BUILDDIR)/doc/book/tools/xsl
301
 
 
302
 
        $(MAKE) -C $(DEB_BUILDDIR)/doc/book install-book-html \
303
 
                DESTDIR=$(PWD)/debian/subversion/ 
 
321
        install -d $(PWD)/debian/subversion/usr/share/doc/subversion/book
 
322
        install -m 0644 \
 
323
                $(DEB_BUILDDIR)/doc/book/svn-book.html \
 
324
                $(DEB_BUILDDIR)/doc/book/svn-book.pdf \
 
325
                $(PWD)/debian/subversion/usr/share/doc/subversion/book
304
326
 
305
327
        # Install some other useful examples.
306
328
        install -d debian/subversion/usr/share/doc/subversion/examples/
307
329
        install $(DEB_BUILDDIR)/tools/dev/gnuify-changelog.pl \
308
330
                debian/subversion/usr/share/doc/subversion/examples/
309
 
        install -m 0644 $(DEB_BUILDDIR)/contrib/client-side/svn.vim \
310
 
                debian/subversion/usr/share/doc/subversion/examples/
311
331
 
312
332
        install -m 0644 $(DEB_BUILDDIR)/HACKING \
313
333
                $(DEB_BUILDDIR)/INSTALL \
430
450
        dh_installchangelogs -i
431
451
        dh_compress -i
432
452
        dh_fixperms -i
 
453
        dh_perl -i
433
454
        dh_installdeb -i
434
 
        dh_perl -i
435
455
        dh_gencontrol -i
436
456
        dh_md5sums -i
437
457
        dh_builddeb -i
446
466
        dh_strip -a
447
467
        dh_compress -a
448
468
        dh_makeshlibs -a -V
 
469
        dh_perl -a
 
470
        dh_python -a -Npython2.3-subversion -V $(PYTHON_VER)
 
471
        dh_python -ppython2.3-subversion -V 2.3
449
472
        dh_installdeb -a
450
 
        dh_perl -a
451
 
        dh_python -a -V $(PYTHON_VER)
452
473
        dh_shlibdeps -a -l$(PWD)/debian/libsvn0/usr/lib
453
474
        dh_gencontrol -a
454
475
        dh_md5sums -a