| #!/usr/bin/make -f |
| |
| include /usr/share/cdbs/1/rules/debhelper.mk |
| include /usr/share/cdbs/1/class/gnome.mk |
| include /usr/share/cdbs/1/rules/utils.mk |
| include /usr/share/cdbs/1/rules/autoreconf.mk |
| |
| DEB_BUILD_PARALLEL = 1 |
| |
| DEB_DH_AUTORECONF_ARGS += --as-needed |
| |
| CFLAGS += -Wno-error |
| CXXFLAGS += -Wno-error |
| LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed |
| |
| # this is for compatibility with dpkg-dev < 1.13.5, see |
| # <http://lists.debian.org/debian-devel-announce/2005/06/msg00010.html> |
| DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null) |
| DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) |
| |
| # Take account of old dpkg-architecture output. |
| ifeq ($(DEB_HOST_ARCH_CPU),) |
| DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU) |
| ifeq ($(DEB_HOST_ARCH_CPU),x86_64) |
| DEB_HOST_ARCH_CPU := amd64 |
| endif |
| endif |
| ifeq ($(DEB_HOST_ARCH_OS),) |
| DEB_HOST_ARCH_OS := $(subst -gnu,,$(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)) |
| ifeq ($(DEB_HOST_ARCH_OS),gnu) |
| DEB_HOST_ARCH_OS := hurd |
| endif |
| endif |
| # end of compatibility block |
| |
| # debian package version |
| version=$(shell dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2) |
| # upstream version |
| gst_version=$(shell echo $(version) | cut -d '-' -f 1) |
| gst_major=1 |
| gst_minor=0 |
| gst_abi=$(gst_major).$(gst_minor) |
| # gstreamer library package names |
| gst_lib=libgstreamer$(gst_abi)-0 |
| gst_lib_dev=libgstreamer$(gst_abi)-dev |
| # what gstreamer version is needed |
| gst_lib_dev_dep=$(gst_lib_dev) (>= 1.12.0) |
| |
| gst_pkgname=gstreamer$(gst_abi) |
| gst_deb_abi=$(gst_abi)-0 |
| |
| gst_extra_build_depends = |
| gst_extra_build_depends += libasound2-dev (>= 0.9.1) [linux-any] |
| gst_extra_build_depends += , libcdaudio-dev [linux-any] |
| gst_extra_build_depends += , libdc1394-22-dev (>= 2.0.0) [linux-any] |
| gst_extra_build_depends += , libgudev-1.0-dev (>= 143) [linux-any] |
| gst_extra_build_depends += , libusb-1.0-0-dev [linux-any] |
| gst_extra_build_depends += , libbluetooth-dev (>= 5) [linux-any] |
| gst_extra_build_depends += , libsbc-dev (>= 1.1) [linux-any] |
| gst_extra_build_depends += , libwayland-dev (>= 1.4.0) [linux-any] |
| gst_extra_build_depends += , libdrm-dev (>= 2.4.55) [linux-any] |
| gst_extra_build_depends += , wayland-protocols (>= 1.4) [linux-any] |
| gst_extra_build_depends += , libvulkan-dev [linux-any] |
| |
| # The plugins are basically the same. |
| # Link special names to a template file. |
| # still need "*.install" to be done by hand |
| # |
| # EXTRA_PLUGINS: See debian/README.Debian for docs |
| EXTRA_PLUGINS += |
| |
| PLUGINS += plugins-bad $(EXTRA_PLUGINS) |
| ifeq ($(DEB_HOST_ARCH_OS),linux) |
| PLUGINS += |
| endif |
| VERSIONIZE= \ |
| |
| #debug package |
| DEB_DH_STRIP_ARGS := --dbg-package=$(gst_pkgname)-plugins-bad-dbg |
| |
| ifeq ($(DEB_HOST_ARCH_OS),linux) |
| dvb = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstdvb.so |
| fbdev = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstfbdevsink.so |
| vcd = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstvcdsrc.so |
| cdaudio = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstcdaudio.so |
| dc1394 = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstdc1394.so |
| decklink = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstdecklink.so |
| linsys = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstlinsys.so |
| bluez = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstbluez.so |
| sbc = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstsbc.so |
| waylandsink = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstwaylandsink.so |
| wayland = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libgstwayland-$(gst_abi).so.* |
| kms = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstkms.so |
| vulkan = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstvulkan.so |
| endif |
| |
| ifeq ($(DEB_HOST_ARCH_OS),kfreebsd) |
| cdaudio = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstcdaudio.so |
| endif |
| |
| ifneq ($(DEB_HOST_ARCH_OS),hurd) |
| resindvd = debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)/libgstresindvd.so |
| endif |
| |
| GST_PACKAGE_NAME := "GStreamer Bad Plugins" |
| |
| CFLAGS += -I$(shell realpath extinc) |
| |
| # setup links for packages |
| pre-build:: |
| # HACK in ion.h |
| mkdir -p extinc/linux |
| find /usr/src/*/include/uapi -name ion.h -exec cp {} extinc/linux \; |
| |
| for p in $(PLUGINS); do \ |
| rm -f debian/$(gst_pkgname)-$$p.install; \ |
| sed \ |
| -e 's,@dvb@,$(dvb),g' \ |
| -e 's,@decklink@,$(decklink),g' \ |
| -e 's,@linsys@,$(linsys),g' \ |
| -e 's,@fbdev@,$(fbdev),g' \ |
| -e 's,@vcd@,$(vcd),g' \ |
| -e 's,@dc1394@,$(dc1394),g' \ |
| -e 's,@cdaudio@,$(cdaudio),g' \ |
| -e 's,@resindvd@,$(resindvd),g' \ |
| -e 's,@uvch264@,$(uvch264),g' \ |
| -e 's,@bluez@,$(bluez),g' \ |
| -e 's,@sbc@,$(sbc),g' \ |
| -e 's,@waylandsink@,$(waylandsink),g' \ |
| -e 's,@kms@,$(kms),g' \ |
| -e 's,@vulkan@,$(vulkan),g' \ |
| -e 's/@GST_ABI@/$(gst_abi)/g' \ |
| debian/gstreamer-$$p.install \ |
| > debian/$(gst_pkgname)-$$p.install; \ |
| done |
| |
| for f in $(VERSIONIZE); do \ |
| sed 's/@GST_ABI@/$(gst_abi)/g' debian/gstreamer-$$f \ |
| > debian/$(gst_pkgname)-$$f; \ |
| done |
| |
| sed -e 's/@GST_ABI@/$(gst_abi)/g' -e 's,@wayland@,$(wayland),g' \ |
| debian/libgstreamer-plugins-bad.install \ |
| > debian/libgstreamer-plugins-bad$(gst_deb_abi).install |
| sed 's/@GST_ABI@/$(gst_abi)/g' debian/libgstreamer-plugins-bad-dev.install \ |
| > debian/libgstreamer-plugins-bad$(gst_abi)-dev.install |
| |
| maint: debian/control |
| |
| DEB_CONFIGURE_EXTRA_FLAGS += \ |
| --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ |
| --disable-examples \ |
| --enable-DEBUG \ |
| --enable-debug \ |
| --with-package-name=$(GST_PACKAGE_NAME) \ |
| --disable-pvr \ |
| --disable-mpeg2enc \ |
| --disable-mplex \ |
| --enable-wayland \ |
| --disable-x11 \ |
| --disable-glx \ |
| --disable-opengl \ |
| --enable-gles2 \ |
| |
| |
| common-binary-fixup-arch:: |
| LD_LIBRARY_PATH=debian/libgstreamer-plugins-bad1.0-0/usr/lib/$(DEB_HOST_MULTIARCH):$(LD_LIBRARY_PATH) \ |
| dh_gstscancodecs |
| |
| clean:: |
| # get rid of the sym links |
| for i in $(PLUGINS); do \ |
| rm -f debian/$(gst_pkgname)-$$i.install; \ |
| rm -f debian/$(gst_pkgname)-$$i.preinst; \ |
| done |
| for f in $(VERSIONIZE); do \ |
| rm -f debian/$(gst_pkgname)-$$f; \ |
| done |
| |
| gst_patch = $(shell echo $(gst_version) | cut -d '.' -f 3) |
| gst_patch_next = $(shell expr $(gst_patch) + 1) |
| gst_version_next = $(shell echo $(gst_version) | cut -d '.' -f-2).$(gst_patch_next) |
| DEB_DH_MAKESHLIBS_ARGS_libgstreamer-plugins-bad$(gst_deb_abi) += -V "libgstreamer-plugins-bad$(gst_deb_abi) (>= $(gst_version))" |
| DEB_INSTALL_DOCS_ALL += debian/README.Debian NEWS |
| |
| # Disable inclusion of large upstream ChangeLog |
| DEB_INSTALL_CHANGELOGS_ALL := |
| |
| .PHONY: maint |