#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2009, 2010, 2011, 2012 Jonas Smedegaard <dr@jones.dk>
# Description: Main Debian packaging script for Pinot
#
# 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, 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/>.

-include /usr/share/cdbs/1/rules/upstream-tarball.mk
include /usr/share/cdbs/1/rules/autoreconf.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/debhelper.mk

DEB_UPSTREAM_URL = http://pinot-search.googlecode.com/files
DEB_UPSTREAM_TARBALL_MD5 = 1d186dff07fbe0037cc6e5540056cf77

# Limit linking to actually used libs
LDFLAGS += -Wl,--as-needed

DEB_DH_MAKESHLIBS_ARGS = -Xusr/lib/pinot

binary-fixup/pinot::
	chmod a+x $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/pinot/*.sh

binary-install/pinot::
	dh_icons

# Needed by upstream build process
CDBS_BUILD_DEPENDS += , libcurl4-openssl-dev, libxapian-dev, libboost-dev
CDBS_BUILD_DEPENDS += , libexttextcat-dev, libtag1-dev, libsqlite3-dev
CDBS_BUILD_DEPENDS += , libgmime-2.6-dev | libgmime-2.4-dev, libxml++2.6-dev, libdbus-glib-1-dev
CDBS_BUILD_DEPENDS += , libsigc++-2.0-dev, libglib2.0-dev, libssl-dev
CDBS_BUILD_DEPENDS += , libglibmm-2.4-dev, libgtkmm-2.4-dev, shared-mime-info
CDBS_BUILD_DEPENDS += , desktop-file-utils, libattr1-dev, libexiv2-dev (>= 0.18~)
