diff options
author | Daniel Bermond | 2022-03-16 12:35:50 -0300 |
---|---|---|
committer | Daniel Bermond | 2022-03-16 12:35:50 -0300 |
commit | 6dfb65a48c5f260a1245d4c12c06e64f62fa6b25 (patch) | |
tree | 6056cd5cae0ac5cb68892ca44ad2a209f2fc8812 /PKGBUILD | |
download | aur-6dfb65a48c5f260a1245d4c12c06e64f62fa6b25.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f5e2ff9ee778 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: Daniel Bermond <dbermond@archlinux.org> + +pkgbase=lightway-core +pkgname=('lightway-core' 'lightway-core-doc') +pkgver=1.1 +pkgrel=1 +pkgdesc='A VPN protocol by ExpressVPN' +arch=('x86_64') +url='https://www.expressvpn.com/lightway/' +license=('GPL2') +makedepends=('git' 'ruby-ceedling' 'doxygen' 'graphviz') +source=("https://github.com/expressvpn/lightway-core/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz" + 'git+https://github.com/wolfSSL/wolfssl.git' + '010-lighway-core-disable-werror-on-wolfssl.patch') +sha256sums=('c67be127110866029996cc70ef93a19f2ce7101f4f953ae14d5c8c7539660d0e' + 'SKIP' + '60e4d5490192bc1ed6840665345e854eca5715a898824b90fa012245272f619b') + +prepare() { + local _wolfssl_commit + _wolfssl_commit="$(awk '/he_wolfssl_commit/ { print $3 }' "${pkgname}-${pkgver}/unix.yml")" + git -C wolfssl config --local advice.detachedHead false + git -C wolfssl checkout --quiet "$_wolfssl_commit" + + patch -d wolfssl -Np1 -i "${srcdir}/010-lighway-core-disable-werror-on-wolfssl.patch" + + mkdir -p "${pkgname}-${pkgver}/third_party" + cp -af wolfssl "${pkgname}-${pkgver}/third_party" +} + +build() { + export CFLAGS+=' -ffat-lto-objects' + cd "${pkgname}-${pkgver}" + ceedling release project:linux + doxygen +} + +check() { + cd "${pkgname}-${pkgver}" + ceedling test project:linux +} + +package_lightway-core() { + install -D -m644 "${pkgname}-${pkgver}"/public/*.h -t "${pkgdir}/usr/include" + install -D -m644 "${pkgname}-${pkgver}"/build/release/libhelium.a -t "${pkgdir}/usr/lib" +} + +package_lightway-core-doc() { + pkgdesc+=' (documentation)' + arch=('any') + + install -d -m755 "${pkgdir}/usr/share/doc" + cp -dr --no-preserve='ownership' "lightway-core-${pkgver}"/html "${pkgdir}/usr/share/doc/lightway-core" +} |