updated on Sun Jan 15 04:04:02 UTC 2012
[aur-mirror.git] / i2p / PKGBUILD
blobf372ec2a310c6f553c84b4c6ca9ca25970370f6c
1 # Maintainer: veox <veox at wre dot ath dot cx>
2 # Contributor: Rorschach <r0rschach@lavabit.com>
3 # Contributor: Cedric Chabanois <cchabanois@gmail.com>
5 pkgname=i2p
6 pkgver=0.8.11
7 pkgrel=1
8 pkgdesc="A distributed anonymous network"
9 url="http://www.i2p2.de"
10 license=('GPL')
11 depends=('bash' 'java-runtime')
12 makedepends=('apache-ant' 'java-environment')
13 conflicts=('i2p-bin')
14 replaces=('i2p-source')
15 arch=('i686' 'x86_64')
16 install=i2p.install
17 source=("http://mirror.i2p2.de/i2psource_${pkgver}.tar.bz2" 
18         'i2prouter' 'i2prouter.service')
20 build() {
21   # add apache ant to PATH
22   . /etc/profile.d/apache-ant.sh
23   
24   cd $srcdir/${pkgname}-${pkgver}
25   cat > install.properties << EOC
26 INSTALL_PATH=$pkgdir/opt/i2p
27 EOC
28   # yes, download jetty (version 5)
29   echo "y" | ant pkg
32 package() {
33   cd $srcdir/${pkgname}-${pkgver}
35   java -jar install.jar -options install.properties
37   sed -i "s|$pkgdir/opt/i2p|/opt/i2p|g" \
38     $pkgdir/opt/i2p/i2prouter \
39     $pkgdir/opt/i2p/wrapper.config \
40     $pkgdir/opt/i2p/runplain.sh \
41     $pkgdir/opt/i2p/eepget
42   sed -i 's/#RUN_AS_USER=/RUN_AS_USER=i2p/' \
43     $pkgdir/opt/i2p/i2prouter
45   rm $pkgdir/opt/i2p/.installationinformation
46   rm -r $pkgdir/opt/i2p/Uninstaller
47   
48   install -Dm755 $srcdir/i2prouter $pkgdir/etc/rc.d/i2prouter
49   install -Dm644 $srcdir/i2prouter.service $pkgdir/lib/systemd/system/i2prouter.service
51 md5sums=('4ad97f7c59a508a17c6462803f81c216'
52          'ac9fa57b32f786f371bdf4dbd4931105'
53          '57352bccc56bb4b109f969806a0bcd32')