PKGBUILD-svn.proto 1.28 KB
Newer Older
1
2
3
4
5
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.

Allan McRae's avatar
Allan McRae committed
6
# See http://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines
Allan McRae's avatar
Allan McRae committed
7
8
# for more information on packaging from SVN sources.

9
# Maintainer: Your Name <youremail@domain.com>
Allan McRae's avatar
Allan McRae committed
10
pkgname=NAME-svn
11
12
13
14
15
16
17
18
pkgver=VERSION
pkgrel=1
pkgdesc=""
arch=()
url=""
license=('GPL')
groups=()
depends=()
19
makedepends=('subversion')
20
21
22
23
24
25
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
26
source=()
27
28
29
30
noextract=()
md5sums=() #generate with 'makepkg -g'

_svntrunk=SVNURL
matt mooney's avatar
matt mooney committed
31
_svnmod=MODNAME
32
33

build() {
Allan McRae's avatar
Allan McRae committed
34
  cd "$srcdir"
matt mooney's avatar
matt mooney committed
35
  msg "Connecting to SVN server...."
36

matt mooney's avatar
matt mooney committed
37
38
  if [[ -d "$_svnmod/.svn" ]]; then
    (cd "$_svnmod" && svn up -r "$pkgver")
39
  else
matt mooney's avatar
matt mooney committed
40
    svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
41
42
43
  fi

  msg "SVN checkout done or server timeout"
matt mooney's avatar
matt mooney committed
44
  msg "Starting build..."
45

Allan McRae's avatar
Allan McRae committed
46
  rm -rf "$srcdir/$_svnmod-build"
Allan McRae's avatar
Allan McRae committed
47
48
  cp -r "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
  cd "$srcdir/$_svnmod-build"
49
50

  #
matt mooney's avatar
matt mooney committed
51
  # BUILD HERE
52
53
54
  #
  ./autogen.sh
  ./configure --prefix=/usr
55
  make
56
57
58
59
}

package() {
  cd "$srcdir/$_svnmod-build"
Allan McRae's avatar
Allan McRae committed
60
  make DESTDIR="$pkgdir/" install
61
}
matt mooney's avatar
matt mooney committed
62
63

# vim:set ts=2 sw=2 et: