summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f1b2dfccc09daf5e47c4d765179de3536a41919c (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
# Maintainer: Mario Finelli <mario at finel dot li>

pkgname=icmptunnel-git
pkgver=r58.7a1a5a8
pkgrel=2
pkgdesc="Transparently tunnel your IP traffic through ICMP echo and reply packets."
arch=('i686' 'x86_64')
url="https://github.com/DhavalKapil/icmptunnel"
license=('MIT')
depends=('net-tools')
makedepends=('git')
provides=('icmptunnel')
conflicts=('icmptunnel')
source=('git://github.com/DhavalKapil/icmptunnel.git')
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/icmptunnel"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    cd "$srcdir/icmptunnel"
    sed -i '/SERVER_SCRIPT/s/server.sh/\/usr\/bin\/icmptunnel-server/' tunnel.h
    sed -i '/CLIENT_SCRIPT/s/client.sh/\/usr\/bin\/icmptunnel-client/' tunnel.h
}

build(){
  cd "$srcdir/icmptunnel"
  make
}

package(){
  cd "$srcdir/icmptunnel"
  install -Dm0755 icmptunnel "$pkgdir"/usr/bin/icmptunnel 

  install -Dm0755 client.sh "$pkgdir"/usr/bin/icmptunnel-client
  install -Dm0755 server.sh "$pkgdir"/usr/bin/icmptunnel-server
}