#!/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. # 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) CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif config.status: configure dh_testdir CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/opt/livesupport \ --with-www-docroot=/var/www \ --with-apache-group=www-data \ --with-station-audio-out=/dev/dsp \ --with-studio-audio-out=/dev/dsp1 \ --with-studio-audio-cue=/dev/dsp2 \ --with-hostname=localhost build: build-arch build-arch: build-arch-stamp build-arch-stamp: config.status $(MAKE) setup compile touch build-arch-stamp clean: dh_testdir dh_testroot rm -f build-arch-stamp #CONFIGURE-STAMP# -$(MAKE) distclean clean dh_clean install: install-arch install-arch: dh_testdir dh_testroot dh_clean -k -s dh_installdirs -s # this will install everything into /opt/livesupport/usr $(MAKE) install # move the installation to debian/livesupport mkdir -p $(CURDIR)/debian/livesupport/opt mv /opt/livesupport $(CURDIR)/debian/livesupport/opt # now separate the libraries into debian/livesupport-libs mkdir -p $(CURDIR)/debian/livesupport-libs mkdir -p $(CURDIR)/debian/livesupport-libs/opt/livesupport mkdir -p $(CURDIR)/debian/livesupport-libs/opt/livesupport/bin mkdir -p $(CURDIR)/debian/livesupport-libs/opt/livesupport/etc/pango mkdir -p $(CURDIR)/debian/livesupport-libs/opt/livesupport/tmp mkdir -p $(CURDIR)/debian/livesupport-libs/opt/livesupport/usr/lib mv -f $(CURDIR)/debian/livesupport/opt/livesupport/lib \ $(CURDIR)/debian/livesupport-libs/opt/livesupport mv -f $(CURDIR)/debian/livesupport/opt/livesupport/bin/gst-* \ $(CURDIR)/debian/livesupport-libs/opt/livesupport/bin mv -f $(CURDIR)/debian/livesupport/opt/livesupport/usr/lib/pear \ $(CURDIR)/debian/livesupport-libs/opt/livesupport/usr/lib mv -f $(CURDIR)/debian/livesupport/opt/livesupport/etc/pango/* \ $(CURDIR)/debian/livesupport-libs/opt/livesupport/etc/pango # now separate the station (server) files into debian/livesupport-station mkdir -p $(CURDIR)/debian/livesupport-station mkdir -p $(CURDIR)/debian/livesupport-station/opt/livesupport mkdir -p $(CURDIR)/debian/livesupport-station/opt/livesupport/bin mkdir -p $(CURDIR)/debian/livesupport-station/opt/livesupport/etc mkdir -p $(CURDIR)/debian/livesupport-station/opt/livesupport/tmp mkdir -p $(CURDIR)/debian/livesupport-station/opt/livesupport/var/LiveSupport mkdir -p $(CURDIR)/debian/livesupport-station/opt/livesupport/usr/lib mv -f $(CURDIR)/debian/livesupport/opt/livesupport/bin/scheduler \ $(CURDIR)/debian/livesupport/opt/livesupport/bin/scheduler.sh \ $(CURDIR)/debian/livesupport/opt/livesupport/bin/postInstallStation.sh \ $(CURDIR)/debian/livesupport/opt/livesupport/bin/livesupport-station \ $(CURDIR)/debian/livesupport-station/opt/livesupport/bin mv -f $(CURDIR)/debian/livesupport/opt/livesupport/etc/scheduler.xml* \ $(CURDIR)/debian/livesupport/opt/livesupport/etc/odbc* \ $(CURDIR)/debian/livesupport/opt/livesupport/etc/gtk* \ $(CURDIR)/debian/livesupport-station/opt/livesupport/etc mv -f $(CURDIR)/debian/livesupport/opt/livesupport/var/LiveSupport/alib \ $(CURDIR)/debian/livesupport/opt/livesupport/var/LiveSupport/archiveServer \ $(CURDIR)/debian/livesupport/opt/livesupport/var/LiveSupport/getid3 \ $(CURDIR)/debian/livesupport/opt/livesupport/var/LiveSupport/index.php \ $(CURDIR)/debian/livesupport/opt/livesupport/var/LiveSupport/htmlUI \ $(CURDIR)/debian/livesupport/opt/livesupport/var/LiveSupport/storageServer \ $(CURDIR)/debian/livesupport/opt/livesupport/var/LiveSupport/storageAdmin \ $(CURDIR)/debian/livesupport-station/opt/livesupport/var/LiveSupport mv -f $(CURDIR)/debian/livesupport/opt/livesupport/bin/backup.sh \ $(CURDIR)/debian/livesupport/opt/livesupport/bin/dumpDbSchema.sh \ $(CURDIR)/debian/livesupport/opt/livesupport/bin/import.sh \ $(CURDIR)/debian/livesupport/opt/livesupport/bin/restore.sh \ $(CURDIR)/debian/livesupport-station/opt/livesupport/bin mv -f $(CURDIR)/debian/livesupport/opt/livesupport/var/cache \ $(CURDIR)/debian/livesupport-station/opt/livesupport/var mv -f $(CURDIR)/debian/livesupport/opt/livesupport/etc/apache \ $(CURDIR)/debian/livesupport/opt/livesupport/etc/pg_hba.conf \ $(CURDIR)/debian/livesupport-station/opt/livesupport/etc # now separate the studio (client) files into debian/livesupport-studio mkdir -p $(CURDIR)/debian/livesupport-studio mkdir -p $(CURDIR)/debian/livesupport-studio/opt/livesupport mkdir -p $(CURDIR)/debian/livesupport-studio/opt/livesupport/bin mkdir -p $(CURDIR)/debian/livesupport-studio/opt/livesupport/etc mkdir -p $(CURDIR)/debian/livesupport-studio/opt/livesupport/tmp mkdir -p $(CURDIR)/debian/livesupport-studio/opt/livesupport/var/LiveSupport mv -f $(CURDIR)/debian/livesupport/opt/livesupport/bin/gLiveSupport \ $(CURDIR)/debian/livesupport/opt/livesupport/bin/gLiveSupport.sh \ $(CURDIR)/debian/livesupport-studio/opt/livesupport/bin mv -f $(CURDIR)/debian/livesupport/opt/livesupport/etc/gLiveSupport.xml* \ $(CURDIR)/debian/livesupport-studio/opt/livesupport/etc mv -f $(CURDIR)/debian/livesupport/opt/livesupport/var/LiveSupport/Widgets \ $(CURDIR)/debian/livesupport/opt/livesupport/var/LiveSupport/gLiveSupport*.res \ $(CURDIR)/debian/livesupport/opt/livesupport/var/LiveSupport/livesupport.png \ $(CURDIR)/debian/livesupport/opt/livesupport/var/LiveSupport/icon*.png \ $(CURDIR)/debian/livesupport/opt/livesupport/var/LiveSupport/stationLogo.png \ $(CURDIR)/debian/livesupport/opt/livesupport/var/LiveSupport/testAudio.ogg \ $(CURDIR)/debian/livesupport/opt/livesupport/var/LiveSupport/testAudio.ogg.license \ $(CURDIR)/debian/livesupport-studio/opt/livesupport/var/LiveSupport mkdir -p $(CURDIR)/debian/livesupport-studio/usr/share/applications cp -a $(CURDIR)/debian/livesupport-studio.desktop \ $(CURDIR)/debian/livesupport-studio/usr/share/applications/ dh_desktop -plivesupport-studio dh_installmenu dh_install -s binary-common: dh_testdir dh_testroot # dh_installchangelogs # dh_installdocs # dh_installexamples dh_installmenu # dh_installdebconf # dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime # Replaced dh_installinit with manual init script installation # because invoke.rc-d is linked to /bin/true in the knoppix hdd install. # Should be changed back when/if knoppix is fixed. # dh_installinit --update-rcd-params="defaults 92" # dh_installcron # dh_installinfo # dh_installman dh_link dh_strip dh_compress dh_fixperms dh_makeshlibs dh_installdeb dh_shlibdeps -l${CURDIR}/debian/livesupport-libs/opt/livesupport/lib dh_gencontrol dh_md5sums dh_builddeb # Build architecture dependant packages using the common target. binary-arch: build-arch install-arch $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common binary: binary-arch .PHONY: build clean binary-arch binary install install-arch