8
DEB_KDE_LINK_WITH_AS_NEEDED = yes
10
include /usr/share/pkg-kde-tools/makefiles/1/variables.mk
8
12
INSTALL_DIR = install -p -d -o root -g root -m 755
9
13
INSTALL_FILE = install -p -o root -g root -m 644
11
15
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
12
16
INSTALL_PROGRAM += -s
14
ifeq ($(shell dpkg-architecture -qDEB_BUILD_ARCH),arm)
19
# The MPI code currently builds on all architectures. If it should fail
20
# on some architecture, that architecture should set NO_MPI = 1 and
21
# configmpi = --disable-mpi .
26
19
# Find the default python version so we can pass it to ./configure. This
27
20
# keeps things sane when multiple python*-dev packages are installed.
28
21
pyver = $(subst python,,$(shell /usr/bin/pyversions --default))
30
-include debian/debiandirs
32
debian/debiandirs: admin/debianrules
33
perl -w admin/debianrules echodirs > debian/debiandirs
35
configure: configure-stamp
39
# Update to debian's patched scripts.
45
# perl -w admin/am_edit
47
# Patch regina-python to explicitly use the same python version that
48
# we are building against.
49
sed 's|`which python`|"/usr/bin/python$(pyver)"|' \
50
< python/regina-python.in > python/regina-python.in.new
51
mv -f python/regina-python.in.new python/regina-python.in
53
# Back to the standard configure.
55
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
56
./configure --disable-maintainer-mode PKGNAME=regina-normal \
57
--disable-kdeui --with-python-version=$(pyver) \
58
--includedir=/usr/include $(configkde) $(configmpi) \
59
--includedir=/usr/include
61
# Stop for a sanity check to see if the right bits and pieces are
62
# going to be built (i.e., if all the required dependencies were
63
# found). It's a long build, and we'd rather know now than later.
65
# If any of these grep tests fails, it means that either something is
66
# missing from the build-depends, or else one of the build dependencies
67
# has recently changed in a way that makes it incompatible with the
69
grep '^REGINA_BUILD_DOCSENGINE=.engine.$$' config.log > /dev/null
70
grep '^REGINA_BUILD_ENGINE=.engine.$$' config.log > /dev/null
71
# grep '^REGINA_BUILD_KDEUI=.kdeui.$$' config.log > /dev/null
72
grep '^REGINA_BUILD_MPI=.mpi.$$' config.log > /dev/null
73
grep '^REGINA_BUILD_PYTHON=.python.$$' config.log > /dev/null
74
grep '^REGINA_BUILD_TESTSUITE=.testsuite.$$' config.log > /dev/null
75
grep '^REGINA_BUILD_UTILS=.utils.$$' config.log > /dev/null
80
build: configure-stamp build-stamp
23
build_dir = builds/debbuild
31
-DPACKAGE_NAME=regina-normal -DPACKAGING_MODE=1 \
32
$(DEB_CMAKE_KDE4_FLAGS) \
33
$(DEB_CMAKE_CUSTOM_FLAGS) \
34
-DPYTHON_EXECUTABLE=/usr/bin/python${pyver} \
35
-DCMAKE_INSTALL_PREFIX=/usr \
36
-DCMAKE_MODULE_PATH="/usr/share/apps/cmake/modules"
38
configure: ${build_dir}
40
build: build-arch build-indep
41
build-arch: build-stamp
42
build-indep: build-stamp
44
build-stamp: ${build_dir}
47
$(MAKE) -C ${build_dir} VERBOSE=1
84
48
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
49
$(MAKE) -C ${build_dir} test ARGS=-V
92
[ ! -f Makefile ] || $(MAKE) distclean
93
57
rm -f build-stamp configure-stamp
94
rm -f debian/debiandirs
59
[ ! -d ${build_dir} ] || rm -rf ${build_dir}
104
$(MAKE) install DESTDIR=`pwd`/$(tmp)
107
# Make sure MPI support was enabled.
108
if ! test -e $(tmp)/usr/bin/tricensus-mpi; then \
109
echo "ERROR: MPI utilities were not built and installed."; \
110
echo " Check your configure options."; \
70
$(MAKE) -C ${build_dir} install DESTDIR=$(CURDIR)/$(tmp)
115
72
# Split into separate binary packages.
116
dh_install --sourcedir=debian/tmp --list-missing
118
# Ensure sample data files are stored as compressed XML.
119
for i in debian/regina-normal/usr/share/doc/regina-normal/examples/*.rga; do \
120
utils/regconvert -x $$i $$i; \
123
# Install linda and lintian overrides.
73
dh_install --sourcedir=$(tmp) --list-missing
75
# Install lintian overrides.
124
76
for pkg in `dh_listpackages`; do \
125
77
if test -e debian/$$pkg.override; then \
126
78
$(INSTALL_DIR) debian/$$pkg/usr/share/lintian/overrides; \
127
79
$(INSTALL_FILE) debian/$$pkg.override \
128
80
debian/$$pkg/usr/share/lintian/overrides/$$pkg; \
130
if test -e debian/$$pkg.linda; then \
131
$(INSTALL_DIR) debian/$$pkg/usr/share/linda/overrides; \
132
$(INSTALL_FILE) debian/$$pkg.linda \
133
debian/$$pkg/usr/share/linda/overrides/$$pkg; \
137
84
# Build architecture-independent files here.