summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 793047964561d0681873f0e28f6b44f508684cfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Maintainer : Keshav Amburay <(the ddoott ridikulus ddoott rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
# Contributor : Tobias Powalowski <tpowa@archlinux.org>

_pkgname="efivar"
pkgname="${_pkgname}-git"

pkgdesc="Tools and library to manipulate EFI variables - GIT master branch"
pkgver=0.21.9.g88c3ca8
pkgrel=1
arch=('x86_64' 'i686')
url="https://github.com/rhinstaller/efivar"
license=('LGPL2.1')
makedepends=('git')
depends=('popt')
conflicts=("${_pkgname}" 'libefivar' 'libefivar-git')
provides=("${_pkgname}=${pkgver}" "libefivar=${pkgver}" "libefivar-git=${pkgver}")
options=('!strip' 'zipman' 'docs')

source=("${_pkgname}::git+https://github.com/rhinstaller/efivar.git#branch=master")
sha1sums=('SKIP')

pkgver() {
	cd "${srcdir}/${_pkgname}/"
	echo "$(git describe --tags)" | sed -e 's|-|\.|g'
}

prepare() {
	
	cd "${srcdir}/${_pkgname}/"
	
	git clean -x -d -f
	echo
	
	rm -rf "${srcdir}/${_pkgname}_build/" || true
	cp -r "${srcdir}/${_pkgname}" "${srcdir}/${_pkgname}_build"
	
	cd "${srcdir}/${_pkgname}_build/"
	
	
	sed 's|-O0|-Os|g' -i "${srcdir}/${_pkgname}_build/Make.defaults" || true
	sed 's|-rpath=$(TOPDIR)/src/|-rpath=$(libdir)|g' -i "${srcdir}/${_pkgname}_build/src/test/Makefile" || true
	
	msg "Disable efivar-static build"
	sed 's|efivar efivar-static|efivar|g' -i "${srcdir}/${_pkgname}_build/Makefile" || true
	sed 's|BINTARGETS=efivar efivar-static|BINTARGETS=efivar|g' -i "${srcdir}/${_pkgname}_build/src/Makefile" || true
	sed 's| $(STATICLIBTARGETS) | |g' -i "${srcdir}/${_pkgname}_build/src/Makefile" || true
	
}

build() {
	
	cd "${srcdir}/${_pkgname}_build/"
	
	make libdir="/usr/lib/" bindir="/usr/bin/" mandir="/usr/share/man/" includedir="/usr/include/" V=1 -j1
	echo
	
}

package() {
	
	cd "${srcdir}/${_pkgname}_build/"
	
	make -j1 V=1 DESTDIR="${pkgdir}/" libdir="/usr/lib/" bindir="/usr/bin/" mandir="/usr/share/man/" includedir="/usr/include/" install
	echo
	
}