Created
March 3, 2016 19:42
-
-
Save radfish/79779502ae781f3c32cd to your computer and use it in GitHub Desktop.
zeronet-git PKGBUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: redfish <redfish at galactica dot pw> | |
# Contributor: Lothar_m <lothar_m at riseup dot net> | |
pkgname='zeronet-git' | |
_gitname='ZeroNet' | |
_gitroot='https://github.com/HelloZeroNet/ZeroNet.git' | |
pkgver=0.3.5.r26.g5b821c4 | |
pkgrel=1 | |
arch=('any') | |
url="https://zeronet.io/" | |
depends=('python2>=2.7.10' | |
'python2-gevent' | |
'python2-msgpack' | |
) | |
makedepends=('git') | |
license=('GPL2') | |
pkgdesc="Decentralized websites using Bitcoin crypto and the BitTorrent network." | |
provides=(zeronet) | |
conflicts=(zeronet) | |
source=("git://github.com/HelloZeroNet/ZeroNet.git" | |
"zeronet.conf" | |
"zeronet.service") | |
md5sums=('SKIP' | |
'1c2281156533c912e407cf64f6a57e96' | |
'35a1d8325701eb000a4c3a28b7499096') | |
install="zeronet.install" | |
backup=("etc/zeronet.conf") | |
options=(!strip) # attempt to strip binaries fromA dependent libs fial | |
pkgver() { | |
cd "$srcdir/$_gitname" | |
# Most recent unannotated tag reachable from last commit without 'v' prefix | |
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' | |
} | |
build() { | |
cd ${srcdir} | |
msg "Connecting to GIT server...." | |
if [ -d "$_gitname" ] ; then | |
cd "$_gitname" && git pull origin master | |
msg "The local files are updated." | |
else | |
git clone ${_gitroot} | |
fi | |
msg "GIT checkout done or server timeout" | |
} | |
package() { | |
cd "$srcdir/$_gitname" | |
mkdir -p "$pkgdir/opt/zeronet" | |
# zeronet.py expects log directory to exist | |
mkdir -p "$pkgdir/opt/zeronet/log" | |
# There is no setup.py shipped, so brute-force copy | |
cp -a "$srcdir/$_gitname/." "$pkgdir/opt/zeronet/" | |
install -D -m644 "$srcdir/zeronet.conf" "$pkgdir/etc/zeronet.conf" | |
install -D -m644 "$srcdir/zeronet.service" "$pkgdir/usr/lib/systemd/system/zeronet.service" | |
# install license | |
install -D -m644 "$srcdir/$_gitname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[global] | |
# ui_ip = * | |
# ui_password = anypassword |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=ZeroNet: a decentralized web platform | |
[Service] | |
User=zeronet | |
Group=zeronet | |
WorkingDirectory=~ | |
ExecStart=/usr/bin/env python2 zeronet.py --config_file /etc/zeronet.conf | |
Restart=on-failure | |
[Install] | |
WantedBy=default.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment