1 # Contributor: fnord0 < fnord0 AT riseup DOT net >
6 pkgdesc="Simple icmp tunnel provide encapsulation of IP packets into ICMP packets. It can be used to pass through firewalls which not block icmp packets."
8 url="http://sourceforge.net/projects/itun/"
10 source=("http://downloads.sourceforge.net/sourceforge/itun/itun-04-10-2005.tar.gz")
11 md5sums=('47cbb410fa76bc9337264d2e6b3213b1')
12 sha1sums=('1883d9b03521992b9162c9dadc1d4068537eba40')
15 cd ${srcdir}/itun-04-10-2005
16 ###############################################################
17 ## THE FOLLOWING ALLOWS YOU TO SET A CUSTOM BUILD, VIA PKGBUILD
18 ## uncomment any line that starts with 'sed -i' for custom config during build process
20 ##IP address of remote peer
21 #sed -i 's|195.24.141.97|YOUR_IP|g' ./config.h || return 1
23 ##Name of local tunnel interface
24 #sed -i 's|tun0|YOUR_INTERFACE|g' ./config.h || return 1
26 ##Local IP address for tunnel
28 #sed -i 's|10.95.1.2|YOUR_IP|g' ./config.h || return 1
30 ##Remote IP address for tunnel
31 #sed -i 's|10.95.1.1|YOUR_IP|g' ./config.h || return 1
32 #######################################################
33 ## FOR THE Connection scheme section, uncomment all 6 'sed -i' lines, keeping one UNcommented
35 ##Connection scheme 1 (ICMP client)
36 #sed -i 's|#define SEND_PKT ICMP_ECHO|//#define SEND_PKT ICMP_ECHO|g' ./config.h || return 1
37 #sed -i 's|#define RECV_PKT ICMP_ECHOREPLY|//#define RECV_PKT ICMP_ECHOREPLY|g' ./config.h || return 1
39 ##Connection scheme 2 (ICMP server)
40 #sed -i 's|//#define SEND_PKT ICMP_ECHOREPLY|#define SEND_PKT ICMP_ECHOREPLY|g' ./config.h || return 1
41 #sed -i 's|//#define RECV_PKT ICMP_ECHO|#define RECV_PKT ICMP_ECHO|g' ./config.h || return 1
44 #sed -i 's|//#define SEND_PKT ICMP_ECHOREPLY|#define SEND_PKT ICMP_ECHOREPLY|g' ./config.h || return 1
45 #sed -i 's|//#define RECV_PKT ICMP_ECHOREPLY|#define RECV_PKT ICMP_ECHOREPLY|g' ./config.h || return 1
47 ##peer ID, must be equal on both peers
48 #sed -i 's|65534|YOUR_PEER|g' ./config.h || return 1
49 ##############################################################
50 install -d ${pkgdir}/usr/src/${pkgname} || return 1
51 install -d ${pkgdir}/usr/share/licenses/${pkgname} || return 1
52 install -d ${pkgdir}/usr/bin || return 1
53 install -Dm644 README ${pkgdir}/usr/src/${pkgname}/README || return 1
54 install -Dm644 FAQ ${pkgdir}/usr/src/${pkgname}/CHANGELOG || return 1
55 install -Dm644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE || return 1
57 install -Dm750 itun ${pkgdir}/usr/src/${pkgname}/itun || return 1
58 install -Dm750 route.sh ${pkgdir}/usr/src/${pkgname}/route.sh || return 1
59 ln -sf /usr/src/${pkgname}/itun ${pkgdir}/usr/bin/itun || return 1
60 cp -p Makefile Makefile.dep config.h *.c *.o ${pkgdir}/usr/src/${pkgname}/ || return
62 echo -e "\e[1;34m>>>\e[0m \e[1;31mitun was compiled with defaults specified in the '\e[1;34mconfig.h\e[0m\e[1;31m' file\e[0m"
63 echo -e "\e[1;34m>>>\e[0m \e[1;31mfor any custom config changes (IP, ICMP schemes, etc) edit '\e[1;34m/usr/src/itun/config.h\e[0m\e[1;31m' and run '\e[0m\e[1;34mmake\e[0m\e[1;31m' in the '\e[1;34m/usr/src/itun\e[0m\e[1;31m' directory, or reinstall this package making custom changes in the AUR '\e[1;34mPKGBUILD\e[0m\e[1;31m' file\e[0m"