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 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
|
#!/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_DH_AUTORECONF_ARGS=--as-needed
CFLAGS += -Wno-error
CXXFLAGS += -Wno-error
LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed
DEB_MAKE_CHECK_TARGET = check || true
# 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.10.0)
gst_pkgname=gstreamer$(gst_abi)
gst_deb_abi=$(gst_abi)-0
gst_extra_build_depends =
# 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-ugly $(EXTRA_PLUGINS)
ifeq ($(DEB_HOST_ARCH_OS),linux)
PLUGINS +=
endif
VERSIONIZE= \
plugins-ugly-doc.install \
# debug package
DEB_DH_STRIP_ARGS := --dbg-package=$(gst_pkgname)-plugins-ugly-dbg
# Let's decide the package name and url depending on the distribution
DISTRO = "$(shell dpkg-vendor --query vendor)"
GST_PACKAGE_NAME := "GStreamer Ugly Plugins (unknown Debian derivative)"
GST_PACKAGE_ORIGIN="http://packages.qa.debian.org/gst-plugins-ugly$(gst_abi)"
ifeq ($(DISTRO),"Debian")
GST_PACKAGE_NAME := "GStreamer Ugly Plugins (Debian)"
GST_PACKAGE_ORIGIN="http://packages.qa.debian.org/gst-plugins-ugly$(gst_abi)"
endif
ifeq ($(DISTRO),"Ubuntu")
GST_PACKAGE_NAME := "GStreamer Ugly Plugins (Ubuntu)"
GST_PACKAGE_ORIGIN="https://launchpad.net/distros/ubuntu/+source/gst-plugins-ugly$(gst_abi)"
endif
# setup links for packages
pre-build::
for p in $(PLUGINS); do \
rm -f debian/$(gst_pkgname)-$$p.install; \
cat debian/gstreamer-$$p.install | \
sed 's/@GST_ABI@/$(gst_abi)/g' \
> debian/$(gst_pkgname)-$$p.install; \
done
for f in $(VERSIONIZE); do \
cat debian/gstreamer-$$f | \
sed 's/@GST_ABI@/$(gst_abi)/g' \
> debian/$(gst_pkgname)-$$f; \
done
maint: debian/control
debian/build-deps: debian/build-deps.in debian/rules
cat $< > $@
for plugin in $(EXTRA_PLUGINS) ; do \
sh debian/extra deps $$plugin >> $@; \
done
sort $@ -o $@
debian/control:: debian/control.in debian/build-deps debian/mk.control debian/rules
perl debian/mk.control | \
sed -e 's/@GST_VERSION@/$(gst_version)/g' \
-e 's/@GST_ABI@/$(gst_abi)/g' \
-e 's/@GST_PKGNAME@/$(gst_pkgname)/g' \
-e 's/@GST_LIB@/$(gst_lib)/g' \
-e 's/@GST_LIB_DEV@/$(gst_lib_dev)/g' \
-e 's/@GST_LIB_DEV_DEP@/$(gst_lib_dev_dep)/g' \
-e 's/@GST_EXTRA_BUILD_DEPENDS@/$(gst_extra_build_depends)/g' \
-e '/^Build-Depends\(-Indep\)\?/s/,\( *,\)*/,/g' \
-e '/^Build-Depends\(-Indep\)\?/s/\ *,\ */,\n /g' \
>$@
for plugin in $(EXTRA_PLUGINS) ; do \
sh debian/extra control $$plugin | \
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_PLUGINS_LIB@/$(gst_plugins_lib)/g' | \
sed 's/@GST_PLUGINS_LIB_DEV@/$(gst_plugins_lib_dev)/g' | \
sed 's/@GST_PLUGINS_LIB_DEV_DEP@/$(gst_plugins_lib_dev_dep)/g' | \
sed 's/@GST_GCONF_LIB@/$(gst_gconf_lib)/g' | \
sed 's/@GST_GCONF_LIB_DEV@/$(gst_gconf_lib_dev)/g' | \
sed 's/@GST_GCONF_LIB_DEV_DEP@/$(gst_gconf_lib_dev_dep)/g' >> $@; \
done
DEB_CONFIGURE_EXTRA_FLAGS += \
--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
--disable-examples \
--enable-DEBUG \
--enable-debug \
--with-package-name=$(GST_PACKAGE_NAME) \
--with-package-origin=$(GST_PACKAGE_ORIGIN)
# only build the docs on arches which can
ifeq (,$(findstring $(DEB_HOST_ARCH),m68k arm))
DEB_CONFIGURE_EXTRA_FLAGS += --enable-gtk-doc
endif
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
common-binary-fixup-arch::
dh_gstscancodecs
DEB_INSTALL_DOCS_ALL += debian/README.Debian NEWS
# Disable inclusion of large upstream ChangeLog
DEB_INSTALL_CHANGELOGS_ALL :=
.PHONY: maint
|