PKGBUILD-bzr.proto 1.34 KB
Newer Older
Allan McRae's avatar
Allan McRae committed
1
2
3
4
5
6
7
8
# 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'.

# See http://wiki.archlinux.org/index.php/VCS_PKGBUILD_Guidelines
# for more information on packaging from Bazaar sources.

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

matt mooney's avatar
matt mooney committed
30
31
_bzrtrunk=BZRURL
_bzrmod=MODNAME
Allan McRae's avatar
Allan McRae committed
32
33
34
35
36

build() {
  cd "$srcdir"
  msg "Connecting to Bazaar server...."

matt mooney's avatar
matt mooney committed
37
38
  if [[ -d "$_bzrmod" ]]; then
    cd "$_bzrmod" && bzr --no-plugins pull "$_bzrtrunk" -r "$pkgver"
Allan McRae's avatar
Allan McRae committed
39
40
    msg "The local files are updated."
  else
matt mooney's avatar
matt mooney committed
41
    bzr --no-plugins branch "$_bzrtrunk" "$_bzrmod" -q -r "$pkgver"
Allan McRae's avatar
Allan McRae committed
42
43
44
  fi

  msg "Bazaar checkout done or server timeout"
matt mooney's avatar
matt mooney committed
45
  msg "Starting build..."
Allan McRae's avatar
Allan McRae committed
46
47
48
49
50
51
52
53
54
55

  rm -rf "$srcdir/$_bzrmod-build"
  cp -r "$srcdir/$_bzrmod" "$srcdir/$_bzrmod-build"
  cd "$srcdir/$_bzrmod-build"

  #
  # BUILD HERE
  #
  ./autogen.sh
  ./configure --prefix=/usr
56
  make
57
58
59
60
}

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

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