debian swirl logo

Back to the packages list liquidsoap

#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/ocaml.mk

DEFAULT_FONT := /usr/share/fonts/truetype/ttf-liberation/LiberationSans-Regular.ttf

DEB_CONFIGURE_EXTRA_FLAGS := \
  --enable-ogg-dynamic-plugin --enable-schroedinger-dynamic-plugin --enable-flac-dynamic-plugin \
  --enable-speex-dynamic-plugin --enable-vorbis-dynamic-plugin --enable-theora-dynamic-plugin \
  --enable-sdl-dynamic-plugin --enable-gavl-dynamic-plugin --enable-mad-dynamic-plugin \
  --enable-faad-dynamic-plugin --enable-xmlplaylist-dynamic-plugin --enable-lastfm-dynamic-plugin \
  --enable-voaacenc-dynamic-plugin --enable-taglib-dynamic-plugin --enable-cry-dynamic-plugin \
  --enable-portaudio-dynamic-plugin --enable-pulseaudio-dynamic-plugin --enable-ao-dynamic-plugin \
  --enable-graphics-dynamic-plugin --enable-bjack-dynamic-plugin --enable-soundtouch-dynamic-plugin \
  --enable-ladspa-dynamic-plugin --enable-oss-dynamic-plugin --enable-alsa-dynamic-plugin \
  --enable-flac.ogg-dynamic-plugin --enable-samplerate-dynamic-plugin --enable-lame-dynamic-plugin \
  --enable-dssi-dynamic-plugin --enable-lo-dynamic-plugin --enable-camlimages-dynamic-plugin \
  --enable-gstreamer-dynamic-plugin --enable-gd-dynamic-plugin --with-default-font=$(DEFAULT_FONT) \
  --enable-opus-dynamic-plugin --enable-frei0r-dynamic-plugin --enable-shine-dynamic-plugin \
  --disable-custom
DEB_MAKE_BUILD_TARGET := all doc
DEB_MAKE_INSTALL_TARGET := doc install DESTDIR=$(CURDIR)/debian/tmp/ OCAMLFIND_DESTDIR=$(CURDIR)/debian/tmp/$(OCAML_STDLIB_DIR) \
		                       prefix= $(CURDIR)/debian/tmp/usr sysconfdir=$(CURDIR)/debian/tmp/etc \
				       INSTALL_DAEMON= no OCAMLFIND_LDCONF=ignore
DEB_INSTALL_MANPAGES_liquidsoap := doc/liquidsoap.1
DEB_COMPRESS_EXCLUDE := .pdf
DEB_DH_INSTALL_ARGS_liquidsoap := -Xplugins

ifeq ($(OCAML_NATDYNLINK),no)
  DEB_CONFIGURE_EXTRA_FLAGS += --disable-nativecode
  export OCAMLINIT_SED := -e 's/^NODYN: //'
else
  OCAML_DHOCAML_FLAGS := \
    -Nliquidsoap-plugin-sdl -Nliquidsoap-plugin-alsa -Nliquidsoap-plugin-ao \
    -Nliquidsoap-plugin-jack -Nliquidsoap-plugin-icecast -Nliquidsoap-plugin-faad \
    -Nliquidsoap-plugin-flac -Nliquidsoap-plugin-gavl -Nliquidsoap-plugin-graphics \
    -Nliquidsoap-plugin-ladspa -Nliquidsoap-plugin-lastfm -Nliquidsoap-plugin-mad \
    -Nliquidsoap-plugin-ogg -Nliquidsoap-plugin-oss -Nliquidsoap-plugin-portaudio \
    -Nliquidsoap-plugin-pulseaudio -Nliquidsoap-plugin-samplerate \
    -Nliquidsoap-plugin-schroedinger -Nliquidsoap-plugin-soundtouch -Nliquidsoap-plugin-speex \
    -Nliquidsoap-plugin-taglib -Nliquidsoap-plugin-theora -Nliquidsoap-plugin-voaacenc \
    -Nliquidsoap-plugin-vorbis -Nliquidsoap-plugin-xmlplaylist -Nliquidsoap-plugin-lame \
    -Nliquidsoap-plugin-dssi -Nliquidsoap-plugin-lo -Nliquidsoap-plugin-camlimages \
    -Nliquidsoap-plugin-gstreamer -Nliquidsoap-plugin-gd -Nliquidsoap-plugin-opus \
    -Nliquidsoap-plugin-frei0r -Nliquidsoap-plugin-shine
    export OCAMLINIT_SED := -e '/^NODYN: /d'
endif

makebuilddir/liquidsoap::
		[ -f debian/autoreconf.before ] || dh_autoreconf ./bootstrap
		mkdir -p $(CURDIR)/debian/tmp/$(OCAML_STDLIB_DIR)

install/liquidsoap::
		cp $(CURDIR)/scripts/liquidsoap.initd $(CURDIR)/debian/liquidsoap.init

common-binary-post-install-arch::
		find $(CURDIR)/debian/liquidsoap-plugin-* -maxdepth 0 -type d | while read f; do \
	  plugin= `basename $$f | sed -e 's#liquidsoap-plugin-##'`; \
		  rm -f $(CURDIR)/debian/liquidsoap-plugin-$$plugin.onodefined; \
		  find $$f -name '*.cma' | while read i; do \
		    ocamlobjinfo $$i | grep 'Unit name' | cut -d' ' -f 3 >> \
		      $(CURDIR)/debian/liquidsoap-plugin-$$plugin.onodefined; \
		  done; \
		done

binary-install/liquidsoap::
		make doc
		mv $(CURDIR)/debian/liquidsoap/etc/liquidsoap/radio.liq $(CURDIR)/debian/liquidsoap/etc/liquidsoap/radio.liq.example
		chmod +x $(CURDIR)/debian/liquidsoap/etc/liquidsoap/radio.liq.example
		chmod -x $(CURDIR)/debian/liquidsoap/usr/share/doc/liquidsoap/examples/*.liq

binary-install/liguidsoap::
		sed -e s#/usr/lib/python.*/site-packages/liquidsoap#/var/lib/liguidsoap#g -i $(CURDIR)/debian/liguidsoap/usr/bin/liguidsoap
		dh_pysupport /var/lib/liguidsoap

clean::
		dh_autoreconf_clean
		rm -rf src/liquidsoap src/META radio.liq.example \
		       src/SVN.ml src/io/liquidsoap_depend autodoc \
		       doc/manual debian/liquidsoap.init src/dllliquidsoap.so \
		       src/libliquidsoap.a debian/*.onodefined **/*debhelper.log

Builds:

liguidsoap
control gui for liquidsoap
liquidsoap
audio streaming language
liquidsoap-mode
emacs mode for editing liquidsoap code
liquidsoap-plugin-all
audio streaming language -- all plugins
liquidsoap-plugin-alsa
audio streaming language -- alsa plugin
liquidsoap-plugin-ao
audio streaming language -- ao plugin
liquidsoap-plugin-camlimages
audio streaming language -- camlimages plugin
liquidsoap-plugin-dssi
audio streaming language -- dssi plugin
liquidsoap-plugin-faad
audio streaming language -- faad plugin
liquidsoap-plugin-flac
audio streaming language -- flac plugin
liquidsoap-plugin-frei0r
audio streaming language -- frei0r plugin
liquidsoap-plugin-gavl
audio streaming language -- gavl plugin
liquidsoap-plugin-gd
audio streaming language -- libgd plugin
liquidsoap-plugin-graphics
audio streaming language -- graphics plugin
liquidsoap-plugin-gstreamer
audio streaming language -- gstreamer plugin
liquidsoap-plugin-icecast
audio streaming language -- icecast plugin
liquidsoap-plugin-jack
audio streaming language -- jack plugin
liquidsoap-plugin-ladspa
audio streaming language -- ladspa plugin
liquidsoap-plugin-lame
audio streaming language -- lame plugin
liquidsoap-plugin-lastfm
audio streaming language -- lastfm plugin
liquidsoap-plugin-lo
audio streaming language -- lo plugin
liquidsoap-plugin-mad
audio streaming language -- mad plugin
liquidsoap-plugin-ogg
audio streaming language -- ogg plugin
liquidsoap-plugin-opus
audio streaming language -- opus plugin
liquidsoap-plugin-oss
audio streaming language -- oss plugin
liquidsoap-plugin-portaudio
audio streaming language -- portaudio plugin
liquidsoap-plugin-pulseaudio
audio streaming language -- pulseaudio plugin
liquidsoap-plugin-samplerate
audio streaming language -- samplerate plugin
liquidsoap-plugin-schroedinger
audio streaming language -- schroedinger plugin
liquidsoap-plugin-sdl
audio streaming language -- sdl plugin
liquidsoap-plugin-shine
audio streaming language -- shine plugin
liquidsoap-plugin-soundtouch
audio streaming language -- soundtouch plugin
liquidsoap-plugin-speex
audio streaming language -- speex plugin
liquidsoap-plugin-taglib
audio streaming language -- taglib plugin
liquidsoap-plugin-theora
audio streaming language -- theora plugin
liquidsoap-plugin-voaacenc
audio streaming language -- voaacenc plugin
liquidsoap-plugin-vorbis
audio streaming language -- vorbis plugin
liquidsoap-plugin-xmlplaylist
audio streaming language -- xmlplaylist plugin