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

build: 
	# build man-page for dh_installlisting and generate .mo files (l10n)
	make

clean:
	dh_testdir
	dh_testroot
	# Add here commands to clean up after the build process.
	make clean
	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs
	# Add here commands to install the package into debian/desktop-profiles.
	# everything done by dh_* scripts

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot	
	install --mode 644 debian/desktop-profiles.overrides debian/desktop-profiles/usr/share/lintian/overrides/desktop-profiles
	make install-l10n PREFIX=./debian/desktop-profiles/usr
	dh_installchangelogs
	dh_installdocs
	dh_installmenu
	dh_installcron
	dh_installman desktop-profiles.7 list-desktop-profiles.1 update-profile-cache.1 dh_installlisting.1 profile-manager.1 path2listing.1
	dh_install dh_installlisting update-profile-cache profile-manager usr/bin
	dh_install listingmodule get_desktop-profiles_variables path usr/share/desktop-profiles/
	dh_install postinst-desktop-profiles usr/share/debhelper/autoscripts/
	dh_link usr/share/desktop-profiles/path usr/share/doc/desktop-profiles/examples/path
	dh_install profile-snippet zlogin-snippet usr/share/doc/desktop-profiles/examples
	dh_install tests.tgz usr/share/doc/desktop-profiles
	dh_install list-desktop-profiles usr/bin/
	dh_install profile-manager.kmdr usr/share/desktop-profiles/kommander-scripts/
	dh_install desktop-profiles etc/default
	dh_install desktop-profiles.csh etc/csh/login.d/
	dh_install desktop-profiles.fish etc/fish.d/
	dh_install desktop-profiles_pshrc.pl etc/pshrc.d/
	dh_install desktop-profiles_zoidrc.pl etc/zoidrc.d/
	dh_install 20desktop-profiles_activateDesktopProfiles etc/X11/Xsession.d/
	dh_install path2listing usr/sbin
	./dh_installlisting
	dh_installdebconf
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
binary-arch: build install
# We have nothing to do by default.

binary: binary-indep
.PHONY: build clean binary-indep binary-arch binary install configure
