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
|
#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
#export DH_VERBOSE=1
export PYTHONDONTWRITEBYTECODE=1
export QT_SELECT=qt5
# if used with ccache, the build system uses $HOME…
export HOME=$(CURDIR)/debian/scons_home
SCONS_FLAGS=V=1 qt5=1 optimize=1 debug=1 allow_warnings=1 swiften_dll=1 \
help2man=1 docbook_xsl=/usr/share/xml/docbook/stylesheet/docbook-xsl \
docbook_xml=/usr/share/xml/docbook/schema/dtd/4.5 \
linkflags="$(shell dpkg-buildflags --get LDFLAGS)" \
ccflags="$(shell dpkg-buildflags --get CPPFLAGS) $(shell dpkg-buildflags --get CFLAGS) $(shell echo -std=c++17)"
# kept for now: line required to detect lua: lua_includedir="/usr/include/lua5.1" lua_libname="lua5.1" \
# It get's it own version wrong… #1024553. (needs also fix-version-h.patch)
export SWIFTEN_VERSION=$(DEB_VERSION_UPSTREAM)
SCONS_INSTALL_BASE=$(CURDIR)/debian/tmp
SCONS_INSTALL_FLAGS=SWIFT_INSTALLDIR=$(SCONS_INSTALL_BASE)/usr \
SWIFTEN_INSTALLDIR=$(SCONS_INSTALL_BASE)/usr \
SWIFTEN_LIBINSTALLDIR=$(SCONS_INSTALL_BASE)/usr/lib/$(DEB_HOST_MULTIARCH)
ifneq (, $(shell which ccache))
SCONS_FLAGS+=ccache=1
endif
%:
dh $@
override_dh_auto_build:
mkdir -p $(HOME)
echo $(DEB_UPSTREAM_VERSION) > VERSION.swift
scons --jobs=$(shell nproc) $(SCONS_FLAGS) Swiften
override_dh_auto_install:
scons $(SCONS_FLAGS) $(SCONS_INSTALL_FLAGS) $(SCONS_INSTALL_BASE) Swiften
|