diff options
Diffstat (limited to 'pcr')
-rw-r--r-- | pcr/i2p/PKGBUILD | 79 | ||||
-rw-r--r-- | pcr/i2p/i2p.install | 31 | ||||
-rw-r--r-- | pcr/i2p/wrapper.config | 3 |
3 files changed, 60 insertions, 53 deletions
diff --git a/pcr/i2p/PKGBUILD b/pcr/i2p/PKGBUILD index 6e80c69ac..d8e7b9112 100644 --- a/pcr/i2p/PKGBUILD +++ b/pcr/i2p/PKGBUILD @@ -1,81 +1,82 @@ -# Maintainer (AUR): skydrome <skydrome@i2pmail.org> -# Contributor (AUR): skydrome <skydrome@i2pmail.org> -# Maintainer: Freemor <freemor@freemor.ca> +# Contributor (AUR): skydrome <skydrome@protonmail.com> +# Maintainer (AUR): skydrome <skydrome@protonmail.com> +# Maintainer: Freemor <freemor@fremor.ca> -########[ OPTIONS ]######################################## -# # Uncomment if you do not want to build all language translations #export LG2=en -# -########################################################### - -# parabola changes and rationalle: -# no changes. pkgname=i2p -pkgver=0.9.41 -pkgrel=1 +pkgver=0.9.42 +pkgrel=2 pkgdesc="A distributed anonymous network" url="https://geti2p.net" license=('GPL2') arch=('any') -depends=('java-runtime>=7' 'java-service-wrapper') -makedepends=('apache-ant' 'java-environment>=7') +depends=('java-runtime>=8' 'java-service-wrapper') +makedepends=('java-environment=8' 'apache-ant') [[ "$LG2" != 'en' ]] && makedepends+=('gettext') #optdepends=('gtk2: for rrd graphs') conflicts=('i2p-bin' 'i2p-dev') backup=('opt/i2p/wrapper.config') install='i2p.install' +options=(!strip) -#_url="https://download.i2p2.de/releases/${pkgver}" -_url="https://launchpad.net/i2p/trunk/${pkgver}/+download" +_url="https://download.i2p2.de/releases/${pkgver}" +#_url="https://launchpad.net/i2p/trunk/${pkgver}/+download" source=("${_url}/i2psource_${pkgver}.tar.bz2"{,.sig} 'i2prouter.service' 'i2prouter.sh' 'wrapper.config' 'router.config') -sha256sums=('f988877940b2cff1a90534c47b78343de49cd6290817edb57c0142eecf1d164e' + +sha256sums=('30482b56becb6135ed4b74bd4715906774f7c3f3302753985a5fde363f0cc713' 'SKIP' '9bb899ece87099716da29bac8b7da02916fc325699b68989e73c1fe333a6342f' 'ea8f97e66461d591b1819eab39bbc40056b89ae12f7729b3dd9fd2ce088e5e53' - '315d8128969b372bb553dc2170c3e0709f52e01be77c1db1f071d83569126a70' + 'd32da73b85be527ef0cc3791a2cedab089fed8272c7a70d23bc8edfe49d80b28' '7a4688db826c3dddb762976cd8c9a5d465255c3577069243d8e5af941a4126e2') # https://geti2p.net/en/get-involved/develop/release-signing-key validpgpkeys=('2D3D2D03910C6504C1210C65EE60C0C8EE7256A8') build() { - cd "$srcdir/$pkgname-$pkgver" + cd "$pkgname-$pkgver" - export ANT_HOME=/usr/share/ant + source /etc/ant.conf export ANT_OPTS="-Dfile.encoding=UTF-8" - ant preppkg-linux-only } package() { - cd "$srcdir/$pkgname-$pkgver" + cd "$pkgdir" + + install -dm755 "usr/bin" + install -dm755 "opt/i2p/.tmp" - install -dm755 "$pkgdir/usr/lib/tmpfiles.d" - install -dm755 "$pkgdir/usr/bin" - install -dm750 "$pkgdir/opt/i2p" + cp -r "$srcdir/$pkgname-$pkgver"/pkg-temp/* "opt/i2p" - cp -r pkg-temp/* "$pkgdir/opt/i2p" - cp "$srcdir/wrapper.config" "$pkgdir/opt/i2p" + install -Dm644 "$srcdir/router.config" "opt/i2p/router.config" + install -Dm644 "$srcdir/wrapper.config" "opt/i2p/wrapper.config" + install -Dm755 "$srcdir/i2prouter.sh" "opt/i2p/i2prouter" + install -Dm644 "$srcdir/i2prouter.service" "usr/lib/systemd/system/i2prouter.service" + install -Dm644 "opt/i2p/man/eepget.1" "usr/share/man/man1/eepget.1" + install -Dm644 "opt/i2p/LICENSE.txt" "usr/share/licenses/i2p/LICENSE" + mv opt/i2p/licenses/* "usr/share/licenses/i2p/" - install -Dm644 "$srcdir/router.config" "$pkgdir/opt/i2p/router.config" - install -Dm755 "$srcdir/i2prouter.sh" "$pkgdir/opt/i2p/i2prouter" - install -Dm644 "$srcdir/i2prouter.service" "$pkgdir/usr/lib/systemd/system/i2prouter.service" - install -Dm644 "$pkgdir/opt/i2p/man/eepget.1" "$pkgdir/usr/share/man/man1/eepget.1" - install -Dm644 "$pkgdir/opt/i2p/LICENSE.txt" "$pkgdir/usr/share/licenses/i2p/LICENSE" - mv "$pkgdir"/opt/i2p/licenses/* "$pkgdir/usr/share/licenses/i2p/" + ln -s /opt/i2p/{eepget,i2prouter} "usr/bin/" + chmod +x opt/i2p/{eepget,i2prouter} - ln -s /opt/i2p/{eepget,i2prouter} "$pkgdir/usr/bin/" - chmod +x "$pkgdir"/opt/i2p/{eepget,i2prouter} + chmod -x opt/i2p/*.config + chmod 755 opt/i2p + chown -R 985:985 opt/i2p - echo 'd /run/i2p 0700 i2p i2p -' >"$pkgdir/usr/lib/tmpfiles.d/i2prouter.conf" + echo 'u i2p 985 "I2P Router" /opt/i2p /bin/sh' | + install -Dm644 /dev/stdin "usr/lib/sysusers.d/i2p.conf" + echo 'd /run/i2p 0700 i2p i2p' | + install -Dm644 /dev/stdin "usr/lib/tmpfiles.d/i2p.conf" - sed -i "$pkgdir"/opt/i2p/eepget \ + sed -i opt/i2p/eepget \ -e 's:%INSTALL_PATH:/opt/i2p:g' - sed -i "$pkgdir"/opt/i2p/clients.config \ + sed -i opt/i2p/clients.config \ + -e "s:clientApp.3.startOnLoad=.*:clientApp.3.startOnLoad=false:" \ -e "s:clientApp.4.startOnLoad=.*:clientApp.4.startOnLoad=false:" - rm -r "$pkgdir"/opt/i2p/{osid,postinstall.sh,runplain.sh,INSTALL-headless.txt,LICENSE.txt,licenses,man,lib/wrapper*} + rm -r opt/i2p/{osid,postinstall.sh,runplain.sh,INSTALL-headless.txt,LICENSE.txt,licenses,man,lib/wrapper*} } diff --git a/pcr/i2p/i2p.install b/pcr/i2p/i2p.install index 146cac383..68c5726b2 100644 --- a/pcr/i2p/i2p.install +++ b/pcr/i2p/i2p.install @@ -1,21 +1,24 @@ post_install() { - getent passwd i2p &>/dev/null || { - echo -n ">>> Creating i2p user... " - useradd --system --user-group --home /opt/i2p i2p - echo "done" - } - post_upgrade + echo "==> " + echo "==> I2P Router settings can be adjusted at" + echo "==> http://127.0.0.1:7657/config.jsp" + echo "==> " } +## arg 1: the new package version +## arg 2: the old package version post_upgrade() { - systemd-tmpfiles --create i2prouter.conf - chown -R i2p:i2p /opt/i2p + if (( $(vercmp $2 0.9.39) < 0 )); then + [[ $(id -g i2p) = '985' ]] || { + echo -n ">>> Updating i2p user..." + groupmod --gid 985 i2p + usermod --uid 985 -s /bin/sh i2p + chown -R 985:985 /opt/i2p + echo " done" + } + fi } -pre_remove() { - getent passwd i2p &>/dev/null && { - echo -n ">>> Removing i2p user... " - userdel i2p - echo "done" - } +post_remove() { + rm -f /opt/i2p/lib*.so* } diff --git a/pcr/i2p/wrapper.config b/pcr/i2p/wrapper.config index 6d7ef8aa3..30271d537 100644 --- a/pcr/i2p/wrapper.config +++ b/pcr/i2p/wrapper.config @@ -47,6 +47,9 @@ wrapper.java.additional.4.stripquotes=TRUE #wrapper.java.additional.5=-Djava.net.preferIPv4Stack=true #wrapper.java.additional.6=-Djava.net.preferIPv6Addresses=false +# Location used to hold temporary files. +wrapper.java.additional.7=-Djava.io.tmpdir=/opt/i2p/.tmp + # Initial Java Heap Size (in MB) # If a non-zero value is specified for this property then an appropriate -Xms # parameter will be added. The initial memory must be less than or equal to |