PKGBUILD-darcs.proto 1.38 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 darcs sources.

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

matt mooney's avatar
matt mooney committed
30
31
_darcstrunk=DARCSURL
_darcsmod=MODNAME
32
33

build() {
Allan McRae's avatar
Allan McRae committed
34
  cd "$srcdir"
matt mooney's avatar
matt mooney committed
35
  msg "Checking for previous build...."
36

matt mooney's avatar
matt mooney committed
37
  if [[ -d "$_darcsmod/_darcs" ]]; then
38
    msg "Retrieving missing patches"
matt mooney's avatar
matt mooney committed
39
40
    cd "$_darcsmod"
    darcs pull -a "$_darcstrunk/$_darcsmod"
41
42
  else
    msg "Retrieving complete sources"
matt mooney's avatar
matt mooney committed
43
44
    darcs get --partial --set-scripts-executable "$_darcstrunk/$_darcsmod"
    cd "$_darcsmod"
45
46
  fi

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

matt mooney's avatar
matt mooney committed
51
  msg "Starting build..."
52
53

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

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

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