blob: 9a9bc2864a163299c0b80df3e15e43a9c4b6eff5 (
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
|
# Maintainer: John Wason <wason@wasontech.com>
pkgbase=robotraconteur-companion
pkgname=(librobotraconteur-companion0.4 librobotraconteur-companion-devel)
pkgver=0.4.2
pkgrel=1
pkgdesc="Robot Raconteur C++ Companion Library"
arch=('x86_64' 'aarch64')
url="https://github.com/robotraconteur/robotraconteur_companion"
license=('Apache-2.0')
source=("https://github.com/robotraconteur/robotraconteur_companion/releases/download/v${pkgver}/RobotRaconteurCompanion-${pkgver}-Source.tar.gz")
sha256sums=('0b49f7ad7e3decc7ca6b9fb20c245f809dfae2ebcd67a934aac66804ee27ecff')
makedepends=(
'cmake>=3.5.1'
'boost>=1.58.0'
'openssl'
'zlib'
'gtest'
'base-devel'
'yaml-cpp'
'eigen'
'librobotraconteur-devel'
'robotraconteurgen'
)
_libdepends=()
prepare() {
cd "RobotRaconteurCompanion-${pkgver}-Source"
rm -rf build
mkdir build
}
build() {
cd "RobotRaconteurCompanion-${pkgver}-Source/build"
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_DOCUMENTATION=OFF \
-DBUILD_SHARED_LIBS=ON \
-DROBOTRACONTEUR_COMPANION_SOVERSION_MAJOR_ONLY=ON \
-DCMAKE_SKIP_RPATH=ON \
-DBUILD_TESTING=OFF
cmake --build . -- -j$(nproc)
}
package_librobotraconteur-companion0.4() {
pkgdesc="Robot Raconteur C++ companion runtime library"
depends=("${_libdepends[@]}")
cd "$srcdir/RobotRaconteurCompanion-${pkgver}-Source/build"
DESTDIR="$pkgdir" cmake --install .
# Prune unrelated files
rm -rf "$pkgdir/usr/include" "$pkgdir/usr/lib/cmake" "$pkgdir/usr/bin" "$pkgdir/usr/share" "$pkgdir/usr/lib/pkgconfig"
find "$pkgdir/usr/lib" -type f,l ! -name 'libRobotRaconteurCompanion.so.*' -delete
install -Dm644 ../LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_librobotraconteur-companion-devel() {
pkgdesc="Robot Raconteur C++ companion development files"
depends=('librobotraconteur-companion0.4' 'boost>=1.58.0' 'cmake' 'base-devel' 'openssl' 'yaml-cpp' 'eigen' 'librobotraconteur-devel' 'robotraconteurgen')
cd "$srcdir/RobotRaconteurCompanion-${pkgver}-Source/build"
DESTDIR="$pkgdir" cmake --install .
# Keep only headers, development symlinks, and cmake files
find "$pkgdir/usr/lib" -type f,l ! -name 'libRobotRaconteurCompanion.so' ! -name '*.cmake' -delete
rm -rf "$pkgdir/usr/bin" "$pkgdir/usr/lib/pkgconfig"
# Keep only /usr/share/robotraconteur directory
find "$pkgdir/usr/share" -mindepth 1 -maxdepth 1 ! -name 'robotraconteur' -exec rm -rf {} +
find "$pkgdir/usr/lib" -type f,l -name 'libRobotRaconteurCompanion.so.*' -delete
install -Dm644 ../LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
|