SUMMARY="A full-featured e-mail client"
DESCRIPTION="Beam (BEware, Another Mailer) is an open source e-mail client \
that aims to be fast, stable and feature-complete.

Main features

- Multiple mail accounts (POP & SMTP), with support for default-accounts and \
automatic selection of appropriate account when replying, etc.
- Fully MIME compliant (Beam passes the MIME-Torture-Test)
- Performance adequate for large mail folders (>10,000 messages)
- POP-authentication (POP3, APOP, CRAM-MD5, DIGEST-MD5)
- SMTP-authentication (SmtpAfterPop, PLAIN, LOGIN, CRAM-MD5, DIGEST-MD5)
- Preliminary IMAP-support (fetches mails just as POP3 does)
- Full header-control, mail-headers can be edited directly before sending
- Identities, separating the user info (name, mail address, signature) from \
the network info (server address, login & password)
- Multiple signatures that can be dynamic by using scripts
- Filter capabilities (using SIEVE and a SPAM-filter)
- Customized filter chains to help with sorting emails
- Customizable shortcuts
- Customizable icon set"
HOMEPAGE="https://github.com/HaikuArchives/Beam/"
COPYRIGHT="2000-2015 Oliver Tappe
	2016-2020 Adrien Destugues, Jérôme Duval,  Humdinger, Reznikov Sergei"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://github.com/HaikuArchives/beam/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="4e8d9044c0b2ccce7f63742c65807950b717a30a34d9c126d46321eac7e4b069"
SOURCE_FILENAME="Beam-$portVersion.tar.gz"
SOURCE_DIR="Beam-$portVersion"

ARCHITECTURES="all"

PROVIDES="
	beam = $portVersion
	app:Beam = $portVersion
	"
REQUIRES="
	haiku
	lib:libiconv
	lib:liblayout
	lib:libpcre
	lib:libssl
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libiconv
	devel:liblayout >= 1.4.1
	devel:libpcre >= 1.2.9
	devel:libssl
	"
BUILD_PREREQUIRES="
	cmd:bison
	cmd:flex
	cmd:gcc
	cmd:jam
	"

BUILD()
{
	jam -q # Parallel builds broken
}

INSTALL()
{
	mkdir -p $appsDir/Beam
	cp -a generated/distro-haiku/* $appsDir/Beam
	cp -a Changes.txt Readme.md $appsDir/Beam
	mkdir -p $appsDir/Beam/Icons
	cp -a resources/iconset* $appsDir/Beam/Icons
	cd $appsDir/Beam/tools
	ln -s ../lib .
	ln -s ../add-ons .

	addAppDeskbarSymlink $appsDir/Beam/Beam
}
