updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / i2p / PKGBUILD
blobd588eaa4f9f4368005f22188dd6ec541d5ef3e21
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.12
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=('bf1ea58af3c9d4460d6ac8dff1620c50'
52          'ac9fa57b32f786f371bdf4dbd4931105'
53          '57352bccc56bb4b109f969806a0bcd32')