updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / gnu-efi-fedora-git / PKGBUILD
blob9c112ddcd5d24170878a0cf7971f25327b95111c
1 # Maintainer : Keshav P R <(the.ridikulus.rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
3 _actualname="gnu-efi"
4 _pkgname="${_actualname}-fedora"
5 pkgname="${_pkgname}-git"
7 pkgver=20120109
8 pkgrel=1
9 pkgdesc="Library for building UEFI Applications using GNU toolchain - Fedora's fork"
10 arch=('i686' 'x86_64')
11 url="http://sourceforge.net/projects/gnu-efi/"
12 license=('GPL')
13 makedepends=('git')
14 depends=('pciutils')
15 provides=("${_actualname}" "${_pkgname}")
16 conflicts=("${_actualname}" "${_pkgname}")
17 options=(!strip docs zipman purge !libtool emptydirs)
18 # install="${_pkgname}.install"
19 backup=()
21 source=()
23 _gitroot="git://github.com/vathpela/gnu-efi.git"
24 _gitname="${_pkgname}"
25 _gitbranch="fedora"
27 _update_git() {
28         
29         cd "${srcdir}/"
30         
31         msg "Connecting to GIT server...."
32         
33         if [[ -d "${srcdir}/${_gitname}/" ]]; then
34                 cd "${srcdir}/${_gitname}/"
35                 git reset --hard
36                 
37                 git remote rm origin
38                 git remote add origin "${_gitroot}"
39                 
40                 git fetch
41                 git checkout "${_gitbranch}"
42                 git merge "remotes/origin/${_gitbranch}"
43                 msg "The local GIT repo has been updated."
44         else
45                 git clone "${_gitroot}" "${_gitname}"
46                 cd "${srcdir}/${_gitname}/"
47                 git checkout "${_gitbranch}"
48                 msg "GIT checkout done or server timeout"
49         fi
50         
51         echo
52         
55 build() {
56         
57         _update_git
58         
59         rm -rf "${srcdir}/${_gitname}_build/" || true
60         cp -r "${srcdir}/${_gitname}" "${srcdir}/${_gitname}_build"
61         
62         cd "${srcdir}/${_gitname}_build"
63         
64         CFLAGS="" make
65         echo
66         
69 package() {
70         
71         cd "${srcdir}/${_gitname}_build"
72         
73         make INSTALLROOT="${pkgdir}/usr/" install
74         echo
75