blob: efd932a64d2239e8209523ae33d24ff0c0e2e9af (
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
|
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libcrystalhd
pkgver=20130708
_date=$pkgver
pkgrel=2
pkgdesc="Broadcom CrystalHD kernel driver library"
url="https://git.linuxtv.org/jarod/crystalhd.git"
arch="x86 x86_64"
license="GPL-2.0"
depends=""
depends_dev=""
makedepends="$depends_dev linux-headers"
install=""
subpackages="$pkgname-dev"
source="https://dev.alpinelinux.org/archive/$pkgname/$pkgname-${_date}.tar.gz
gcc-opts-fix.patch
"
_giturl="git://linuxtv.org/jarod/crystalhd.git"
_upload="dev.alpinelinux.org:/archive/$pkgname/"
_libdir="$srcdir/$pkgname-$_date/linux_lib/libcrystalhd"
_builddir="$srcdir/$pkgname-$_date"
snapshot() {
local _date=$(date +%Y%m%d)
local _pkg=$pkgname-$_date.tar.gz
mkdir -p "$srcdir"
cd "$srcdir"
msg "Creating snapshot: $_pkg"
rm -rf ${_giturl##*/}
git clone --depth=1 --bare $_giturl || return 1
git --git-dir ${_giturl##*/} archive -o $_pkg \
--prefix=$pkgname-$_date/ HEAD \
|| return 1
msg "Uploading to $_upload"
rsync -Lave ssh $_pkg $_upload || return 1
cd "$startdir"
sed -i -e "s/^pkgver=.*/pkgver=$_date/" \
APKBUILD || return 1
abuild checksum
}
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
cd "$_libdir"
msg "building library"
make || return 1
}
package() {
cd "$_libdir"
make DESTDIR="$pkgdir" install || return 1
}
dev() {
default_dev
}
sha512sums="70a84f8102250a797b658153d7cd2ed2b05d00d801b52a0b6f877e0feecd55a83c32032c5b66dba8cb53863dabc5536dde6405087403d8fe730c27f6ea3ee1b2 libcrystalhd-20130708.tar.gz
7ef9034fd3ee8b4f94ac90d2c16a1c47ec856544924d4242ef93e9a73bd6487845f1a3dbc86b4cdadbad5a24a65495431a1961077d34d498386462a68a951359 gcc-opts-fix.patch"
|