summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authoranonimal2018-07-26 04:10:33 +0000
committeranonimal2018-07-26 04:10:33 +0000
commitde532aafa8dcd8e653b9e0c09119644d8c9fd3cc (patch)
tree5ad8f078702c44a567315520aba1079dd45d3bbb /PKGBUILD
downloadaur-de532aafa8dcd8e653b9e0c09119644d8c9fd3cc.tar.gz
v0.1.0-alpha-rc2
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD57
1 files changed, 57 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..65264506ca3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,57 @@
+# Maintainer: anonimal <anonimal at getmonero dot org>
+
+pkgname=('kovri')
+# AUR's stupid pkgver convention prevents hypens
+pkgver=0.1.0_alpha_rc2
+pkgrel=1
+pkgdesc="Official package for Kovri: a free, decentralized, anonymity technology developed by Monero"
+arch=('x86_64' 'i686' 'armv7h' 'aarch64')
+url="https://getkovri.org/"
+license=('custom:BSD-3')
+depends=('boost-libs')
+makedepends=('git' 'cmake' 'boost' 'openssl' 'clang')
+provides=('kovri')
+conflicts=('kovri-git')
+source=("${pkgname}"::"git+https://github.com/monero-project/kovri#tag=v${pkgver//_/-}")
+sha256sums+=('SKIP')
+
+prepare()
+{
+ git -C "${pkgname}" submodule update --init --recursive --force
+}
+
+build()
+{
+ cd "${srcdir}/${pkgname}"
+ make CC=clang CXX=clang++ release
+}
+
+# TODO(anonimal): hack. We should supply env options to `make install`
+package()
+{
+ # Local resources path
+ local _data_dir="${HOME}/.kovri"
+ if [[ ! -d $_data_dir ]]; then
+ mkdir "$_data_dir" 2>/dev/null
+ fi
+
+ # Remove existing resources
+ local _core=${_data_dir}/core
+ local _client=${_data_dir}/client
+ local _resources=($_core ${_client}/address_book/addresses ${_client}/address_book/addresses.csv ${_client}/certificates)
+ for _resource in ${_resources[@]}; do
+ if [[ -e $_resource ]]; then
+ rm -fr $_resource 2>/dev/null
+ fi
+ done
+
+ # Install new resources
+ cp -fR "${srcdir}/${pkgname}/pkg/client" "${HOME}/.kovri/"
+ install -b -Dm600 "${srcdir}/${pkgname}/pkg/config/kovri.conf" "${HOME}/.kovri/config/kovri.conf"
+ install -b -Dm600 "${srcdir}/${pkgname}/pkg/config/tunnels.conf" "${HOME}/.kovri/config/tunnels.conf"
+
+ # Install remaining package
+ install -Dm644 "${srcdir}/${pkgname}/LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
+ install -Dm755 "${srcdir}/${pkgname}/build/kovri" "${pkgdir}/usr/bin/kovri"
+ install -Dm755 "${srcdir}/${pkgname}/build/kovri-util" "${pkgdir}/usr/bin/kovri-util"
+}