blob: d91e234118e32bc56768a45330db9a31ebea471b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
# Contributor: skydrome <skydrome@protonmail.com>
# Maintainer (aur): skydrome <skydrome@protonmail.com>
# Maintainer: Freemor <freemor@freemor.ca>
# Maintainer (aur): 6543 <6543 at obermui dot de> ('i2p-openrc' openrc init script)
# uncomment if you do not want to build all language translations
#export LG2=en
pkgname=i2p
pkgver=1.7.0
pkgrel=1
pkgdesc="A distributed anonymous network"
url="https://geti2p.net"
license=('GPL2')
arch=('any')
depends=('java-runtime>=13' 'java-service-wrapper')
makedepends=('java-environment>=13' 'ant')
#optdepends=('gtk2: for rrd graphs')
conflicts=('i2p-bin' 'i2p-dev')
backup=('opt/i2p/wrapper.config')
install='i2p.install'
options=(!strip)
# https://geti2p.net/en/get-involved/develop/release-signing-key
# https://geti2p.net/_static/zzz.key.asc
validpgpkeys=('2D3D2D03910C6504C1210C65EE60C0C8EE7256A8')
_url="https://files.i2p-projekt.de/${pkgver}"
#_url="https://download.i2p2.de/releases/${pkgver}"
#_url="https://launchpad.net/i2p/trunk/${pkgver}/+download"
source=("${_url}/i2psource_${pkgver}.tar.bz2"{,.sig}
'i2prouter.service' 'i2p.tmpfiles' 'wrapper.config' 'router.config'
'i2prouter.bash' 'i2prouter.sh' 'chromium-i2p.sh'
speed_up_prng.patch
update_firefox_useragent.patch
)
source=( ${source[*]/chromium-i2p.sh/} )
source+=(i2p.initd)
sha256sums=('aa53591e89eacc3491ab472dc4df998780fb6747eea3b97ecb7a9f81ff2c9a5e'
'SKIP'
'644b771ec7f5db3efab3206bf1f896566cdb00d410a54608fda85bdb4c2ad876'
'fc30dd32f48fe1c93bf36c8297ca48203a1479e4e221ebe62c57cf3c3c0347d3'
'e3a85d8992a09e8f57498b1eba0aef758ceffdb944d296528e8c5cec970becd9'
'90f202e5b66d5a5b425522b409e71fb892d34c534e32ce2d6fe5284015cacf94'
'7a19b9f90c8792460fd58e8b8aa435a065e34d29a942479850472510e9d3078a'
'8d39f080c7a2e49226db3a785f3e18583159ef2f95e1ab467fd9984c4e38c9f5'
'55b05dec917d5a55f2a7c3b76c5111d2cdbb3694968049fca5cdb089cb18e390'
'70f2ada05fa56e06c7cfc107a87b327aa37683bd0c47f0cb5454c60105a71be8'
)
sha256sums+=('b9e490398732d3d3b0f5f0233adcb55030cf217e4fc2d2bbfe7cf5577aeb87bf')
prepare() {
cd "$pkgname-$pkgver"
patch -Np1 -i ../speed_up_prng.patch
patch -Np1 -i ../update_firefox_useragent.patch
}
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.version=13 \
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 -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*}
# install an init script for openrc
install -Dm755 "${srcdir}"/i2p.initd "${pkgdir}"/etc/init.d/i2p
}
|