#!/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

%:
	dh $@ --with=autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --with-configdir=/usr/share/xscreensaver/config \
		--with-kdessconfigdir=/usr/share/kde4/services/ScreenSavers \
		--bindir=/usr/lib/xscreensaver --enable-static=no \
		LDFLAGS=-Wl,--as-needed

override_dh_auto_install:
	dh_auto_install
	mv $(CURDIR)/debian/rss-glx/usr/lib/xscreensaver/rss-glx_install.pl \
		$(CURDIR)/debian/rss-glx/usr/bin/rss-glx_install
	cp $(CURDIR)/debian/desktop_files/*.desktop \
		$(CURDIR)/debian/rss-glx/usr/share/applications/screensavers
	install -D $(CURDIR)/debian/apport_hook.py \
		$(CURDIR)/debian/rss-glx/usr/share/apport/package-hooks/source_rss-glx.py
	# remove static libraries:
	rm $(CURDIR)/debian/rss-glx/usr/lib/lib*.*a
