debian swirl logo

Back to the packages list freevo

#!/usr/bin/make -f

DEB_PYTHON2_MODULE_PACKAGES= freevo python-freevo

DEBIAN_VERSION:= $(shell head -1 debian/changelog | cut -d\( -f2 | cut -d\) -f1)
UPSTREAM_VERSION:= 1.9.2-svn

#configure/freevo::
#	#this is needed in SVN versions to build documentations
#	#cd Docs/installation && docbook2html -o html howto.sgml
#	#but also locales
#	sh autogen.sh
#	echo '__revision__="11545"' > src/revision.py

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk

# this is already copied in debian/copyright
DEB_DH_INSTALL_ARGS= -XAquaFusion_Icons_LICENSE -XCOPYING

build/freevo::
		./autogen.sh
	#this is broken at this point
	echo "__revision__ = 'upstream'" > src/revision.py

install/freevo::

		: # Replace all '#!' calls to python with /usr/bin/python
		: # and make them executable
		for i in debian/tmp/usr/bin/freevo debian/tmp/usr/share/freevo/htdocs/downloadurl `find debian/tmp -type f -name "*py" ` ; do \
		  sed '1s,#!.*python[^ ]*\(.*\),#! /usr/bin/python \1,' \
			"$$i" > "$$i.temp"; \
		  if cmp --quiet "$$i" "$$i.temp"; then \
		    rm -f "$$i.temp"; \
		  else \
		    mv -f "$$i.temp" "$$i"; \
		    chmod 755 "$$i"; \
		    echo "fixed interpreter: $$i"; \
		  fi; \
		done

		: #fill __init__.py so that they are not butchered by pysupport
		for i in `find debian/tmp -type f -name "__init__.py" -size 0 `; do  echo '#placeholder' >> "$$i" ; echo "sos $$i" ; done

		mv $(CURDIR)/debian/tmp/usr/share/doc/freevo-$(UPSTREAM_VERSION) \
			$(CURDIR)/debian/tmp/usr/share/doc/freevo

		mv $(CURDIR)/debian/tmp/usr/bin/freevo  $(CURDIR)/debian/tmp/usr/bin/freevo.real
		install  $(CURDIR)/debian/scripts/freevo $(CURDIR)/debian/tmp/usr/bin/freevo
		install  $(CURDIR)/debian/scripts/freevo+log $(CURDIR)/debian/tmp/usr/share/freevo/contrib/freevo+log

	#clean up dreaded folder.png problem
		rm -f debian/tmp/usr/share/freevo/icons/themes/geexbox/mimetypes/folder.png
		ln -sv folder_image.png debian/tmp/usr/share/freevo/icons/themes/geexbox/mimetypes/folder.png

	dh_installinit -pfreevo --no-start --name= freevo_xserver
	dh_installinit -pfreevo --no-start --name= freevo_recordserver
	dh_installinit -pfreevo --no-start --name= freevo_encodingserver
	dh_installinit -pfreevo --no-start --name= freevo_webserver
	dh_installinit -pfreevo --no-start --name= freevo_rssserver

binary-install/freevo-doc::
		cd debian/freevo-doc/usr/share/doc/freevo/ && rm -f README RELEASE_NOTES INSTALL

binary-install/freevo-data::
		for i in VeraBd.ttf VeraBI.ttf VeraIt.ttf VeraMoBd.ttf VeraMoBI.ttf VeraMoIt.ttf VeraMono.ttf VeraSeBd.ttf VeraSe.ttf Vera.ttf ; do \
			dh_link -pfreevo-data /usr/share/fonts/truetype/ttf-bitstream-vera/$$i \
				/usr/share/freevo/fonts/$$i ;\
		done
		for i in `cd debian/freevo-data/usr/share/freevo/fonts ; echo Deja*`; do \
			rm -v debian/freevo-data/usr/share/freevo/fonts/$$i ;\
			dh_link -pfreevo-data /usr/share/fonts/truetype/ttf-dejavu/$$i \
				/usr/share/freevo/fonts/$$i ;\
		done

	# Temporaly hacks to fix file permissions
		chmod a-x debian/freevo-data/usr/share/freevo/skins/main/Tux* \
			debian/freevo-data/usr/share/freevo/skins/osd/blurr.fxd \
			debian/freevo-data/usr/share/freevo/fonts/Sansumi-DemiBold.ttf \
			debian/freevo-data/usr/share/freevo/images/atlantice/back_black.jpg \
			debian/freevo-data/usr/share/freevo/skins/osd/base.fxd
		find  debian/freevo-data/usr/share/freevo -type f -name '*.png' -print0 | xargs -0 chmod a-x


clean::
		rm -f version.pyc

Builds:

freevo-data
home theater framework - themes and data
freevo-doc
home theater framework - documentation
freevo
home theater framework - binaries
freevo-lirc
home theater framework - lirc support
python-freevo
home theater framework - python modules