#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/autoreconf.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/class/gnome.mk
include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk

LDFLAGS += -Wl,-O1 -Wl,-z,defs -Wl,--warn-unresolved-symbols -Wl,--as-needed

DEB_DH_MAKESHLIBS_ARGS_ALL += --no-act
DEB_CONFIGURE_EXTRA_FLAGS = --enable-gconf-bridge --disable-systemd --disable-packagekit

build/gnome-settings-daemon::
	gcc -o gnome-settings-daemon/gnome-update-wallpaper-cache debian/gnome-update-wallpaper-cache.c `pkg-config --cflags --libs glib-2.0 gdk-3.0 gdk-x11-3.0 gio-2.0 gnome-desktop-3.0`

install/gnome-settings-daemon::
	/usr/bin/install -c gnome-settings-daemon/gnome-update-wallpaper-cache 'debian/tmp/usr/lib/gnome-settings-daemon'

binary-install/gnome-settings-daemon::
	find debian -name '*.a' -delete
	find debian -name '*.la' -delete

common-binary-post-install-arch:: list-missing

clean::
	rm -f gnome-settings-daemon/gnome-update-wallpaper-cache

