File: rules

package info (click to toggle)
icecast2 2.4.0-1.1%2Bdeb8u1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 4,808 kB
  • sloc: ansic: 18,292; sh: 11,516; cpp: 2,206; makefile: 237
file content (104 lines) | stat: -rwxr-xr-x 4,229 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Jonas
# Smedegaard <dr@jones.dk>
# Description: Main Debian packaging script for Icecast
#
# 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_AUTOMAKE = 1.11
DEB_AUTO_UPDATE_AUTOCONF = 2.68
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

DEB_UPSTREAM_PACKAGE = icecast
DEB_UPSTREAM_URL = http://downloads.xiph.org/releases/icecast/
DEB_UPSTREAM_TARBALL_MD5 = bb00bfc0d6d2dde24974641085602b81

# suppress check of some images (in addition to defaults)
DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^(win32/running\.bmp|doc/(listener_auth2|stats1|windowtitle|)\.jpg|debian/(changelog|copyright(|_hints|_newhints)))$

DEB_CONFIGURE_SYSCONFDIR = /etc/icecast2
DEB_CONFIGURE_EXTRA_FLAGS = --program-transform-name="s/icecast$$/icecast2/"
DEB_MAKE_INVOKE += PACKAGE=icecast2 docdir=/usr/share/doc/icecast2 pkgdatadir=/usr/share/icecast2
DEB_INSTALL_DIRS_icecast2 = var/log/icecast2
DEB_INSTALL_MANPAGES_icecast2 = debian/icecast2.1

# Debian has a central copy of the GPL, no need to distribute again
common-binary-post-install-arch::
	rm -f $(DEB_DESTDIR)/usr/share/doc/icecast2/COPYING

# Move XSLT templates and CSS files to /etc and replace with symlinks
common-binary-post-install-arch::
	for file in `cd $(DEB_DESTDIR)/usr/share && find icecast2 -type f \( -name *.xsl -or -name *.css \)`; do \
		mkdir -p $(DEB_DESTDIR)/etc/`dirname $$file`; \
		mv $(DEB_DESTDIR)/usr/share/$$file $(DEB_DESTDIR)/etc/$$file; \
		ln -s /etc/$$file $(DEB_DESTDIR)/usr/share/$$file; \
	done

# Upstream requirements
#  Icecast is GPL so needs gnutls variant of CURL
CDBS_BUILD_DEPENDS += , libogg-dev (>> 1.0.0), libvorbis-dev (>> 1.0.0)
CDBS_BUILD_DEPENDS += , libxslt1-dev | libxslt-dev, libxml2-dev
CDBS_BUILD_DEPENDS += , libcurl4-gnutls-dev
CDBS_BUILD_DEPENDS += , libtheora-dev (>= 0.0.0.alpha7), libspeex-dev
CDBS_BUILD_DEPENDS += , po-debconf

# Needed for our regenerating autotools
CDBS_BUILD_DEPENDS += , autoconf-archive

# put aside autogenerated files during build
# TODO: use DEB_UPSTREAM_CRUFT_MOVE when cdbs 0.4.106 is in stable
autodirs = . admin conf doc examples src src/avl src/httpp src/log
autodirs += src/net src/thread src/timing web win32 win32/res
upstreamtmpstuff = $(patsubst %,%/Makefile.in,$(autodirs))
upstreamtmpstuff += configure aclocal.m4 depcomp install-sh missing
upstreamtmpstuff += ltmain.sh
m4files = libtool ltoptions ltsugar ltversion lt~obsolete
#upstreamtmpstuff += $(patsubst %,m4/%.m4,$(m4files))
pre-build:: debian/upstream-stuff
debian/upstream-stuff: debian/stamp-copyright-check
	mkdir -p debian/upstream-stuff
	@for orig in $(upstreamtmpstuff); do \
		backup="debian/upstream-stuff/$$orig"; \
		[ ! -e "$$orig" ] || [ -e "$$backup" ] || { \
			mkdir -p "$$(dirname "$$backup")"; \
			echo mv "$$orig" "$$backup"; \
			mv "$$orig" "$$backup"; \
		}; \
	done
clean::
	@for orig in $(upstreamtmpstuff); do \
		backup="debian/upstream-stuff/$$orig"; \
		if [ -e "$$backup" ]; then \
			if [ -e "$$orig" ]; then \
				echo "rm -rf" "$$orig"; \
				rm -rf "$$orig"; \
			fi; \
			echo mv "$$backup" "$$orig"; \
			mv "$$backup" "$$orig"; \
		fi; \
	done
	rm -rf debian/upstream-stuff

# (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 $(patsubst %,m4/%.m4,$(m4files))