2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
1 |
#!/usr/bin/make -f
|
2 |
# -*- makefile -*-
|
|
3 |
# Sample debian/rules that uses debhelper.
|
|
4 |
#
|
|
5 |
# This file was originally written by Joey Hess and Craig Small.
|
|
6 |
# As a special exception, when this file is copied by dh-make into a
|
|
7 |
# dh-make output file, you may use that output file without restriction.
|
|
8 |
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
|
9 |
#
|
|
10 |
# Modified to make a template file for a multi-binary package with separated
|
|
11 |
# build-arch and build-indep targets by Bill Allombert 2001
|
|
12 |
||
13 |
# Uncomment this to turn on verbose mode.
|
|
14 |
#export DH_VERBOSE=1
|
|
15 |
||
16 |
# This has to be exported to make some magic below work.
|
|
17 |
export DH_OPTIONS |
|
18 |
||
19 |
# DEB_BUILD_OPTIONS handling - is this really needed since dpkg-dev 1.14.17?
|
|
20 |
# note that the strip option is handled directly by dh_strip
|
|
21 |
CFLAGS = -Wall -g |
|
22 |
||
23 |
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) |
|
24 |
CFLAGS += -O0 |
|
25 |
else
|
|
26 |
CFLAGS += -O2 |
|
27 |
endif
|
|
2.2.3
by Robert S. Edmonds
* New upstream version. |
28 |
|
29 |
# Renesas SH(sh4) need -mieee option.
|
|
30 |
# If this option is not effective, NaN test failed.
|
|
31 |
ifeq (sh4,$(shell dpkg-architecture -qDEB_HOST_ARCH)) |
|
32 |
CFLAGS += -mieee |
|
33 |
CXXFLAGS += -mieee |
|
34 |
endif
|
|
35 |
||
2.1.1
by Julien Cristau
* Non-maintainer upload. |
36 |
#ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
37 |
# NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
|
38 |
# MAKEFLAGS += -j$(NUMJOBS)
|
|
39 |
#endif
|
|
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
40 |
# end DEB_BUILD_OPTIONS
|
41 |
||
42 |
version=0.0.0 |
|
43 |
major=0 |
|
44 |
||
45 |
configure: configure-stamp |
|
46 |
configure-stamp: |
|
47 |
dh_testdir
|
|
48 |
# Add here commands to configure the package.
|
|
49 |
dh_auto_configure
|
|
50 |
touch configure-stamp |
|
51 |
||
52 |
||
53 |
#Architecture
|
|
2.1.1
by Julien Cristau
* Non-maintainer upload. |
54 |
build: build-arch |
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
55 |
|
56 |
build-arch: build-arch-stamp |
|
2.2.3
by Robert S. Edmonds
* New upstream version. |
57 |
build-arch-stamp: configure-stamp |
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
58 |
|
59 |
# Add here commands to compile the arch part of the package.
|
|
60 |
$(MAKE) |
|
61 |
||
62 |
# run the test suite
|
|
2.1.1
by Julien Cristau
* Non-maintainer upload. |
63 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
64 |
$(MAKE) check |
2.1.1
by Julien Cristau
* Non-maintainer upload. |
65 |
endif
|
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
66 |
|
67 |
# build the protoc manpage
|
|
68 |
xmlto man debian/protoc.xml |
|
69 |
||
70 |
touch $@ |
|
71 |
||
72 |
build-indep: build-indep-stamp |
|
2.1.1
by Julien Cristau
* Non-maintainer upload. |
73 |
build-indep-stamp: build-arch-stamp |
74 |
||
75 |
# python bindings
|
|
76 |
cd python && python setup.py build |
|
77 |
||
78 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
|
79 |
cd python && python setup.py test |
|
80 |
endif
|
|
81 |
||
82 |
# java bindings
|
|
83 |
# this code mimics mvn package. This should be changed when maven is supported by debian.
|
|
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
84 |
$(SHELL) ./debian/ant-wrapper -f debian/java-build.xml jar |
85 |
||
86 |
touch $@ |
|
87 |
||
2.2.3
by Robert S. Edmonds
* New upstream version. |
88 |
clean: |
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
89 |
dh_testdir
|
90 |
dh_testroot
|
|
91 |
rm -f build-arch-stamp build-indep-stamp configure-stamp |
|
92 |
||
2.2.7
by Iustin Pop
* Thanks to Peter Palfrader for finding the two bugs below: |
93 |
# C++ bindings cleanups
|
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
94 |
[ ! -f Makefile ] || $(MAKE) distclean |
95 |
||
96 |
# remove the built manpage
|
|
97 |
rm -f protoc.1 |
|
98 |
||
2.2.7
by Iustin Pop
* Thanks to Peter Palfrader for finding the two bugs below: |
99 |
# Python bindings cleanups
|
100 |
cd python && python setup.py clean --all |
|
101 |
rm -rf python/protobuf.egg-info |
|
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
102 |
|
2.2.7
by Iustin Pop
* Thanks to Peter Palfrader for finding the two bugs below: |
103 |
# Java bindings cleanups
|
2.1.1
by Julien Cristau
* Non-maintainer upload. |
104 |
$(SHELL) ./debian/ant-wrapper -f debian/java-build.xml clean || true |
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
105 |
|
106 |
dh_clean
|
|
107 |
||
108 |
install: install-indep install-arch |
|
2.1.1
by Julien Cristau
* Non-maintainer upload. |
109 |
install-indep: build-indep |
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
110 |
dh_testdir
|
111 |
dh_testroot
|
|
2.1.1
by Julien Cristau
* Non-maintainer upload. |
112 |
dh_prep -i |
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
113 |
dh_installdirs -i |
114 |
||
115 |
# python bindings
|
|
116 |
cd python && \ |
|
117 |
python setup.py install --no-compile \ |
|
118 |
--root=$(CURDIR)/debian/python-protobuf ; \ |
|
119 |
find $(CURDIR)/debian/python-protobuf -name 'protobuf-*-nspkg.pth' -print0 | \ |
|
120 |
xargs -r0 rm -f |
|
121 |
||
122 |
dh_install -i |
|
123 |
||
124 |
||
2.1.1
by Julien Cristau
* Non-maintainer upload. |
125 |
install-arch: build-arch |
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
126 |
dh_testdir
|
127 |
dh_testroot
|
|
2.1.1
by Julien Cristau
* Non-maintainer upload. |
128 |
dh_prep -s |
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
129 |
dh_installdirs -s |
130 |
||
131 |
# Add here commands to install the arch part of the package into
|
|
132 |
# debian/tmp.
|
|
133 |
$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install |
|
134 |
||
135 |
dh_install --sourcedir=debian/tmp -s |
|
136 |
||
2.2.1
by Iustin Pop
* New Upstream Version |
137 |
# convert doc dir to symlink for the dev packages
|
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
138 |
rm -rf $(CURDIR)/debian/libprotobuf-dev/usr/share/doc/libprotobuf-dev |
2.2.3
by Robert S. Edmonds
* New upstream version. |
139 |
ln -s libprotobuf6 $(CURDIR)/debian/libprotobuf-dev/usr/share/doc/libprotobuf-dev |
2.2.1
by Iustin Pop
* New Upstream Version |
140 |
rm -rf $(CURDIR)/debian/libprotoc-dev/usr/share/doc/libprotoc-dev |
2.2.3
by Robert S. Edmonds
* New upstream version. |
141 |
ln -s libprotoc6 $(CURDIR)/debian/libprotoc-dev/usr/share/doc/libprotoc-dev |
2.2.1
by Iustin Pop
* New Upstream Version |
142 |
|
143 |
# remove compiler headers from libprotobuf-dev
|
|
144 |
rm -rf $(CURDIR)/debian/libprotobuf-dev/usr/include/google/protobuf/compiler |
|
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
145 |
|
146 |
||
147 |
# Must not depend on anything. This is to be called by
|
|
148 |
# binary-arch/binary-indep
|
|
149 |
# in another 'make' thread.
|
|
150 |
binary-common: |
|
151 |
dh_testdir
|
|
152 |
dh_testroot
|
|
153 |
dh_installchangelogs CHANGES.txt |
|
154 |
dh_installdocs
|
|
155 |
dh_installexamples
|
|
156 |
dh_installman
|
|
157 |
dh_link
|
|
158 |
dh_strip
|
|
159 |
dh_compress
|
|
160 |
dh_fixperms
|
|
2.1.1
by Julien Cristau
* Non-maintainer upload. |
161 |
ifeq ($(DH_OPTIONS),-i) |
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
162 |
dh_pysupport
|
2.1.1
by Julien Cristau
* Non-maintainer upload. |
163 |
endif
|
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
164 |
dh_makeshlibs
|
165 |
dh_installdeb
|
|
166 |
dh_shlibdeps
|
|
167 |
dh_gencontrol
|
|
168 |
dh_md5sums
|
|
169 |
dh_builddeb
|
|
170 |
||
171 |
# Build architecture independant packages using the common target.
|
|
2.1.1
by Julien Cristau
* Non-maintainer upload. |
172 |
binary-indep: install-indep |
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
173 |
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
174 |
||
175 |
# Build architecture dependant packages using the common target.
|
|
2.1.1
by Julien Cristau
* Non-maintainer upload. |
176 |
binary-arch: install-arch |
2
by Iustin Pop
Remove DM-Upload-Allowed for sponsoring |
177 |
$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common |
178 |
||
179 |
binary: binary-arch binary-indep |
|
180 |
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure |