PKGBUILD-git.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 GIT sources.

9
# Maintainer: Your Name <youremail@domain.com>
10
11
12
13
14
15
16
17
18
pkgname=NAME-git
pkgver=VERSION
pkgrel=1
pkgdesc=""
arch=()
url=""
license=('GPL')
groups=()
depends=()
19
makedepends=('git')
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
_gitroot=GITURL
_gitname=MODENAME
32
33

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

matt mooney's avatar
matt mooney committed
37
38
  if [[ -d "$_gitname" ]]; then
    cd "$_gitname" && git pull origin
39
40
    msg "The local files are updated."
  else
matt mooney's avatar
matt mooney committed
41
    git clone "$_gitroot" "$_gitname"
42
43
44
  fi

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

Allan McRae's avatar
Allan McRae committed
47
  rm -rf "$srcdir/$_gitname-build"
48
  git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
Allan McRae's avatar
Allan McRae committed
49
  cd "$srcdir/$_gitname-build"
50
51
52
53
54
55

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

package() {
  cd "$srcdir/$_gitname-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: