summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 275f02d517c3bf31e5b51f2ad2bd70e102b3041f (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
# Package build for homegear plugin from git (https://www.homegear.eu/index.php/Main_Page)
# Maintainer: Sven Klomp <mail at klomp dot eu>

pkgdesc='Homegear plugin for Homematic BidCos communication'
_gitname=('homegear-homematicbidcos')
pkgname=('homegear-homematicbidcos-git')
pkgver=0.6.138.96bda68
pkgrel=1
arch=('i686' 'x86_64')
license=('GPL')
url="https://github.com/Homegear/homegear-homematicbidcos"
depends=('gcc-libs' 'homegear>=0.6.0')
makedepends=('gcc-libs' 'git')
conflicts=('homegear-homematicbidcos')
provides=('homegear-homematicbidcos')
source=("git+https://github.com/Homegear/homegear-homematicbidcos")
md5sums=('SKIP')

backup=(etc/homegear/families/homematicbidcos.conf)

pkgver() {
	cd "$srcdir"/${_gitname}
	echo "0.6.$(git rev-list --count HEAD).$(git describe --always)"
}

prepare() {
	cd "${srcdir}/${_gitname}"
}

build() {
	cd "${srcdir}/${_gitname}"
	rm -Rf autom4te.cache
	./bootstrap || exit 1
	
	# Remove qdbm dependency
	sed -i 's/-lqdbm//g' src/Makefile.am
	
	./configure --with-php=/usr --prefix=/usr --localstatedir=/var --sysconfdir=/etc --libdir=/usr/lib || exit 1
	make || exit 1
	strip -s src/.libs/mod_homematicbidcos.so
}

package() {
	cd "${srcdir}/${_gitname}"
	make DESTDIR="$pkgdir/" install
	
	mkdir -p $pkgdir/etc/homegear/families
	cp -r "${srcdir}/${_gitname}/misc/Config Directory/homematicbidcos.conf" $pkgdir/etc/homegear/families
	
	mkdir -p $pkgdir/etc/homegear/devices
	cp -r "${srcdir}/${_gitname}/misc/Device Description Files" $pkgdir/etc/homegear/devices/0
}