updated on Mon Jan 23 16:10:15 UTC 2012
[aur-mirror.git] / role-svn / PKGBUILD
blob0f391634405a45736f2f32541de5c6ff5fbc4147
1 # Maintainer: Gordin <9ordin at gmail dot com>
2 pkgname=role-svn
3 pkgver=2332
4 pkgrel=1
5 _ver=m4
6 pkgdesc="Responsive Open Learning Environments - svn trunk"
7 arch=('any')
8 url="http://sourceforge.net/projects/role-project/"
9 license=('Apache' 'BSD')
10 depends=('java-environment' 'bash')
11 conflicts=('role')
12 provides=('role')
13 builtdepends=('maven')
14 install='role.install'
15 _role='opt/role'
17 source=('role.init')
18 sha256sums=('c7c9244695f017a0a83ce1183333292dfc2a4309d4cdce8fe11d9bf9eaf5bfc9')
20 _svntrunk=https://role-project.svn.sourceforge.net/svnroot/role-project/trunk
21 _svnmod=role-sdk
23 build() {
24   cd "$srcdir"
25   msg "Connecting to SVN server...."
27   if [[ -d "$_svnmod/.svn" ]]; then
28     (cd "$_svnmod" && svn up -r "$pkgver")
29   else
30     svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
31   fi
33   msg "SVN checkout done or server timeout"
34   msg "Starting build..."
36   rm -rf "$srcdir/$_svnmod-build"
37   cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
38   cd "$srcdir/$_svnmod-build"
40   #
41   # BUILD HERE
42   #
43   mvn package
46 package() {
47   tar -C ${srcdir} -xzf $srcdir/$_svnmod-build/assembly/target/role-${_ver}-sdk.tar.gz
48   cd ${srcdir}/role-${_ver}-sdk
50   install -d ${pkgdir}/${_role}
51   install -d ${pkgdir}/usr/bin
53   cd ${srcdir}/role-${_ver}-sdk
54   mv * ${pkgdir}/${_role}
56   cd ${pkgdir}/${_role}
57   rm bin/start.cmd
58   chmod +x bin/start.sh
59   ln -sf /${_role}/bin/start.sh ${pkgdir}/usr/bin/role
60   sed -i "s|\.\.|/${_role}|g" bin/start.sh
61   sed -i "2imkdir -p ~/.config/role" bin/start.sh
62   sed -i "3icd ~/.config/role" bin/start.sh
64   install -D -m755 "${srcdir}/role.init" "${pkgdir}/etc/rc.d/role"