All pastes #290734 Raw Edit

Someone

public text v1 · immutable
#290734 ·published 2006-12-24 09:08 UTC
rendered paste body
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/dpatch/dpatch.make

DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

export QTDIR=$(shell for qtdir in /usr/share/qt3 /usr/share/qt; do if test -d $$qtdir; then echo $$qtdir; break; fi; done)

configure: configure-stamp
configure-stamp: patch-stamp
        dh_testdir

        ./configure --prefix=/usr --enable-all --disable-festival

        qmake -o Makefile PREFIX=/usr mythplugins.pro

        touch configure-stamp

build: build-stamp
build-stamp: configure-stamp
        dh_testdir

        $(MAKE) $(CCVARS)

        touch build-stamp

clean:
        dh_testdir
        dh_testroot
        rm -f build-stamp configure-stamp

        [ ! -f Makefile ] || $(MAKE) distclean

        find . -name '.qmake*' | xargs --no-run-if-empty rm -f
        rm -f config.mak config.h
        rm -f debian/shlibs.local

        debian/rules unpatch

        dh_clean Makefile config.pro mythgallery/mythgallery/config.h \
        mythmusic/mythmusic/config.h mythgallery/mythgallery/config.pro \
        mythmusic/mythmusic/config.pro mythdvd/mythdvd/config.h \
        mythdvd/mythdvd/config.pro mythdvd/mtd/config.pro \
        mythphone/mythphone/config.h mythphone/mythphone/config.pro \
        config.log mythconfig.mak mytharchive/mytharchive/config.h \
        mytharchive/mytharchive/config.pro

install: build
        dh_testdir
        dh_testroot
        dh_clean -k
        dh_installdirs -pmythdvd var/lib/mythdvd/temp
        dh_installdirs -pmythmusic etc/mythtv usr/share/mythtv/sql
        dh_installdirs -pmythnews
        dh_installdirs -pmythvideo var/lib/mythvideo
        dh_installdirs -pmythweather etc/mythtv

        dh_installdirs -pmythweb var/cache/mythweb/image_cach\
        e var/www etc/mythtv usr/share/mythtv etc/apache2/sites-available

        for plugin in mytharchive mythbrowser mythcontrols mythflix mythdvd \
        mythgallery mythgame mythmusic mythnews mythphone mythvideo \
        mythweather; do \
                $(MAKE) -C $$plugin install INSTALL_ROOT=$(CURDIR)/debian/$$plugin; \
        done

        find debian/mytharchive/usr/share/mythtv -type f -exec chmod 0644 {} \;

        mv debian/mythflix/usr/share/mythtv/themes/default/news-info-bg.png \
        debian/mythflix/usr/share/mythtv/themes/default/flix-info-bg.png

# Handle the mythweb install
        cp -R mythweb $(CURDIR)/debian/mythweb/usr/share/mythtv

        cp debian/mythwebdir debian/mythweb/etc/apache2/sites-available/

        mv debian/mythweb/usr/share/mythtv/mythweb/.htaccess \
        debian/mythweb/usr/share/mythtv/mythweb/.htaccess.dist
        mv debian/mythweb/usr/share/mythtv/mythweb/includes/config.php \
        debian/mythweb/usr/share/mythtv/mythweb/includes/config.php.dist

        rm debian/mythweb/usr/share/mythtv/mythweb/LICENSE
        rm debian/mythweb/usr/share/mythtv/mythweb/README
        rm debian/mythweb/usr/share/mythtv/mythweb/TODO

        dh_movefiles --sourcedir=debian/mytharchive
        -find debian/mytharchive -type d -exec rmdir -p --ignore-fail-on-non-empty {} \;

# Build architecture-independent files here.
binary-indep: build install
        dh_testdir -i
        dh_testroot -i
        dh_installdocs -pmythweb mythweb/README
        dh_installdocs -pmytharchive-data  mytharchive/TODO mytharchive/README mytharchive/AUTHORS
        dh_installdocs -i
        dh_installmenu -i
        dh_installchangelogs -i
        dh_link -i
        dh_compress -i
        dh_fixperms -i
        dh_installdeb -i
        dh_gencontrol -i
        dh_md5sums -i
        dh_builddeb -i

binary-arch: build install
        dh_testdir -s
        dh_testroot -s
        dh_installdebconf -s
        dh_installdocs -pmytharchive mytharchive/TODO mytharchive/README mytharchive/AUTHORS
        dh_installdocs -pmythbrowser mythbrowser/README mythbrowser/AUTHORS
        dh_installdocs -pmythcontrols mythcontrols/README mythcontrols/AUTHORS
        dh_installdocs -pmythflix mythflix/README mythflix/AUTHORS
        dh_installdocs -pmythdvd mythdvd/README
        dh_installdocs -pmythgallery mythgallery/README mythgallery/AUTHORS
        dh_installdocs -pmythgame mythgame/README
        dh_installdocs -pmythmusic mythmusic/README mythmusic/AUTHORS
        dh_installdocs -pmythnews mythnews/README mythnews/AUTHORS
        dh_installdocs -pmythphone mythphone/README mythphone/AUTHORS
        dh_installdocs -pmythvideo mythvideo/README
        dh_installdocs -pmythweather mythweather/README mythweather/AUTHORS
        dh_installdocs -s
        dh_installchangelogs -s
        dh_link -s
        dh_strip -s
        dh_compress -s
        dh_fixperms -s
        dh_installdeb -s
        dh_shlibdeps -s
        dh_gencontrol -s
        dh_md5sums -s
        dh_builddeb -s

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure