~ubuntu-branches/debian/squeeze/protobuf/squeeze

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2009-06-02 16:19:00 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090602161900-vm176i3ryt35yk91
Tags: 2.0.3-2.2
* Non-maintainer upload.
* Fix FTBFS from -2.1: don't fail when we can't clean up the java build,
  such as when openjdk isn't installed.
* Disable parallel builds, because libtool is made of fail (if binary-arch
  and build-indep run concurrently, we relink a library while it's being
  used; that doesn't work so well).

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
else
26
26
    CFLAGS += -O2
27
27
endif
28
 
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
29
 
    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
30
 
    MAKEFLAGS += -j$(NUMJOBS)
31
 
endif
 
28
#ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 
29
#    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 
30
#    MAKEFLAGS += -j$(NUMJOBS)
 
31
#endif
32
32
# end DEB_BUILD_OPTIONS
33
33
 
34
34
version=0.0.0
43
43
 
44
44
 
45
45
#Architecture
46
 
build: build-arch build-indep
 
46
build: build-arch
47
47
 
48
48
build-arch: build-arch-stamp
49
49
build-arch-stamp: configure-stamp
52
52
        $(MAKE)
53
53
 
54
54
        # run the test suite
 
55
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
55
56
        $(MAKE) check
 
57
endif
56
58
 
57
59
        # build the protoc manpage
58
60
        xmlto man debian/protoc.xml
60
62
        touch $@
61
63
 
62
64
build-indep: build-indep-stamp
63
 
build-indep-stamp: configure-stamp build-arch-stamp
64
 
 
65
 
        #python bindings
66
 
        cd python && \
67
 
                python setup.py build ; \
68
 
                python setup.py test
69
 
 
70
 
        #java bindings
71
 
        #this code mimics mvn package. This should be changed when maven is supported by debian.
 
65
build-indep-stamp: build-arch-stamp
 
66
 
 
67
        # python bindings
 
68
        cd python && python setup.py build
 
69
 
 
70
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 
71
        cd python && python setup.py test
 
72
endif
 
73
 
 
74
        # java bindings
 
75
        # this code mimics mvn package. This should be changed when maven is supported by debian.
72
76
        $(SHELL) ./debian/ant-wrapper -f debian/java-build.xml jar
73
77
 
74
78
        touch $@
89
93
                rm -rf protobuf.egg-info
90
94
 
91
95
        # remove java builds
92
 
        $(SHELL) ./debian/ant-wrapper -f debian/java-build.xml clean
 
96
        $(SHELL) ./debian/ant-wrapper -f debian/java-build.xml clean || true
93
97
 
94
98
        dh_clean
95
99
 
96
100
install: install-indep install-arch
97
 
install-indep:
 
101
install-indep: build-indep
98
102
        dh_testdir
99
103
        dh_testroot
100
 
        dh_clean -k -i
 
104
        dh_prep -i
101
105
        dh_installdirs -i
102
106
 
103
107
        # python bindings
110
114
        dh_install -i
111
115
 
112
116
 
113
 
install-arch:
 
117
install-arch: build-arch
114
118
        dh_testdir
115
119
        dh_testroot
116
 
        dh_clean -k -s
 
120
        dh_prep -s
117
121
        dh_installdirs -s
118
122
 
119
123
        # Add here commands to install the arch part of the package into
124
128
 
125
129
        # convert doc dir to symlink for the dev package
126
130
        rm -rf $(CURDIR)/debian/libprotobuf-dev/usr/share/doc/libprotobuf-dev
127
 
        ln -s libprotobuf0 $(CURDIR)/debian/libprotobuf-dev/usr/share/doc/libprotobuf-dev
 
131
        ln -s libprotobuf3 $(CURDIR)/debian/libprotobuf-dev/usr/share/doc/libprotobuf-dev
128
132
 
129
133
 
130
134
# Must not depend on anything. This is to be called by
141
145
        dh_strip
142
146
        dh_compress
143
147
        dh_fixperms
 
148
ifeq ($(DH_OPTIONS),-i)
144
149
        dh_pysupport
 
150
endif
145
151
        dh_makeshlibs
146
152
        dh_installdeb
147
153
        dh_shlibdeps
150
156
        dh_builddeb
151
157
 
152
158
# Build architecture independant packages using the common target.
153
 
binary-indep: build-indep install-indep
 
159
binary-indep: install-indep
154
160
        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
155
161
 
156
162
# Build architecture dependant packages using the common target.
157
 
binary-arch: build-arch install-arch
 
163
binary-arch: install-arch
158
164
        $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
159
165
 
160
166
binary: binary-arch binary-indep