-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
74 lines (63 loc) · 2.32 KB
/
PKGBUILD
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
# Contributor: alphazo <[email protected]>
# This version fetches and install master branch from Git repo.
pkgname=sshuttle-git
pkgver=20121022
pkgrel=1
pkgdesc="Transparent proxy server that works as a poor man's VPN. Forwards all TCP packets over ssh (and even DNS requests when using --dns option). Doesn't require admin privileges on the server side."
arch=('any')
url="https://github.com/apenwarr/sshuttle"
license=('GPL')
groups=()
depends=('python2' 'iptables')
makedepends=('git')
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
source=(arch-install.patch)
md5sums=('15ed72e2b68dd07ef97abfdcb828d188')
_gitroot="git://github.com/apenwarr/sshuttle.git"
_gitname="sshuttle"
build() {
cd "$srcdir"
msg "Connecting to GIT server...."
if [ -d $_gitname ] ; then
cd $_gitname && git pull origin
msg "The local files are updated."
else
git clone $_gitroot $_gitname
fi
msg "GIT checkout done or server timeout"
msg "Starting make..."
rm -rf "$srcdir/$_gitname-build"
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
cd "$srcdir/$_gitname-build"
# Patch launcher with files location (/usr/share/sshuttle)
patch -p1 -i "${srcdir}/arch-install.patch"
#
# BUILD HERE
#
# Original build
#install -Dm755 $srcdir/$_gitname-build/sshuttle $pkgdir/usr/bin/sshuttle || return 1
#mkdir -p $pkgdir/usr/share/sshuttle
#cp -r $srcdir/$_gitname-build/* $pkgdir/usr/share/sshuttle || return 1
#
# Modification proposed by bladud
cd "$srcdir/$_gitname-build/Documentation"
sed -i 's/python/python2/' md2man.py
cd ..
make #Make the manpage
cd "$srcdir/$_gitname-build"
install -Dm755 $srcdir/$_gitname-build/sshuttle $pkgdir/usr/bin/sshuttle || return 1
mkdir -p $pkgdir/usr/share/sshuttle
cp $srcdir/$_gitname-build/LICENSE $pkgdir/usr/share/sshuttle || return 1
cp $srcdir/$_gitname-build/README.md $pkgdir/usr/share/sshuttle || return 1
cp $srcdir/$_gitname-build/Documentation/sshuttle.md $pkgdir/usr/share/sshuttle || return 1
cp $srcdir/$_gitname-build/*.py $pkgdir/usr/share/sshuttle || return 1
mkdir $pkgdir/usr/share/sshuttle/version
mkdir $pkgdir/usr/share/sshuttle/compat
cp -R $srcdir/$_gitname-build/version/*.py $pkgdir/usr/share/sshuttle/version || return 1
cp -R $srcdir/$_gitname-build/compat/*.py $pkgdir/usr/share/sshuttle/compat || return 1
}