debian swirl logo

Back to the packages list libshout

#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2003 Keegan Quinn 
# Copyright © 2004, 2005, 2006, 2007, 2008, 2011, 2012, 2013 Jonas
# Smedegaard 
# Description: Main Debian packaging script for libshout
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see .

DEB_AUTO_UPDATE_LIBTOOL = pre
DEB_AUTO_UPDATE_ACLOCAL = 1.11
DEB_AUTO_UPDATE_AUTOCONF = 2.68
DEB_AUTO_UPDATE_AUTOHEADER = 2.68
DEB_AUTO_UPDATE_AUTOMAKE = 1.11
include /usr/share/cdbs/1/rules/upstream-tarball.mk
include /usr/share//cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/debhelper.mk

stem = shout
abi = 3
srcpkg = lib$(stem)
lib = lib$(stem)
libpkg = lib$(stem)$(abi)
devpkg = lib$(stem)$(abi)-dev

# Needed by upstream build
deps = libogg-dev, libvorbis-dev, pkg-config, libtheora-dev, libspeex-dev

# Needed for our packaging
deps-pkg += , d-shlibs (>= 0.48)

CDBS_BUILD_DEPENDS += , $(deps), $(deps-pkg)

# Multiarch quirk (see also other uses of that variable in this file)
CDBS_PREDEPENDS_$(libpkg) = $(if $(DEB_HOST_MULTIARCH),multiarch-support)

DEB_UPSTREAM_PACKAGE = $(srcpkg)
DEB_UPSTREAM_URL = http://downloads.us.xiph.org/releases/$(srcpkg)
DEB_UPSTREAM_TARBALL_MD5 = 11765b2592e7ea623ccd93d3f8df172c

DEB_INSTALL_EXAMPLES_$(devpkg) = examples/example.c

DEB_CONFIGURE_EXTRA_FLAGS += --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)

# avoid unneeded .la file
binary-post-install/$(libpkg):: debian/stamp-local-strip-la
debian/stamp-local-strip-la: binary-install/$(libpkg)
		find debian -type f -name '*.la' -delete
		touch $@
clean::
		rm -f debian/stamp-local-strip-la

# Let d-shlibs calculate development package dependencies
#  and handle shared library install
binary-post-install/$(libpkg) binary-post-install/$(devpkg):: debian/stamp-local-shlibs-$(lib)
debian/stamp-local-shlibs-$(lib): binary-install/$(libpkg) binary-install/$(devpkg) debian/stamp-local-strip-la
		d-shlibmove --commit \
			--multiarch \
			--override s/ld1-dev// \
			--movedev "debian/tmp/usr/include/*" usr/include/ \
			--movedev "debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/*" \
				usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
			debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/$(lib).so
		touch $@
clean::
		rm -f debian/stamp-local-shlibs-$(lib)

# put aside autogenerated files during build
DEB_UPSTREAM_CRUFT_MOVE = Makefile.in $(patsubst %,%/Makefile.in,doc examples include include/shout src win32)
DEB_UPSTREAM_CRUFT_MOVE += $(patsubst %,src/%/Makefile.in,avl httpp net thread timing)
DEB_UPSTREAM_CRUFT_MOVE += configure aclocal.m4 depcomp install-sh missing
DEB_UPSTREAM_CRUFT_MOVE += ltmain.sh m4/libtool.m4 m4/ltoptions.m4 m4/ltversion.m4

# (re)generate most possible autotools files
DEB_ACLOCAL_ARGS = -Im4 --install --force
DEB_AUTOMAKE_ARGS = --add-missing --copy --foreign --force
DEB_MAKE_CLEAN_TARGET = distclean
clean::
		rm -f m4/pkg.m4

Builds:

libshout3-dev
mp3/ogg vorbis broadcast streaming library (development)
libshout3
mp3/ogg vorbis broadcast streaming library