updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / ghostship-svn / PKGBUILD
blobf22c0dbc206c74cfe1831aa217d03969f56d6c59
1 # Contributor: thoughtcrime
3 # NOTE: if you use wine inside a arch32 chroot, 
4 # install this package inside arch32 and run
5 # the following in arch64:
6 # ln -s /opt/arch32/usr/share/ghostship/ghostship_chroot /etc/rc.d/ghostship
9 pkgname=ghostship-svn
10 pkgver=42
11 pkgrel=1
12 pkgdesc="A bash daemon that executes the Windows proxy 'Ultrasurf' like a unix daemon"
13 arch=(i686 x86_64)
14 url="http://ghostship.sourceforge.net/"
15 license=('GPL')
16 groups=()
17 depends=('tightvnc' 'wget')
18 makedepends=('subversion')
19 optdepends=('wine' 'bin32-wine')
20 provides=('ghostship')
21 conflicts=('ghostship' 'ghostship-test')
22 replaces=()
23 backup=('/etc/ghostship/ghostship.conf')
24 options=(!zipman)
25 install=
26 noextract=()
29 _svntrunk="https://ghostship.svn.sourceforge.net/svnroot/ghostship "
30 _svnmod="ghostship"
32 build() {
33         cd "$srcdir"
35         if [ -d $_svnmod/.svn ]; then
36                 (cd $_svnmod && svn up -r $pkgver)
37         else
38                 svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
39         fi
41         msg "SVN checkout done or server timeout"
42         msg "Starting make..."
44         rm -rf "$srcdir/$_svnmod-build"
45         cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
46         cd "$srcdir/$_svnmod-build"
48         #
49         # BUILD
50         #
52         svndir="$srcdir/ghostship-build"
53         
54         install -d $pkgdir/etc/rc.d
55         install -d $pkgdir/etc/ghostship
56         install -d $pkgdir/usr/bin
57         install -d $pkgdir/usr/share/man/man1
58         install -d $pkgdir/var/lib/ghostship/status
59         
60         cp $svndir/initscripts/archlinux/ghostship $pkgdir/etc/rc.d/ghostship
61         cp $svndir/source/etc/ghostship/ghostship.conf $pkgdir/etc/ghostship/
62         cp $svndir/source/etc/ghostship/password.conf $pkgdir/etc/ghostship/
63         cp $svndir/source/usr/bin/ghostship $pkgdir/usr/bin/
64         cp $svndir/source/usr/share/man/man1/ghostship.1 $pkgdir/usr/share/man/man1/
65         cp $svndir/source/var/lib/ghostship/status/*.png $pkgdir/var/lib/ghostship/status/
66         cp $svndir/source/var/lib/ghostship/status/start.html $pkgdir/var/lib/ghostship/status/
67         
68         # Copy the init script for chroot users
69         if [ "$CARCH" = "i686" ]; then
70                 install -d $pkgdir/usr/share/ghostship/
71                 cp $svndir/initscripts/archlinux/ghostship_chroot $pkgdir/usr/share/ghostship/
72         fi
75 # vim:set ts=2 sw=2 et: