File: rules

package info (click to toggle)
gst-plugins-good1.0 1.24.12-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 26,220 kB
  • sloc: ansic: 403,113; cpp: 10,358; asm: 3,140; objc: 1,406; yacc: 1,210; pascal: 506; python: 408; sh: 259; lex: 94; makefile: 68
file content (97 lines) | stat: -rwxr-xr-x 2,973 bytes parent folder | download
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
87
88
89
90
91
92
93
94
95
96
97
#!/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
export QT_SELECT=5

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

built_binaries := $(shell dh_listpackages)

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

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

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

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

conf_flags = -Dpackage-name=$(GST_PACKAGE_NAME) -Dpackage-origin=$(GST_PACKAGE_ORIGIN)
conf_flags += -Dauto_features=enabled -Ddoc=disabled -Drpicamsrc=disabled

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

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

ifeq ($(filter gstreamer1.0-qt5,$(built_binaries)),)
conf_flags += -Dqt5=disabled
endif
ifeq ($(filter gstreamer1.0-qt6,$(built_binaries)),)
conf_flags += -Dqt6=disabled
endif

# qtwayland-opensource-src isn't built on hurd or Ubuntu's i386
ifneq (,$(filter $(DEB_HOST_ARCH), i386 hurd-amd64 hurd-i386))
conf_flags += -Dqt-wayland=disabled
endif

# qt-egl is not available on non-Linux
ifneq (,$(filter $(DEB_HOST_ARCH_OS), hurd))
conf_flags += -Dqt-egl=disabled
endif

# soup is not available on non-Linux
ifeq ($(DEB_HOST_ARCH_OS),hurd)
conf_flags+= -Dadaptivedemux2=disabled -Dsoup=disabled
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- $(conf_flags)

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

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

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

ifeq ($(DEB_HOST_ARCH_OS),linux)
	dh_install -pgstreamer1.0-plugins-good debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-1.0/libgst1394.so
	dh_install -pgstreamer1.0-plugins-good debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-1.0/libgstvideo4linux2.so
endif

	mkdir -p $(CURDIR)/fake-home
	HOME=$(CURDIR)/fake-home \
	dh_gstscancodecs
	rm -rf $(CURDIR)/fake-home