1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
|
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
libpkg = libpisock9
synclibpkg = libpisync1
devpkg = libpisock-dev
runpkg = pilot-link
pythonpkg = python-pisock
CFLAGS = -Wall -g -pthread
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
# parallel compilation is NOT supported and will fail
MAKEFLAGS += -j$(NUMJOBS)
endif
#ifeq (hppa,$(DEB_BUILD_ARCH))
# CFLAGS += -ffunction-sections
#endif
PYVERS=$(shell pyversions -r)
build: build-arch build-indep
build-arch: build-stamp build-python-stamp
build-indep: build-stamp
build-stamp:
dh_testdir
# Add here commands to compile the package.
dh_autoreconf
./configure --prefix=/usr \
--enable-conduits --enable-libusb \
--with-python --with-libpng \
--with-libiconv \
CFLAGS="$(CFLAGS)"
# force installation of dump.pl & Pilot.pm (#413502)
touch bindings/Perl/dump.pl
$(MAKE)
touch build-stamp
build-python-stamp: build-stamp
dh_testdir
set -e; \
for python in $(PYVERS); do \
$(MAKE) -C bindings python-build PYTHON=$$python; \
$(MAKE) -C bindings python-build PYTHON=$$python-dbg; \
done
touch build-python-stamp
clean:
dh_testdir
rm -f build-stamp pre-binary-stamp
if [ -e Makefile ] ; then $(MAKE) distclean; fi
rm -f config.log changelog libtool
rm -rf bindings/Python/build
dh_clean
pre-binary: build pre-binary-stamp
pre-binary-stamp:
dh_clean
dh_installdirs
$(MAKE) install DESTDIR=`pwd`/debian/tmp
$(MAKE) -C doc/man install DESTDIR=`pwd`/debian/tmp
set -e; \
cd bindings/Python; \
for python in $(PYVERS); do \
$$python setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb; \
$$python-dbg setup.py install --root=$(CURDIR)/debian/python-pisock-dbg --install-layout=deb; \
done
# mini patches
cp ChangeLog changelog
# install the udev rule file to get the correct file group and permissions
mv debian/tmp/usr/share/pilot-link/udev/60-libpisock.rules debian/libpisock9.udev
# remove .py files to avoid conflicts with python-pisock package
rm debian/python-pisock-dbg/usr/lib/python*/*-packages/*.py
# remove egg file too (LP: #202773)
rm debian/python-pisock-dbg/usr/lib/python*/*-packages/python_libpisock-*.egg-info
dh_install --list-missing --sourcedir=debian/tmp
sed -i "/dependency_libs/ s/'.*'/''/" `find debian/ -name '*.la'`
touch pre-binary-stamp
# Build architecture-independent files here.
binary-indep: build
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build $(libpkg) $(devpkg) $(runpkg) $(synclibpkg) $(pythonpkg) $(pythonpkg)-dbg
$(libpkg): build pre-binary
echo $@
dh_testroot
dh_installdirs -p $@
dh_installdocs -p $@
dh_installudev -p $@
dh_installmodules -p $@
dh_installchangelogs -p $@
dh_strip -p $@ --dbg-package=$(pythonpkg)-dbg
dh_strip -p $@
dh_compress -p $@
dh_fixperms -p $@
dh_makeshlibs -p $@
dh_installmodules -p $@
dh_installdeb -p $@
dh_shlibdeps -p $@
dh_gencontrol -p $@
dh_md5sums -p $@
dh_builddeb -p $@
$(synclibpkg): build pre-binary $(libpkg)
echo $@
dh_installdirs -p $@
dh_installdocs -p $@
dh_installchangelogs -p $@
dh_strip -p $@
dh_compress -p $@
dh_fixperms -p $@
dh_makeshlibs -p $@
dh_installdeb -p $@
dh_shlibdeps -p $@
dh_gencontrol -p $@
dh_md5sums -p $@
dh_builddeb -p $@
$(devpkg): build pre-binary $(libpkg)
echo $@
dh_installdirs -p $@
dh_installdocs -p $@
dh_installchangelogs -p $@
dh_strip -p $@
dh_compress -p $@
dh_fixperms -p $@
dh_makeshlibs -p $@
dh_installdeb -p $@
dh_shlibdeps -p $@
dh_gencontrol -p $@
dh_md5sums -p $@
dh_builddeb -p $@
$(runpkg): build pre-binary $(libpkg)
echo $@
dh_installdirs -p $@
dh_installdocs -p $@
dh_installexamples -p $@
dh_installmenu -p $@
dh_installman -p $@
dh_installchangelogs -p $@
dh_installdebconf -p $@
dh_strip -p $@
dh_compress -p $@
dh_fixperms -p $@
dh_installdeb -p $@
dh_shlibdeps -p $@
dh_gencontrol -p $@
dh_md5sums -p $@
dh_builddeb -p $@
$(pythonpkg): build pre-binary $(libpkg)
echo $@
dh_installdirs -p $@
dh_installchangelogs -p $@
dh_installdocs -p $@
dh_strip -p $@
dh_compress -p $@
dh_fixperms -p $@
dh_makeshlibs -p $@
dh_python2 -p $@
dh_installdeb -p $@
dh_shlibdeps -p $@
dh_gencontrol -p $@
dh_md5sums -p $@
dh_builddeb -p $@
$(pythonpkg)-dbg: build pre-binary $(pythonpkg)
echo $@
dh_installdocs -p $@
rm -rf debian/$@/usr/share/doc/$@
ln -sf $(pythonpkg) debian/$@/usr/share/doc/$@
dh_compress -p $@
dh_fixperms -p $@
dh_makeshlibs -p $@
dh_python2 -p $@
dh_installdeb -p $@
dh_shlibdeps -p $@
dh_gencontrol -p $@
dh_md5sums -p $@
dh_builddeb -p $@
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary \
$(libpkg) $(devpkg) $(runpkg) $(pythonpkg) pre-binary
|