#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # # Modified to make a template file for a multi-binary package with separated # build-arch and build-indep targets by Bill Allombert 2001 # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This has to be exported to make some magic below work. export DH_OPTIONS # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) #get the svnversion if the file exists SVNVERSION ?= $(shell dpkg-parsechangelog | grep '^Version:' | grep 'svn' | sed 's/.*svn\([[:digit:]]*\).*/\1/') ifeq "$(SVNVERSION)" "" SVNVERSION = $(shell cat debian/svnrevision) endif clean: dh clean rm -f build-arch-stamp build-indep-stamp config-stamp build: dh_testdir # Add here commands to configure the package. ./bootstrap dh_auto_configure -- --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/usr --enable-goom --enable-vdpau \ --enable-avahi SVN_REV="$(SVNVERSION)" dh build --after dh_auto_configure binary: binary-arch binary-indep binary-indep: dh binary-indep --until dh_installdirs $(MAKE) install-web install-datas install-livedatas prefix=$(CURDIR)/debian/tmp/usr/ mkdir -p $(CURDIR)/debian/tmp/usr/share/applications $(CURDIR)/debian/tmp/usr/share/pixmaps cp $(CURDIR)/tools/Linux/xbmc.png $(CURDIR)/debian/tmp/usr/share/pixmaps/ cp $(CURDIR)/tools/Linux/xbmc.desktop $(CURDIR)/debian/tmp/usr/share/applications/ # xbmc Live files dh_install -i --sourcedir=$(CURDIR)/debian/tmp -XLICENCE -XLiberationSans-Regular.ttf -XLicence.txt -XLicense.txt # XBMC WEB POC dh_install -pxbmc-web ../../web/poc_jsonrpc usr/share/xbmc/web dh_installdocs -i dh binary-indep --after dh_installdocs binary-arch: dh binary-arch --until dh_installdirs $(MAKE) install-binaries install-arch prefix=$(CURDIR)/debian/tmp/usr/ find "debian/tmp/usr/share/xbmc" -regextype posix-extended \ -type f -iregex \ ".*\.so|.*\.vis|.*\.xbs|.*xbmc\.bin|.*xbmc-xrandr" | \ while read FILE; do \ NEW_LOCATION="$$(echo $$FILE | sed -e 's|usr/share|usr/lib|')"; \ install -D "$$FILE" "$$NEW_LOCATION"; \ rm "$$FILE"; \ done $(MAKE) eventclients prefix=$(CURDIR)/debian/tmp/usr installdir=/usr WII_EXTRA_OPTS=-DCWIID_OLD dh_install -a --sourcedir=$(CURDIR)/debian/tmp -XLICENCE -XLiberationSans-Regular.ttf -XLicence.txt -XLicense.txt dh binary-arch --after dh_install --until dh_link find "debian/xbmc-bin/usr/lib" -regextype posix-extended -type f | \ while read FILE; do \ LINK_TARGET="$$(echo "$$FILE" | sed -e 's|debian/xbmc-bin/||')"; \ LINK_DESTINATION="$$(echo "$$FILE" | sed -e 's|debian/xbmc-bin/usr/lib|usr/share|')"; \ dh_link -pxbmc-bin "$$LINK_TARGET" "$$LINK_DESTINATION"; \ done dh binary-arch --after dh_link --before dh_strip dh_strip -a --dbg-package=xbmc-dbg # We don't install shared libraries in standard locations so don't edit # postinst/postrm scripts to call ldconfig dh_makeshlibs -a -n dh binary-arch --after dh_makeshlibs .PHONY: build clean binary-indep binary-arch binary