Add PKGBUILD

This commit is contained in:
Arinerron 2019-07-20 13:22:10 -07:00
parent 6a576131f8
commit 99627e168a
No known key found for this signature in database
GPG Key ID: 99383627861C62F0
2 changed files with 101 additions and 15 deletions

View File

@ -1,22 +1,60 @@
url="https://onionr.net/"
# Maintainer: Kevin Froman <contact@onionr.net>
pkgname="onionr"
pkgver=0.0.0
pkgrel=1
pkgdesc="P2P anonymous storage network"
arch=("x86_64")
license=('GPL')
source=("onionr-${pkgver}::git+https://gitlab.com/beardog/onionr.git#branch=master")
md5sums=('SKIP')
makedepends=('git' 'python' 'python-pip')
depends=('tor' 'python' 'python-pip')
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}"
}
build() {
cd "$pkgname-${pkgver}"
cd install
./install_arch.sh
# build
cd "${srcdir}/${pkgname}-${pkgver}"
sh install/build.sh
}
check() {
# post_build
cd "${srcdir}/${pkgname}-${pkgver}"
}
package() {
cd "$pkgname-${pkgver}"
# make install
# "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"
}

48
onionr.install Normal file
View File

@ -0,0 +1,48 @@
pre_install {
# pre_install
cd "${srcdir}/${pkgname}-${pkgver}"
sh install/pre_install.sh
}
post_install {
# post_install
cd "${srcdir}/${pkgname}-${pkgver}"
sh install/post_install.sh
}
pre_upgrade {
# pre_upgrade
cd "${srcdir}/${pkgname}-${pkgver}"
}
post_upgrade {
# post_upgrade
cd "${srcdir}/${pkgname}-${pkgver}"
}
pre_remove {
# pre_remove
cd "${srcdir}/${pkgname}-${pkgver}"
}
post_remove {
# post_remove
cd "${srcdir}/${pkgname}-${pkgver}"
}