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
|
#!/usr/bin/make -f
include /usr/share/dpkg/default.mk
include /usr/share/dpkg/pkg-info.mk
export HOME=$(CURDIR)/fake-home
# upstream version
gst_version=$(shell echo $(DEB_VERSION) | cut -d '-' -f 1)
CFLAGS += -Wno-error
CXXFLAGS += -Wno-error
LDFLAGS += -Wl,-z,defs -Wl,-O1
RUSTFLAGS += -Copt-level=3 -Cdebuginfo=2
# Let's decide the package name and url depending on the distribution
DISTRO = "$(shell dpkg-vendor --query vendor)"
GST_PACKAGE_NAME := "GStreamer (unknown Debian derivative)"
GST_PACKAGE_ORIGIN="https://tracker.debian.org/pkg/gstreamer1.0"
ifeq ($(DISTRO),"Debian")
GST_PACKAGE_NAME := "GStreamer (Debian)"
GST_PACKAGE_ORIGIN="https://tracker.debian.org/pkg/gstreamer1.0"
endif
ifeq ($(DISTRO),"Ubuntu")
GST_PACKAGE_NAME := "GStreamer (Ubuntu)"
GST_PACKAGE_ORIGIN="https://launchpad.net/ubuntu/+source/gstreamer1.0"
endif
conf_flags = --libexecdir=lib/$(DEB_HOST_MULTIARCH)/gstreamer1.0
conf_flags += -Dpackage-name=$(GST_PACKAGE_NAME) -Dpackage-origin=$(GST_PACKAGE_ORIGIN)
conf_flags += -Dauto_features=enabled -Ddbghelp=disabled -Ddoc=disabled -Dexamples=disabled
# Disable libunwind due to inconsistencies between different architectures
conf_flags += -Dlibunwind=disabled -Dlibdw=disabled
ifeq ($(DEB_HOST_ARCH_OS),linux)
conf_flags += -Dptp-helper-permissions=capabilities
else
conf_flags += -Dptp-helper-permissions=setuid-root \
-Dptp-helper-setuid-user=nobody -Dptp-helper-setuid-group=nobody
endif
ifneq (,$(filter $(DEB_HOST_ARCH),alpha hppa m68k sh4))
conf_flags += -Dptp-helper=disabled
endif
infiles := \
libgstreamer1.0-0.postinst
%:
dh $@
# Drop the libexecdir override when we're not in a Freeze?
# May need rebuilds or code changes to other packages to adapt
override_dh_auto_configure:
dh_auto_configure -- $(conf_flags)
execute_before_dh_auto_clean:
rm -rf $(CURDIR)/fake-home
set -e; for file in $(infiles); do \
rm -f debian/$$file; \
done
execute_after_dh_auto_install:
gcc -o debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer1.0/gstreamer-1.0/gst-codec-info-1.0 -Wall debian/gst-codec-info.c $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) `pkg-config --libs --cflags glib-2.0 gthread-2.0 gmodule-no-export-2.0 gobject-2.0` debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libgstreamer-1.0.so -Idebian/tmp/usr/include/gstreamer-1.0 -Idebian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-1.0/include
perldoc -o man debian/dh_gstscancodecs > debian/tmp/usr/share/man/man1/dh_gstscancodecs.1
# Only make the tests fail for key architectures
override_dh_auto_test:
ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64))
dh_auto_test
else
dh_auto_test || true
endif
override_dh_makeshlibs:
dh_makeshlibs -plibgstreamer1.0-0 -X "/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-1.0" -V 'libgstreamer1.0-0 (>= $(gst_version))' -- -c4
execute_after_dh_install:
set -e; for file in $(infiles); do \
sed -e"s/@MULTIARCH@/$(DEB_HOST_MULTIARCH)/g" \
debian/$${file}.in > debian/$$file; \
done
|