blob: 0cfabf7859b9ee993c1ba3a037a8816e853adbb4 (
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
77
78
|
# Maintainer: Skycoder42 <skycoder42.de@gmx.de>
_pkgbase=libcorrect
pkgbase=$_pkgbase-git
pkgname=($pkgbase $_pkgbase-compat-git)
pkgver=r115.f5a28c7
pkgrel=2
pkgdesc="C library for Convolutional codes and Reed-Solomon"
arch=('x86_64' 'aarch64')
url="https://github.com/quiet/libcorrect"
license=('BSD')
makedepends=('git' 'cmake')
provides=("$_pkgbase")
conflicts=("$_pkgbase")
source=("git+$url.git"
"$_pkgbase.pc")
sha256sums=('SKIP'
'0f09957ae764e59f61344b48c7ecb5aad3a9a1024e57c21707e62e61f023627b')
pkgver() {
cd "$_pkgbase"
( set -o pipefail
git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}
build() {
# build without shim
mkdir -p "$_pkgbase/build"
cd "$_pkgbase/build"
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release
make
cd ../..
# build with shim
mkdir -p "$_pkgbase/build-shim"
cd "$_pkgbase/build-shim"
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release
make
make shim
}
#check() {
# cd "$_pkgbase/build"
# make check
# cd ../..
# cd "$_pkgbase/build-shim"
# make check
#}
package_libcorrect-git() {
cd "$_pkgbase/build"
make DESTDIR="$pkgdir" install
cd ..
install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$_pkgbase/LICENSE"
cd ..
install -D -m644 "$_pkgbase.pc" "$pkgdir/usr/lib/pkgconfig/$_pkgbase.pc"
}
package_libcorrect-compat-git() {
provides=("$_pkgbase" 'libfec')
conflicts=("$_pkgbase" 'libfec')
cd "$_pkgbase/build-shim"
make DESTDIR="$pkgdir" install
cd ..
install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$_pkgbase/LICENSE"
cd ..
install -D -m644 "$_pkgbase.pc" "$pkgdir/usr/lib/pkgconfig/$_pkgbase.pc"
}
|