# Maintainer: jc_gargma # Maintainer (AUR): Fabio 'Lolix' Loli -> https://github.com/FabioLolix # Contributor (AUR): C. Dominik Bódi # Contributor (AUR): Joe Davison # # I maintain this because: # AUR version uses http # AUR version uses unofficial repo # AUR version needlessly purges old build folder # AUR version uses qt-webengine # AUR version lacks additional optimization and hardening flags pkgname=lgogdownloader pkgver=3.8 pkgrel=1.2 pkgdesc="Open source downloader for GOG.com games, uses the GOG.com API" url="https://github.com/Sude-/lgogdownloader" arch=(x86_64 i686 pentium4) license=('custom:WTFPL') depends=('boost-libs' 'curl' 'htmlcxx' 'jsoncpp' 'rhash' 'tinyxml2') makedepends=('cmake' 'boost' 'help2man') source=(${pkgname}-${pkgver}.tar.gz::https://github.com/Sude-/lgogdownloader/archive/v${pkgver}.tar.gz) b2sums=('791db8b24bfcac9c1a3417bb0478b291e6e45f5713e99b3b36c8291e8fb2419e57a76a26abde666b7afaea7dd0b193024d3ae00ea08b45eef9e06ec01bc1b760') prepare() { mkdir $srcdir/${pkgname}-${pkgver}/build } build() { export CFLAGS="$CFLAGS -O3 -fstack-protector-all -flto=4 -fPIE" export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -flto=4 -fPIE" export LDFLAGS="$LDFLAGS,-pie" cd $srcdir/${pkgname}-${pkgver}/build cmake .. \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release \ -DUSE_QT_GUI=OFF make } package() { cd $srcdir/${pkgname}-${pkgver}/build make DESTDIR=${pkgdir} install install -Dm644 $srcdir/${pkgname}-${pkgver}/COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING }