# Maintainer: open62541 Team 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" }