#!/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/class/gnome.mk
include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
include /usr/share/gnome-pkg-tools/1/rules/gnome-version.mk
-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk

LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed

DATADIR = /usr/share/gnome-applets

DEB_CONFIGURE_EXTRA_FLAGS += \
	--with-pythondir=$(DATADIR) \
	--enable-ipv6 \
	--enable-suid=no

MANPAGES += debian/cpufreq-selector.1
DEB_INSTALL_CHANGELOGS_ALL = ./NEWS

DEB_DH_STRIP_ARGS += --dbg-package=gnome-applets-dbg

# Build manual pages
build/gnome-applets:: $(MANPAGES)

debian/cpufreq-selector.1: debian/cpufreq-selector.sgml
	docbook-to-man $< > $@

binary-install/gnome-applets::
	dh_python3 -pgnome-applets

binary-install/gnome-applets-data::
	dh_python3 -pgnome-applets-data $(DATADIR)

clean::
	rm -f $(MANPAGES)
