File: rules

package info (click to toggle)
gst-plugins-base1.0 1.28.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,992 kB
  • sloc: ansic: 401,400; cpp: 3,961; objc: 2,657; python: 290; sh: 66; makefile: 51
file content (72 lines) | stat: -rwxr-xr-x 2,432 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

include /usr/share/dpkg/default.mk
include /usr/share/dpkg/pkg-info.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,-z,defs
export HOME=$(CURDIR)/fake-home

# upstream version
gst_version=$(shell echo $(DEB_VERSION) | cut -d '-' -f 1)

# Let's decide the package name and url depending on the distribution
DISTRO = "$(shell dpkg-vendor --query vendor)"

GST_PACKAGE_NAME := "GStreamer Base Plugins (unknown Debian derivative)"
GST_PACKAGE_ORIGIN="https://tracker.debian.org/pkg/gst-plugins-base1.0"

ifeq ($(DISTRO),"Debian")
GST_PACKAGE_NAME := "GStreamer Base Plugins (Debian)"
GST_PACKAGE_ORIGIN="https://tracker.debian.org/pkg/gst-plugins-base1.0"
endif

ifeq ($(DISTRO),"Ubuntu")
GST_PACKAGE_NAME := "GStreamer Base Plugins (Ubuntu)"
GST_PACKAGE_ORIGIN="https://launchpad.net/ubuntu/+source/gst-plugins-base1.0"
endif

conf_flags = -Dpackage-name=$(GST_PACKAGE_NAME) -Dpackage-origin=$(GST_PACKAGE_ORIGIN)
conf_flags += -Dinstall_plugins_helper="/usr/bin/gstreamer-codec-install"
conf_flags += -Dauto_features=enabled -Dexamples=disabled -Dtremor=disabled -Ddoc=disabled

ifeq ($(DEB_HOST_ARCH_OS),hurd)
conf_flags += -Dcdparanoia=disabled
conf_flags += -Ddrm=disabled
endif

ifneq ($(DEB_HOST_ARCH_OS),linux)
conf_flags += -Dalsa=disabled
endif

%:
	dh $@

execute_before_dh_auto_clean:
	rm -rf $(CURDIR)/fake-home

override_dh_auto_configure:
	dh_auto_configure -- $(conf_flags)

# Only make the tests fail for key architectures
override_dh_auto_test:
ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 ppc64el))
	xvfb-run dh_auto_test
else
	xvfb-run dh_auto_test || true
endif

override_dh_makeshlibs:
	dh_makeshlibs -plibgstreamer-plugins-base1.0-0 -X "/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-1.0" -V 'libgstreamer-plugins-base1.0-0 (>= $(gst_version))' -- -c4
	dh_makeshlibs -plibgstreamer-gl1.0-0 -X "/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-1.0" -V 'libgstreamer-gl1.0-0 (>= $(gst_version))' -- -c4

execute_after_dh_install:
ifneq ($(DEB_HOST_ARCH_OS),hurd)
	dh_install -pgstreamer1.0-plugins-base debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-1.0/libgstcdparanoia.so
endif

	mkdir -p $(CURDIR)/fake-home
	HOME=$(CURDIR)/fake-home \
	LD_LIBRARY_PATH=debian/libgstreamer-plugins-base1.0-0/usr/lib/$(DEB_HOST_MULTIARCH):debian/libgstreamer-gl1.0-0/usr/lib/$(DEB_HOST_MULTIARCH):$(LD_LIBRARY_PATH) \
	    dh_gstscancodecs
	rm -rf $(CURDIR)/fake-home