mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-11-03 04:17:17 -05:00
103 lines
3.8 KiB
Makefile
Executable File
103 lines
3.8 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
# -*- mode: makefile; coding: utf-8 -*-
|
|
# Copyright © 2004-2008 Jonas Smedegaard <dr@jones.dk>
|
|
|
|
#DEB_AUTO_UPDATE_LIBTOOL = pre
|
|
DEB_AUTO_UPDATE_ACLOCAL = ,
|
|
DEB_AUTO_UPDATE_AUTOMAKE = ,
|
|
DEB_AUTO_UPDATE_AUTOCONF = ,
|
|
DEB_AUTO_UPDATE_AUTOAUTO = ,
|
|
|
|
include /usr/share/cdbs/1/rules/upstream-tarball.mk
|
|
|
|
include /usr/share/cdbs/1/rules/autoreconf.mk
|
|
include /usr/share/cdbs/1/rules/utils.mk
|
|
include /usr/share/cdbs/1/class/autotools.mk
|
|
#include /usr/share/cdbs/1/class/autotools-vars.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 = b1402712a79734d4720c8fe15fd9fb10
|
|
|
|
# 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, 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 doc/assets doc/assets/css doc/assets/font
|
|
autodirs += doc/assets/img doc/img examples src src/avl src/httpp src/log
|
|
autodirs += src/net src/thread src/timing src/tests 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; \
|
|
rm -fv debian/stamp-autotools* debian/*autoreconf*
|
|
|
|
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))
|
|
|
|
|