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
|
include /usr/share/dpkg/architecture.mk
DEB_BUILD_MAINT_OPTIONS := hardening=+all
DEB_CFLAGS_MAINT_APPEND := -fPIC
DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/pkg-info.mk
DEB_DH_MAKESHLIBS_ARGS := -Xlibffado2/libffado.so
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/utils.mk
scons := \
$(foreach v,CC CFLAGS CPPFLAGS CXXFLAGS LDFLAGS,$(v)="$($(v))") \
scons \
CUSTOM_ENV=True \
PREFIX=/usr \
DESTDIR=$(DEB_DESTDIR) \
LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
SHAREDIR=/usr/share/libffado2/ \
PYPKGDIR=/usr/share/ffado-mixer-qt4/ \
PYTHON_INTERPRETER=/usr/bin/python3 \
WILL_DEAL_WITH_XDG_MYSELF=1 \
DETECT_USERSPACE_ENV=0 \
$(patsubst parallel=%,-j%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) \
ENABLE_OPTIMIZATION=no
common-build-arch common-build-indep::
$(scons) DEBUG=0
common-install-arch common-install-indep::
$(scons) DEBUG=0 install
clean::
$(scons) --clean
rm -rf cache
rm -f .sconsign.dblite
find . -name "*.pyc" -delete
binary-install/ffado-mixer-qt4 binary-install/ffado-tools:: binary-install/%:
dh_python3 -p$*
# Two versions of the library are built and installed, see #601657.
# During architecture-dependent builds, build with debug information
# then clean so that the objects are never installed.
libdir_dbg := /usr/lib/$(DEB_HOST_MULTIARCH)/libffado2
dbg_so := debian/libffado.so.$(DEB_VERSION_UPSTREAM)
common-build-arch:: $(dbg_so)
$(dbg_so):
$(scons) DEBUG=1
mv src/libffado.so $(dbg_so)
$(scons) --clean
binary-install/ffado-tools:: binary-install/%:
sed 's|@@libdir_dbg@@|$(libdir_dbg)|' debian/ffado-debug > debian/$*/usr/bin/ffado-debug
dh_install -p$* $(dbg_so) $(libdir_dbg)
clean::
rm -f $(dbg_so)
|