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

# Read http://wiki.debian.org/PkgSplit "How to split a package into several 
# smaller packages" for details of this file.
# variables MUST be set outside target rules
# target rules MUST start at column 1, then followed by ":"
# actions MUST start after a TAB, not blank spaces
# builddir for using dh_install for .war files.

# Copyright (C) 2009  Andre Felipe Machado <andremachado@techforce.com.br>
# et al from Debian Project http://www.debian.org , Joey Hess, Craig Small.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

	BUILDDIR := debian/build
	DESTDIR := ${CURDIR}/${BUILDDIR}

CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

configure-stamp:
	dh_testdir
	# Add here commands to configure the package.

	touch configure-stamp

build: build-stamp

install: installbasic

	# Add here commands to install the package into debian/php-java-bridge.

# specifiy destdir debian way
	dh_auto_install DESTDIR=${DESTDIR}

installbasic:
	dh_testdir
	dh_testroot
	dh_prep

# Build architecture-independent files here
binary-indep: pointlinux-gnome-desktop

pointlinux-gnome-desktop:
	dh_testdir
	dh_testroot
	dh_installdirs  -p$@
	dh_installchangelogs  -p$@
	dh_installdocs  -p$@
	dh_install
	dh_installman  -p$@
	dh_link  -p$@
	dh_strip  -p$@
	dh_compress  -p$@
	dh_fixperms  -p$@
	dh_makeshlibs -p$@
	dh_installdeb -p$@
	dh_shlibdeps  -p$@
	dh_gencontrol  -p$@
	dh_md5sums  -p$@
	dh_builddeb  -p$@

binary: build install binary-indep
.PHONY: build build-stamp clean binary-indep binarydocs binary install configure configure-stamp installdocs installbasic pointlinux-gnome-desktop
