| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
include /usr/share/dpkg/default.mk |
| 4 |
include /usr/share/dpkg/pkg-info.mk |
| 5 |
|
| 6 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 7 |
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1 -Wl,-z,defs |
| 8 |
export HOME=$(CURDIR)/fake-home |
| 9 |
export QT_SELECT=5 |
| 10 |
|
| 11 |
# upstream version |
| 12 |
gst_version=$(shell echo $(DEB_VERSION) | cut -d '-' -f 1) |
| 13 |
|
| 14 |
# Let's decide the package name and url depending on the distribution |
| 15 |
DISTRO = "$(shell dpkg-vendor --query vendor)" |
| 16 |
|
| 17 |
GST_PACKAGE_NAME := "GStreamer Ugly Plugins (unknown Debian derivative)" |
| 18 |
GST_PACKAGE_ORIGIN="https://tracker.debian.org/pkg/gst-plugins-ugly1.0" |
| 19 |
|
| 20 |
ifeq ($(DISTRO),"Debian") |
| 21 |
GST_PACKAGE_NAME := "GStreamer Ugly Plugins (Debian)" |
| 22 |
GST_PACKAGE_ORIGIN="https://tracker.debian.org/pkg/gst-plugins-ugly1.0" |
| 23 |
endif |
| 24 |
|
| 25 |
ifeq ($(DISTRO),"Ubuntu") |
| 26 |
GST_PACKAGE_NAME := "GStreamer Ugly Plugins (Ubuntu)" |
| 27 |
GST_PACKAGE_ORIGIN="https://launchpad.net/ubuntu/+source/gst-plugins-ugly1.0" |
| 28 |
endif |
| 29 |
|
| 30 |
conf_flags = -Dpackage-name=$(GST_PACKAGE_NAME) -Dpackage-origin=$(GST_PACKAGE_ORIGIN) |
| 31 |
conf_flags += -Dauto_features=enabled -Ddoc=disabled -Dgpl=enabled |
| 32 |
|
| 33 |
%: |
| 34 |
dh $@ |
| 35 |
|
| 36 |
override_dh_auto_configure: |
| 37 |
dh_auto_configure -- $(conf_flags) |
| 38 |
|
| 39 |
execute_before_dh_auto_clean: |
| 40 |
rm -rf $(CURDIR)/fake-home |
| 41 |
|
| 42 |
override_dh_auto_test: |
| 43 |
xvfb-run dh_auto_test |
| 44 |
|
| 45 |
execute_after_dh_install: |
| 46 |
mkdir -p $(CURDIR)/fake-home |
| 47 |
HOME=$(CURDIR)/fake-home \ |
| 48 |
dh_gstscancodecs |
| 49 |
rm -rf $(CURDIR)/fake-home |