#!/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 include /usr/share/gnome-pkg-tools/1/rules/clean-la.mk export HOME=$(CURDIR)/fake-home CFLAGS += -Wno-error CXXFLAGS += -Wno-error LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed DEB_MAKE_CHECK_TARGET = check || true # upstream version with epoch gst_version := $(shell echo $(DEB_VERSION) | cut -d '-' -f 1) gst_major := 0 gst_minor := 10 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) (>= 0.10.26.3) gst_pkgname := gstreamer$(gst_abi) # debug package DEB_DH_STRIP_ARGS += --dbg-package=$(gst_pkgname)-xvbo-dbg DEB_COMPRESS_EXCLUDE = .sgml .devhelp .ps .pdf # disable all CPU specific optimizations in commands launched by this Makefile # using liboil; this is to work around liboil related build failures which # are not specially interesting to catch on buildds as these might run very # specific hardware OIL_CPU_FLAGS := 0 export OIL_CPU_FLAGS # The plugins are basically the same. # Link special names to a template file. # still need "*.install" to be done by hand PLUGINS = xvbo # Let's decide the package name and url depending on the distribution DISTRO = "$(shell dpkg-vendor --query vendor)" GST_PACKAGE_NAME := "GStreamer XVBO Plugin (unknown Debian derivative)" GST_PACKAGE_ORIGIN="http://packages.qa.debian.org/gst-plugins-xvbo$(gst_abi)" ifeq ($(DISTRO),"Debian") GST_PACKAGE_NAME := "GStreamer XVBO Plugin (Debian)" GST_PACKAGE_ORIGIN="http://packages.qa.debian.org/gst-plugins-xvbo$(gst_abi)" endif ifeq ($(DISTRO),"Ubuntu") GST_PACKAGE_NAME := "GStreamer XVBO Plugin (Ubuntu)" GST_PACKAGE_ORIGIN="https://launchpad.net/distros/ubuntu/+source/gst-plugins-xvbo$(gst_abi)" endif # setup links for packages pre-build:: for p in $(PLUGINS); do \ rm -f debian/$(gst_pkgname)-$$p.install; \ sed \ -e 's/@GST_ABI@/$(gst_abi)/g' \ debian/gstreamer-$$p.install \ >debian/$(gst_pkgname)-$$p.install; \ done maint: debian/control debian/build-deps: debian/build-deps.in debian/rules cat $< >$@ debian/control:: debian/control.in debian/build-deps debian/mk.control debian/rules debian/changelog force perl debian/mk.control | \ sed 's/@GST_VERSION@/$(gst_version)/g' | \ sed 's/@GST_ABI@/$(gst_abi)/g' | \ sed 's/@GST_PKGNAME@/$(gst_pkgname)/g' | \ sed 's/@GST_LIB@/$(gst_lib)/g' | \ sed 's/@GST_LIB_DEV@/$(gst_lib_dev)/g' | \ sed 's/@GST_LIB_DEV_DEP@/$(gst_lib_dev_dep)/g' | \ sed "s/@GST_EXTRA_BUILD_DEPENDS@/$(gst_extra_build_depends)/g" | \ sed "s/@linux@/`type-handling any linux-gnu`/g" >$@ DEB_CONFIGURE_EXTRA_FLAGS += \ --disable-examples \ --enable-debug \ --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ --with-package-name=$(GST_PACKAGE_NAME) \ --with-package-origin=$(GST_PACKAGE_ORIGIN) \ --with-install-plugins-helper="/usr/bin/gstreamer-codec-install" clean:: # get rid of the symlinks for i in $(PLUGINS); do \ rm -f debian/$(gst_pkgname)-$$i.install; \ rm -f debian/$(gst_pkgname)-$$i.preinst; \ done -rm -rf $(CURDIR)/fake-home DEB_INSTALL_DOCS_ALL += debian/README.Debian NEWS # Disable inclusion of large upstream ChangeLog # override shlibs for libraries from this source before computing dependencies # of packages generated from this source; we already have inter-dependencies # expressed manually in the control file, we do not need the shlibs to add # duplicates # (this rule runs just before the dh_shlibdeps) common-binary-fixup-arch:: mkdir -p $(CURDIR)/fake-home HOME=$(CURDIR)/fake-home \ dh_gstscancodecs -rm -f debian/shlibs.local rm -rf $(CURDIR)/fake-home cat debian/*/DEBIAN/shlibs | \ sed -n -r -e 's/(([^ ]+: )?([^ ]+) ([^ ]+)) .*/\1/p' \ >debian/shlibs.local get-orig-source: cd .. && tar czf $(TARBALL) --exclude $(PACKAGE)*/debian --exclude $(PACKAGE)*/.git $(PACKAGE)*/* # (this rules runs just after the dh_shlibdeps) common-binary-predeb-arch:: -rm -f debian/shlibs.local force: .PHONY: maint force