File: rules

package info (click to toggle)
gst-libav1.0 1.22.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,836 kB
  • sloc: ansic: 12,959; python: 190; makefile: 38
file content (57 lines) | stat: -rwxr-xr-x 1,536 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
#!/usr/bin/make -f

include /usr/share/dpkg/default.mk

export HOME=$(CURDIR)/fake-home

# debian package version
version=$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
# upstream version
gst_version=$(shell echo $(version) | cut -d '-' -f 1)

FFMPEG_LIBDIR = /usr/lib/$(DEB_HOST_MULTIARCH)

CFLAGS += -Wno-error -DFFMPEG_LIBDIR=\"$(FFMPEG_LIBDIR)\"
CXXFLAGS += -Wno-error
LDFLAGS += -Wl,-z,defs -Wl,-O1

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

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

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

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

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

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- $(conf_flags)

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

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:
	mkdir -p $(CURDIR)/fake-home
	HOME=$(CURDIR)/fake-home \
	dh_gstscancodecs
	rm -rf $(CURDIR)/fake-home