recoll/packaging/debian/debian/rules-jessie
2021-01-16 11:54:45 +01:00

60 lines
2.1 KiB
Makefile
Executable File

#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Setting the following on jessie results in a -fpie flag in the
# python module links, and failure due to missing symbols
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
build3vers := $(shell py3versions -sv)
#build qt5 UI
export QT_SELECT := qt5
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NJOBS := -j $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif
# main packaging script based on dh7 syntax
%:
dh $@ --parallel --with python2 --with python3 --with autotools-dev
override_dh_auto_configure:
dh_auto_configure -- --enable-recollq --enable-xadump
build3vers := $(shell py3versions -sv)
override_dh_auto_install:
dh_auto_install
(cd python/recoll; libdir=/usr/lib/$${DEB_BUILD_MULTIARCH} python2 \
./setup.py install \
--install-layout=deb \
--prefix=/usr \
--root=$(CURDIR)/debian/tmp/usr )
set -e && for i in $(build3vers); do \
(cd python/recoll; libdir=/usr/lib/$${DEB_BUILD_MULTIARCH} python$$i \
./setup.py install \
--install-layout=deb \
--prefix=/usr \
--root=$(CURDIR)/debian/tmp/ ) ; \
done
(cd python/pychm; python2 ./setup.py install \
--install-layout=deb \
--prefix=/usr \
--root=$(CURDIR)/debian/tmp/ )
set -e && for i in $(build3vers); do \
(cd python/pychm; python$$i ./setup.py install \
--install-layout=deb \
--prefix=/usr \
--root=$(CURDIR)/debian/tmp/ ) ; \
done
find $(CURDIR) -type f -name '*.la' -exec rm -f '{}' \;
find $(CURDIR) -type f -name '*.pyc' -exec rm -f '{}' \;
rm -rf $(CURDIR)/debian/tmp/usr/lib/python*/*/*/__pycache__