blob: 1acd64423de3fd518309da9875252454507a65f7 (
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
|
# Maintainer: open62541 Team <open62541-core@googlegroups.com>
branch=master
pkgname=open62541-git
src_name=open62541
pkgver=v1.0_rc3_r18_g07d98934
pkgrel=1
pkgdesc="An open source and free implementation of OPC Unified Architecture written in the common subset of the C99 and C++98 languages."
provides=('open62541')
conflicts=('open62541')
arch=('any')
url="http://open62541.org/"
license=('MPL2')
makedepends=('cmake')
source=("git+https://github.com/open62541/open62541.git#branch=$branch")
md5sums=('SKIP')
sha256sums=('SKIP')
prepare() {
# Install the libraries to lib instead of lib64
# Install to /usr/ instead of /usr/local/
OPEN62541_CMAKE_FLAGS_DEFAULT=\
"-DBUILD_SHARED_LIBS=ON"\
" -DUA_NAMESPACE_ZERO=FULL"\
" -DUA_ENABLE_AMALGAMATION=OFF"\
" -DCMAKE_BUILD_TYPE=RelWithDebInfo"\
" -DCMAKE_INSTALL_PREFIX=$pkgdir/usr/"\
" -DCMAKE_INSTALL_LIBDIR=$pkgdir/usr/lib/"
# OPEN62541_CMAKE_FLAGS is an environment variable which can be
# set in order to specify custom compilation flags for open62541.
# This allows integrating further features. Please review the wiki
# for more information.
OPEN62541_CMAKE_FLAGS="$OPEN62541_CMAKE_FLAGS_DEFAULT $OPEN62541_CMAKE_FLAGS"
cd "$srcdir/$src_name"
git submodule init
git config submodule.UA-Nodeset.url "$srcdir/UA-Nodeset"
git config submodule.mdnsd "$srcdir/mdnsd"
git submodule update
}
pkgver() {
cd "$srcdir/$src_name"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/_/g'
}
build() {
cd "$srcdir/$src_name"
mkdir -p build
cd build
cmake $OPEN62541_CMAKE_FLAGS ..
make
}
package() {
cd "$srcdir/$src_name/build"
make install
install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$src_name/LICENSE"
}
|