#!/bin/sh
#
# Copyright 2026 Sasa Ostrouska <saxa@droplinegnome.org>
# Available under the terms of the GNU GPL.
#

NAME="highway"
VERSION="1.4.0"
REVISION="1"

PKG_SOURCEURL='https://github.com/google/${NAME}/archive/${VERSION}/${NAME}-${VERSION}.tar.gz'

. $DLG_ROOT/etc/config
. $DLG_ROOT/lib/dl-base

cflags
cxxflags
prepare
analyzesource
configure -D CMAKE_INSTALL_PREFIX=/usr \
      -D CMAKE_BUILD_TYPE=Release  \
      -D BUILD_TESTING=OFF         \
      -D BUILD_SHARED_LIBS=ON      \
      -G Ninja .. 
#make
spewdo "cd $PKG_BUILDROOT/builddir; ninja"
#makeinstall 
spewdo "cd $PKG_BUILDROOT/builddir; $PKG_DESTDIRVAR=$PKG_STAGEROOT ninja install"

tidydocumentation
analyzebinaries
finalizepackage
packagize
cleanup
