#!/usr/bin/make -f # Debian rules file foor xscreensaver (1.26), adapted by Larry Daffner from # Sample debian.rules file - for GNU Hello (1.3). # Copyright 1994,1995 by Ian Jackson. # I hereby give you perpetual unlimited permission to copy, # modify and relicense this file, provided that you do not remove # my name from the file itself. (I assert my moral right of # paternity under the Copyright, Designs and Patents Act 1988.) # This file may have to be extensively modified # There used to be `source' and `diff' targets in this file, and many # packages also had `changes' and `dist' targets. These functions # have been taken over by dpkg-source, dpkg-genchanges and # dpkg-buildpackage in a package-independent way, and so these targets # are obsolete. # Modified on July 2007 by Jose Luis Rivas. # Including quilt.make include /usr/share/quilt/quilt.make export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) build: build-stamp build-stamp: dh_testdir cp debian/xscreensaver.svg utils/images/xscreensaver.svg # generate POT file for translators cd po; intltool-update --verbose -p; cd .. # these are for some reason in the upstream tarball, preserve them [ -f driver/XScreenSaver_ad.h.upstream ] || [ ! -f driver/XScreenSaver_ad.h ] || \ mv driver/XScreenSaver_ad.h driver/XScreenSaver_ad.h.upstream [ -f driver/XScreenSaver_Xm_ad.h.upstream ] || [ ! -f driver/XScreenSaver_Xm_ad.h ] || \ mv driver/XScreenSaver_Xm_ad.h driver/XScreenSaver_Xm_ad.h.upstream # configs files are outdated so we build with the updated ones [ ! -f config.sub.upstream ] && mv config.sub config.sub.upstream && cp /usr/share/misc/config.sub config.sub [ ! -f config.guess.upstream ] && mv config.guess config.guess.upstream && cp /usr/share/misc/config.guess config.guess # Configure for xscreensaver ./configure --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) \ --prefix=/usr \ --without-gl --with-pam --with-gtk --without-kerberos \ --with-gnome --with-hackdir=/usr/lib/xscreensaver \ --with-configdir=/usr/share/xscreensaver/config \ --mandir=/usr/share/man --with-login-manager \ --with-proc-interrupts cp driver/XScreenSaver.ad driver/XScreenSaver.ad-nogl $(MAKE) touch build-stamp clean: clean-patched unpatch clean-patched: dh_testdir dh_testroot rm -f build-stamp [ ! -f Makefile ] || $(MAKE) distclean rm -f config.log config.h rm -rf driver/XScreenSaver.ad-nogl rm -rf *~ debian/tmp debian/xscreensaver debian/xscreensaver-gl \ debian/xscreensaver-gl-extra debian/xscreensaver-data \ debian/xscreensaver-data-extra rm -rf debian/*~ debian/files* rm -f po/.intltool-merge-cache [ ! -f config.sub.upstream ] || mv config.sub.upstream config.sub [ ! -f config.guess.upstream ] || mv config.guess.upstream config.guess [ ! -f driver/XScreenSaver_ad.h.upstream ] || mv driver/XScreenSaver_ad.h.upstream driver/XScreenSaver_ad.h [ ! -f driver/XScreenSaver_Xm_ad.h.upstream ] || mv driver/XScreenSaver_Xm_ad.h.upstream driver/XScreenSaver_Xm_ad.h rm -f utils/images/xscreensaver.svg dh_clean binary-indep: build # Nothing to do here binary-arch: build dh_testdir dh_testroot dh_clean -k rm -rf debian/tmp debian/xscreensaver \ debian/xscreensaver-gnome debian/xscreensaver-nognome \ debian/xscreensaver-data debian/xscreensaver-data-extra $(MAKE) install_prefix=$(CURDIR)/debian/tmp \ GTK_DATADIR=/usr/share KDEDIR=/usr install # Adding `NoDisplay=True' in gnome-screensaver-properties.desktop echo "NoDisplay=true" >> debian/tmp/usr/share/applications/gnome-screensaver-properties.desktop dh_installdirs -a dh_installdocs -a dh_installchangelogs -a # install .desktop files used by gnome-screensaver mkdir -p $(CURDIR)/debian/tmp/usr/share/applications/screensavers cp $(CURDIR)/debian/screensavers-desktop-files/*.desktop \ $(CURDIR)/debian/tmp/usr/share/applications/screensavers/ # # Adding a `x` at the end of all manpages: #for i in $$( ls debian/tmp/usr/share/man/man6/ ); do mv debian/tmp/usr/share/man/man6/$$i debian/tmp/usr/share/man/man6/$$( echo $$i )x; done for i in debian/tmp/usr/share/man/man6/*; do mv $${i} $${i}x; done mkdir -p debian/tmp/usr/share/livewp/external_themes ls for i in `cd debian/tmp/usr/share/xscreensaver/config ; find . -name "*.xml" -type f -print`; do echo $${i} ; cat debian/tmp/usr/share/xscreensaver/config/$${i} | grep "/\n\\2<\/name>\n \/usr\/lib\/xscreensaver\/\1<\/exec_path>\n -window-id<\/window_id> \n<\/theme>/g' > debian/tmp/usr/share/livewp/external_themes/$${i}; done dh_movefiles -a dh_install -a # make sure we got everything that was installed # test `find debian/tmp -type f -print | wc -l` -eq 0 find debian/tmp -type f -print dh_installpam -a dh_installmenu -a # install app-defaults to proper places #install -m 644 -o root -g root driver/XScreenSaver.ad-nogl \ # debian/xscreensaver-data/etc/X11/app-defaults/XScreenSaver-nogl # Hopefully prevent nVidia brain damage # This is supposed to prevent accidentially linking against the # binary nvidia drivers. Deinstall or divert them before building! #test ! `eval ldd debian/xscreensaver-gl/usr/lib/xscreensaver/* |grep -q libGLcore && echo $$?` dh_link -a dh_strip -a dh_compress -a dh_fixperms -a dh_installdeb -a dh_shlibdeps -a dh_gencontrol -a dh_md5sums -a dh_builddeb -a # Below here is fairly generic really binary: binary-indep binary-arch .PHONY: binary binary-arch binary-indep clean