jobcomm/i2p/PKGBUILD

93 lines
4.2 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcomm/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
# comment LG2 out if you do want to build all language translations
export LG2=en
pkgname=i2p pkgver=2.4.0 pkgrel=02 pkgdesc="A distributed anonymous network -en w/o systemd"
url="https://geti2p.net" depends=('java-runtime>=17') # 'java-service-wrapper')
makedepends=('java-environment>=17' 'ant')
#optdepends=('gtk2: for rrd graphs')
conflicts=('i2p-bin' 'i2p-dev') backup=('opt/i2p/wrapper.config') install='i2p.install'
options=(!strip)
_url="https://files.i2p-projekt.de/${pkgver}"
#_url="https://launchpad.net/i2p/trunk/${pkgver}/+download"
source=("${_url}/i2psource_${pkgver}.tar.bz2"{,.sig}
#"https://download.db-ip.com/free/dbip-country-lite-$(date +%Y-%m).mmdb.gz"
# 'i2prouter.service'
'i2p.tmpfiles' 'wrapper.config' 'router.config' 'i2prouter.bash' 'i2prouter.sh'
'chromium-i2p.sh'
#upstream.patch::'https://github.com/i2p/i2p.i2p/commit/6c0e18d3.patch'
)
prepare() { cd "$pkgname-$pkgver"
#patch -Np1 -i ../upstream.patch ||true cp -f ../dbip-country-lite-$(date +%Y-%m).mmdb.gz
#installer/resources/GeoLite2-Country.mmdb.gz
}
build() { cd "$pkgname-$pkgver" export JAVA_HOME="${JAVA_HOME:-/usr/lib/jvm/default}"
ant -Dfile.encoding=UTF-8 \ -Djavac.compilerargs=-Xlint:-options \ -Dbuild.reproducible=true \
-Djavac.release=17 \ preppkg-linux-only
}
package() { cd "$pkgdir"
install -dm755 "usr/bin" install -dm755 "opt/i2p"
cp -r "$srcdir/$pkgname-$pkgver"/pkg-temp/* "opt/i2p"
# install -Dm644 "$srcdir/i2prouter.service" "usr/lib/systemd/system/i2prouter.service"
install -Dm644 "$srcdir/i2p.tmpfiles" "usr/lib/tmpfiles.d/i2p.conf" echo 'u i2p - "I2P Router"
/opt/i2p /bin/sh' | install -Dm644 /dev/stdin "usr/lib/sysusers.d/i2p.conf"
install -Dm644 "$srcdir/router.config" "opt/i2p/router.config" install -Dm644
"$srcdir/wrapper.config" "opt/i2p/wrapper.config" install -Dm754 "$srcdir/i2prouter.sh"
"opt/i2p/i2prouter" install -Dm755 "$srcdir/chromium-i2p.sh" "opt/i2p/scripts/chromium-i2p"
install -Dm644 "$srcdir/i2prouter.bash" "usr/share/bash-completion/completions/i2prouter" install
-Dm644 "$srcdir/$pkgname-$pkgver/installer/resources/bash-completion/eepget" \
"usr/share/bash-completion/completions/eepget"
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/"
ln -s /opt/i2p/{eepget,i2prouter} "usr/bin/" chmod +x opt/i2p/eepget
sed -i opt/i2p/eepget \ -e 's:%INSTALL_PATH:/opt/i2p:g'
# dont automatically start the webserver(3) or open a webbrowser(4)
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
opt/i2p/{osid,postinstall.sh,runplain.sh,INSTALL-headless.txt,LICENSE.txt,licenses,man,lib/wrapper*}
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=('GPL2')
validpgpkeys=('70D2060738BEF80523ACAFF7D75C03B39B5E14E1')
sha256sums=(30ef8afcad0fffafd94d30ac307f86b5a6b318e2c1f44a023005841a1fcd077c # i2psource_2.4.0.tar.bz2
883aad33b8643dbb9d04c5c1430f1d1018e8c2493e5ac297dde8274a1dba9a17 # i2psource_2.4.0.tar.bz2.sig
# 644b771ec7f5db3efab3206bf1f896566cdb00d410a54608fda85bdb4c2ad876 # i2prouter.service
fc30dd32f48fe1c93bf36c8297ca48203a1479e4e221ebe62c57cf3c3c0347d3 # i2p.tmpfiles
e3a85d8992a09e8f57498b1eba0aef758ceffdb944d296528e8c5cec970becd9 # wrapper.config
90f202e5b66d5a5b425522b409e71fb892d34c534e32ce2d6fe5284015cacf94 # router.config
7a19b9f90c8792460fd58e8b8aa435a065e34d29a942479850472510e9d3078a # i2prouter.bash
8d39f080c7a2e49226db3a785f3e18583159ef2f95e1ab467fd9984c4e38c9f5 # i2prouter.sh
a7076156703e2b949331e450455813432caeb4e5712f1c7b668974eb06a69fb9) # chromium-i2p.sh
## 41e5ebecc178051c712a398e470ecb378e45b3c73c47516926066ad15595e268 i2p-2.4.0-02-any.pkg.tar.lz