Onionr/install/PKGBUILD

61 lines
1.5 KiB
Bash
Raw Normal View History

2019-07-22 23:59:48 +00:00
# Maintainer: Aaron Esau <aur@aaronesau.com>
2019-07-23 00:04:02 +00:00
pkgname="onionr-git"
2019-07-22 23:59:48 +00:00
pkgver="0.1"
pkgrel="1"
conflicts=("onionr2")
license=("GPL")
arch=("i686" "x86_64")
md5sums=("SKIP")
url="https://onionr.net/"
pkgdesc="anonymous P2P communication platform"
source=("${pkgname}-${pkgver}::git+https://gitlab.com/beardog/onionr.git#branch=master")
makedepends=("python" "python-setuptools" "python-pip")
depends=("git" "curl" "tor")
rinstall() {
if [ -f "$1" ]; then
install -D "$1" "$2/" "$3" "$4"
return 0
fi
for file in $(find "$1" -type f -printf '%P\n'); do
install -D "$1/$file" "$2/$file" "$3" "$4"
done
return 0
}
prepare() {
# pre_build
cd "${srcdir}/${pkgname}-${pkgver}"
}
2019-03-27 18:57:59 +00:00
build() {
2019-07-22 23:59:48 +00:00
# build
cd "${srcdir}/${pkgname}-${pkgver}"
sh install/build.sh
}
check() {
# post_build
cd "${srcdir}/${pkgname}-${pkgver}"
2019-03-27 18:57:59 +00:00
}
package() {
2019-07-22 23:59:48 +00:00
# "movements"
# ensure target directories exist
mkdir -p "$pkgdir//usr/bin/"
mkdir -p "$pkgdir//etc/systemd/system/"
mkdir -p "$pkgdir//usr/share/onionr"
# copy files over and change perms
rinstall "${srcdir}/${pkgname}-${pkgver}/install/onionr" "${pkgdir}//usr/bin/" --mode=755 --owner="root" --group="root"
rinstall "${srcdir}/${pkgname}-${pkgver}/install/onionr.service" "${pkgdir}//etc/systemd/system/" --mode=644 --owner="root" --group="root"
rinstall "${srcdir}/${pkgname}-${pkgver}/." "${pkgdir}//usr/share/onionr" --mode=755 --owner="root" --group="root"
2019-03-27 18:57:59 +00:00
}