SUMMARY="The PDF viewer for Haiku" 
DESCRIPTION="BePDF is a PDF viewer for Haiku. Besides viewing, it supports \
annotating and user-defined bookmarking for unencrypted PDFs. It's fully \
localized for 20 languages at the moment with additional languages being \
easily added via text files."
HOMEPAGE="http://haikuarchives.github.io/BePDF/" 
SOURCE_URI="https://github.com/HaikuArchives/BePDF/archive/v1.2.0.tar.gz"
CHECKSUM_SHA256="663c8819db01b49227165cfd3f68ba1f659ae004b96f0bac5a7e52f773aed405"
SOURCE_DIR="BePDF-1.2.0"
COPYRIGHT="
	1997 Benoit Triquet
	1999-2000 Hubert Figuiere
	2000-2011 Michael Pfeiffer
	2013-2014 Augustin Cavalier
	"
LICENSE="GNU GPL v2"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86"

SOURCE_URI_2="http://haikuarchives.github.io/BePDF/English.pdf#noarchive"
CHECKSUM_SHA256_2="963fd77bad6f2018e68724d2904f5a5bed922491e281af57a6fdd7854eecb3ab"
SOURCE_URI_3="http://haikuarchives.github.io/BePDF/Deutsch.pdf#noarchive"
CHECKSUM_SHA256_3="54c30bf2907bdd340fe0989a844f949102eeefe8acd53c62cf44e276ac4d08f0"
SOURCE_URI_4="http://haikuarchives.github.io/BePDF/Espa%C3%B1ol.pdf#noarchive"
CHECKSUM_SHA256_4="d753d20d842ee378e7fd17143d0eb9d4996d0ff9026d3cd86667df6765aa4e2a"
SOURCE_URI_5="http://haikuarchives.github.io/BePDF/Italiano.pdf#noarchive"
CHECKSUM_SHA256_5="994998838d6a2121e83f99b9d3f1802500f29b6061c58a88fc44470d50087e93"

PROVIDES="
	bepdf = $portVersion
	app:BePDF = $portVersion
	"
REQUIRES="
	haiku
	lib:liblayout
	lib:libsanta
	lib:libfreetype
	lib:libz
	lib:libbz2
	lib:libpng
	"
BUILD_REQUIRES="
	haiku_devel
	devel:liblayout
	devel:libsanta
	devel:libfreetype
	devel:libz
	devel:libbz2
	devel:libpng
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:gcc
	cmd:make
	cmd:freetype_config
	"

BUILD()
{
	./build.sh
	cp ../../sources-2/*.pdf generated/BePDF/docs/
	cp ../../sources-3/*.pdf generated/BePDF/docs/
	cp ../../sources-4/*.pdf generated/BePDF/docs/
	cp ../../sources-5/*.pdf generated/BePDF/docs/
}

INSTALL()
{
	mkdir -p $appsDir
	cp -dR generated/BePDF $appsDir/BePDF

	addAppDeskbarSymlink $appsDir/BePDF/BePDF
}
