File: rules

package info (click to toggle)
libshout 2.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 2,292 kB
  • ctags: 856
  • sloc: sh: 10,934; ansic: 5,773; xml: 726; makefile: 167
file content (91 lines) | stat: -rwxr-xr-x 3,482 bytes parent folder | download
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
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2003 Keegan Quinn <ice@thebasement.org>
# Copyright © 2004, 2005, 2006, 2007, 2008, 2011, 2012, 2013 Jonas
# Smedegaard <dr@jones.dk>
# 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 <http://www.gnu.org/licenses/>.

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