# Contributor: ScrumpyJack <scrumpyjack@st.ilet.to>
# Maintainer: ScrumpyJack <scrumpyjack@st.ilet.to>
pkgname=opencpn
pkgver=4.8.0
pkgrel=0
pkgdesc="OpenCPN is a cross platform electronic navigation system"
url="http://opencpn.org"
arch="x86 x86_64"
license="GPL-2.0"
depends=""
makedepends="wxgtk-dev libexecinfo-dev linux-headers curl-dev cmake gpsd portaudio-dev tinyxml-dev"
install=""
subpackages="$pkgname-doc $pkgname-lang"
source="$pkgname-$pkgver.tar.gz::https://github.com/OpenCPN/OpenCPN/archive/v${pkgver}.tar.gz
CMakeList.txt.patch"

builddir="$srcdir/OpenCPN-${pkgver}"

build() {
	cd "$builddir"
	cmake -DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUNDLE_GSHHS=CRUDE \
		-DBUNDLE_TCDATA=ON \
		-DBUNDLE_DOCS=ON || return 1
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="9c43603c7bed327431066e376fc40ac570d7d7625d234b266bd1beb8d23f9ed1560eee8fb8f1bacc20be757fa0cdf2a189c72f13410fe0d5986cf05ca6bdc0e4  opencpn-4.8.0.tar.gz
79daf622a5a9a54db81a09bc1004819bb4d20ce2959a4d3204e8ff09d4669e55ebb85b37961397cc6c8a00b87e081126685c51f6bdb78d9d324ce4f7c8b2f2ef  CMakeList.txt.patch"
