Skip to content

Instantly share code, notes, and snippets.

@blackbeam blackbeam/PKGBUILD
Created Aug 16, 2017

Embed
What would you like to do?
iri AUR
post_install() {
chown iri.iri var/lib/iri/db
chown iri.iri var/lib/iri/ixi
}
[Unit]
Description=IOTA Reference Implementation
After=network.target
[Service]
Type=simple
PIDFile=/run/nginx.pid
PrivateDevices=yes
SyslogLevel=err
ExecStart=/usr/bin/java -jar /usr/lib/iri/iri.jar -c /etc/iri.ini
KillSignal=SIGTERM
KillMode=mixed
[Install]
WantedBy=multi-user.target
# Iri user and group
u iri - "IOTA IRI user"
g iri - "IOTA IRI group"
m iri iri
pkgname=iri
pkgver=1.3.1
pkgrel=1
pkgdesc="IOTA Reference Implementation"
url="https://www.iotatoken.com/"
arch=('any')
license=('GPL')
depends=("java-runtime")
makedepends=("java-environment" "maven")
source=("v${pkgver}.tar.gz::https://github.com/iotaledger/iri/archive/v${pkgver}.tar.gz"
iri.sysusers
iri.service)
md5sums=('104f4067d638946576df80168271653f'
'5d084e0c2e3ebfe8d92b278169eb6925'
'278341275ee68400b066ea5d64f42966')
install=iri.install
build(){
cd "iri-${pkgver}"
mvn clean compile
mvn package
}
package() {
cd "iri-${pkgver}"
install -Dm644 "$srcdir/iri.sysusers" "$pkgdir/usr/lib/sysusers.d/iri.conf"
install -Dm644 "target/iri-${pkgver}.jar" "$pkgdir/usr/lib/iri/iri.jar"
install -Dm644 "$srcdir/iri.service" "${pkgdir}/usr/lib/systemd/system/iri.service"
mkdir -p "$pkgdir/var/lib/iri/db"
mkdir -p "$pkgdir/var/lib/iri/ixi"
mkdir -p "$pkgdir/etc"
cat << EOF >> "$pkgdir/etc/iri.ini"
[IRI]
PORT = 14700
UDP_RECEIVER_PORT = 14600
TCP_RECEIVER_PORT = 15600
NEIGHBORS =
IXI_DIR = /var/lib/iri/ixi
HEADLESS = true
DEBUG = true
TESTNET = false
DB_PATH = /var/lib/iri/db
EOF
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.