blob: dfc27a91a27e28c73f8c33b39cc178c5fcbe6db7 (
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
67
68
69
70
71
72
73
74
75
76
|
# Maintainer: Reza Jahanbakhshi <reza.jahanbakhshi at gmail dot com
# Contributor: Melvin Vermeeren <mail@mel.vin>
# Contributor: IanDury <iandury@xs4all.nl>
pkgname=openzwave-git
basename=${pkgname%-git}
pkgver=7528.4887754f.97f47476b8675683144a4278a4c93271
pkgrel=1
pkgdesc="Opensource Z-Wave control"
url="http://www.openzwave.com"
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h')
license=('LGPL')
depends=('libsystemd')
makedepends=('doxygen' 'git')
conflicts=('openzwave' 'openzwave-svn')
provides=('openzwave')
install="$pkgname.install"
source=(
"${basename}::git+https://github.com/OpenZWave/open-zwave.git"
null-check.patch
)
sha256sums=('SKIP'
'a7d4f12eb5ff3cb29f12a896bf7e0da5c36ea4c5c0d5a77f9bff481b48fc7774')
pkgver() {
cd "${basename}"
local _patchver
local _patchfile
for _patchfile in "${source[@]}"; do
_patchfile="${_patchfile%%::*}"
_patchfile="${_patchfile##*/}"
[[ $_patchfile = *.patch ]] || continue
_patchver="${_patchver}$(md5sum ${srcdir}/${_patchfile} | cut -c1-32)"
done
_patchver="$(echo -n $_patchver | md5sum | cut -c1-32)"
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD).${_patchver}
}
prepare() {
local _patchfile
for _patchfile in "${source[@]}"; do
_patchfile="${_patchfile%%::*}"
_patchfile="${_patchfile##*/}"
[[ $_patchfile = *.patch ]] || continue
echo "Applying patch $_patchfile..."
patch --directory=${basename} --forward --strip=1 --input="${srcdir}/${_patchfile}"
done
find ${srcdir}/${basename} -name Makefile | xargs sed -e 's/-Wno-format//' -i
}
build() {
cd "${basename}"
if [[ -f cpp/src/vers.cpp ]]
then
echo "Removing cpp/src/vers.cpp to ensure version number update."
rm 'cpp/src/vers.cpp'
fi
make
}
package() {
cd "${basename}"
make \
DESTDIR="$pkgdir" \
PREFIX='/usr' \
instlibdir='/usr/lib' \
sysconfdir='/etc/openzwave' \
install
}
# vim:set ts=2 sw=2 et:
|