#!/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_ALL += --dbgsym-migration='gnome-applets-dbg (<< 3.20.0-1~)'
DEB_DH_MAKESHLIBS_ARGS_gnome-applets += --no-act

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

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

binary-install/gnome-applets::
	rm debian/gnome-applets/usr/lib/gnome-applets/5.0/libwindow-picker-applet.la

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

clean::
	rm -f $(MANPAGES)
