#!/usr/bin/make -f # -*- mode: makefile; coding: utf-8 -*- # Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Jonas # Smedegaard # 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 . DEB_AUTO_UPDATE_LIBTOOL = pre DEB_AUTO_UPDATE_ACLOCAL = , DEB_AUTO_UPDATE_AUTOMAKE = , DEB_AUTO_UPDATE_AUTOCONF = , 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 = https://downloads.xiph.org/releases/icecast/ DEB_UPSTREAM_TARBALL_MD5 = 55947c83d31dfcbbede58c9521c676f4 # 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 DEB_DH_INSTALLINIT_ARGS_icecast2 = --no-enable # Debian has a central copy of the GPL, no need to distribute again, and remove the extra changelog. common-binary-post-install-arch:: rm -f $(DEB_DESTDIR)/usr/share/doc/icecast2/COPYING rm -f $(DEB_DESTDIR)/usr/share/doc/icecast2/ChangeLog # 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))