updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / efibootmgr-git / PKGBUILD
blob0d3c18fb7ddb3719f91b9df16e26a8bd6ea40697
1 # Maintainer : Keshav P R <(skodabenz) (aatt) (rocketmail) (ddoott) (ccoomm)>
2 # Contributor: Murtuza Akhtari <inxsible at gmail dot com>
4 _pkgname="efibootmgr"
5 pkgname="${_pkgname}-git"
7 pkgver=20110705
8 pkgrel=1
9 pkgdesc="Tool to modify UEFI Firmware Boot Manager Variables. Needs the kernel module 'efivars'."
10 arch=('i686' 'x86_64')
11 url="http://linux.dell.com/efibootmgr/"
12 license=('GPL2')
13 makedepends=('git')
14 depends=('pciutils')
15 conflicts=("${_pkgname}")
16 provides=("${_pkgname}")
17 options=(strip purge docs zipman !emptydirs !libtool)
19 source=('efibootmgr_default_to_grub2.patch')
20 sha256sums=('5306a6f952d17215b129392953ae6551df0e4cf1960a959ab98c60f27fab9b90')
22 _gitroot="http://linux.dell.com/git/${_pkgname}.git"
23 _gitname="${_pkgname}"
26 _update_git() {
27         
28         cd "${srcdir}"
29         msg "Connecting to GIT server...."
30         
31         if [ -d "${srcdir}/${_gitname}/" ]
32         then
33                 cd "${srcdir}/${_gitname}/"
34                 git reset --hard
35                 git fetch
36                 git checkout master
37                 git merge remotes/origin/master
38                 msg "The local GIT repo has been updated."
39         else
40                 git clone "${_gitroot}" "${_gitname}"
41                 msg "GIT checkout done or server timeout"
42         fi
43         
44         echo
45         
49 build() {
50         
51         _update_git
52         
53         rm -rf "${srcdir}/${_gitname}_build/" || true
54         cp -r "${srcdir}/${_gitname}" "${srcdir}/${_gitname}_build"
55         
56         cd "${srcdir}/${_gitname}_build/"
57         
58         patch -Np1 -i "${srcdir}/efibootmgr_default_to_grub2.patch"
59         echo
60         
61         CFLAGS="" make
62         echo
63         
67 package() {
68         
69         cd "${srcdir}/${_gitname}_build/"
70         
71         install -d "${pkgdir}/usr/sbin/"
72         install -d "${pkgdir}/usr/share/man/man8/"
73         
74         install -D -m755 "${srcdir}/${_gitname}_build/src/efibootmgr/efibootmgr" "${pkgdir}/usr/sbin/efibootmgr"
75         install -D -m644 "${srcdir}/${_gitname}_build/src/man/man8/efibootmgr.8" "${pkgdir}/usr/share/man/man8/efibootmgr.8"
76