Add open62541 stable package

This commit is contained in:
Stefan Profanter 2019-08-14 18:27:52 +02:00
parent 5e7024ba94
commit 8fe37b3cfd
No known key found for this signature in database
GPG key ID: 52787A8E77301854
2 changed files with 62 additions and 88 deletions

View file

@ -1,12 +1,15 @@
pkgbase = pkgbase pkgbase = open62541
pkgdesc = Japanese-Russian kanji and word dictionary pkgdesc = An open source and free implementation of OPC Unified Architecture written in the common subset of the C99 and C++98 languages.
pkgver = 1.10 pkgver = v1.0_rc4_r8_g6b93d4e0
pkgrel = 1 pkgrel = 1
url = http://www.susi.ru/yarxi/ url = http://open62541.org/
arch = x86_64 arch = any
license = custom license = MPL2
depends = ttf-sazanami makedepends = cmake
depends = nas source = git+https://github.com/open62541/open62541.git#branch=1.0
md5sums = SKIP
sha256sums = SKIP
pkgname = open62541
pkgname = yarxi

129
PKGBUILD
View file

@ -1,89 +1,60 @@
# Maintainer Seva Alekseyev <sevaa@yarxi.ru> # Maintainer: open62541 Team <open62541-core@googlegroups.com>
# Maintainer Stoyan Minaev <stoyan.minaev@gmail.com> branch=1.0
pkgname=open62541
pkgbase=pkgbase pkgver=v1.0_rc4_r8_g6b93d4e0
pkgname=yarxi
pkgver=1.10
pkgrel=1 pkgrel=1
pkgdesc="Japanese-Russian kanji and word dictionary" pkgdesc="An open source and free implementation of OPC Unified Architecture written in the common subset of the C99 and C++98 languages."
url="http://www.susi.ru/yarxi/" arch=('any')
license=('custom') url="http://open62541.org/"
_source=( license=('MPL2')
"http://www.susi.ru/yarxi/yarxi_${pkgver}-${pkgrel}_amd64.deb" makedepends=('cmake')
"http://ftp.uk.debian.org/debian/pool/main/q/qt4-x11/libqtcore4_4.8.7+dfsg-11_amd64.deb" source=("git+https://github.com/open62541/open62541.git#branch=$branch")
"http://ftp.uk.debian.org/debian/pool/main/q/qt4-x11/libqtgui4_4.8.7+dfsg-11_amd64.deb" md5sums=('SKIP')
"http://ftp.uk.debian.org/debian/pool/main/q/qt4-x11/libqt4-network_4.8.7+dfsg-11_amd64.deb" sha256sums=('SKIP')
)
arch=('x86_64')
_md5sums=(
'812d2265816ed781751c5c0eb6664d91'
'b243ada8569b2b3d4586dc4178fd8d56'
'797e351a57c9d56368f710e7cba40f21'
'b3cff12767e21d3a76794046557d3df0'
)
depends=(
ttf-sazanami nas
)
prepare() { prepare() {
cd $srcdir/ # Install the libraries to lib instead of lib64
echo "Due to 'makepkg' and 'PKGBUILD' specs limitations I need to dowanload sources and validate them by myself" # Install to /usr/ instead of /usr/local/
for source_url in ${_source[@]}; do OPEN62541_CMAKE_FLAGS_DEFAULT=\
source_filename=${source_url##*/} "-DBUILD_SHARED_LIBS=ON"\
if [ ! -f "$source_filename" ]; then " -DUA_NAMESPACE_ZERO=FULL"\
echo "Downloading next source - $source_filename ..." " -DUA_ENABLE_AMALGAMATION=OFF"\
curl -A DUMMY -O "$source_url"; " -DCMAKE_BUILD_TYPE=RelWithDebInfo"\
else " -DCMAKE_INSTALL_PREFIX=$pkgdir/usr/"\
echo "Found already downloaded source - $source_filename" " -DCMAKE_INSTALL_LIBDIR=$pkgdir/usr/lib/"
fi
done # OPEN62541_CMAKE_FLAGS is an environment variable which can be
echo "And now we must validated dowanloaded sources ..." # set in order to specify custom compilation flags for open62541.
for (( i=0; i<${#_source[@]}; ++i )); do # This allows integrating further features. Please review the wiki
source_url=${_source[i]} # for more information.
source_filename=${source_url##*/}
source_expected_md5sum=${_md5sums[i]} OPEN62541_CMAKE_FLAGS="$OPEN62541_CMAKE_FLAGS_DEFAULT $OPEN62541_CMAKE_FLAGS"
source_actual_md5sum=$(md5sum $source_filename | awk '{print $1}')
if [ "$source_actual_md5sum" == "$source_expected_md5sum" ]; then cd "$srcdir/$pkgname"
echo "Validated next source - $source_filename" git submodule init
else git config submodule.UA-Nodeset.url "$srcdir/UA-Nodeset"
echo "Found corrupted source - $source_filename"; return 1 git config submodule.mdnsd "$srcdir/mdnsd"
fi git submodule update
done }
pkgver() {
cd "$srcdir/$pkgname"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/_/g'
} }
build() { build() {
cd $srcdir/ cd "$srcdir/$pkgname"
mkdir -p deb/{$pkgname,qt4core,qt4gui,qt4network}
bsdtar xf yarxi_${pkgver}-${pkgrel}_amd64.deb -C deb/$pkgname/ mkdir -p build
bsdtar xf libqtcore4_4.8.7+dfsg-11_amd64.deb -C deb/qt4core/ cd build
bsdtar xf libqtgui4_4.8.7+dfsg-11_amd64.deb -C deb/qt4gui/
bsdtar xf libqt4-network_4.8.7+dfsg-11_amd64.deb -C deb/qt4network/ cmake $OPEN62541_CMAKE_FLAGS ..
for dir in deb/$pkgname deb/qt4core deb/qt4gui deb/qt4network; do make
cd $dir; tar xf data.tar.*; cd $srcdir
done
} }
package() { package() {
cd $srcdir/ cd "$srcdir/$pkgname/build"
mkdir -p $pkgdir/usr/lib/
mkdir -p $pkgdir/usr/bin/
mkdir -p $pkgdir/usr/share/
mkdir -p $pkgdir/usr/share/applications/
mkdir -p $pkgdir/usr/share/doc/$pkgname/
mkdir -p $pkgdir/usr/share/icons/hicolor/{16x16/apps,32x32/apps,48x48/apps}/
mkdir -p $pkgdir/usr/share/pixmaps/
mkdir -p $pkgdir/usr/share/$pkgname/
install -m 0755 $srcdir/deb/$pkgname/usr/bin/$pkgname $pkgdir/usr/bin/$pkgname
install -m 0755 $srcdir/deb/qt4core/usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.7 $pkgdir/usr/lib/libQtCore.so.4
install -m 0755 $srcdir/deb/qt4gui/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7 $pkgdir/usr/lib/libQtGui.so.4
install -m 0755 $srcdir/deb/qt4network/usr/lib/x86_64-linux-gnu/libQtNetwork.so.4.8.7 $pkgdir/usr/lib/libQtNetwork.so.4
install -m 0644 $srcdir/deb/$pkgname/usr/share/applications/seva-yarxi.desktop $pkgdir/usr/share/applications/
install -m 0644 $srcdir/deb/$pkgname/usr/share/doc/$pkgname/copyright $pkgdir/usr/share/doc/$pkgname/
for icons in 16x16 32x32 48x48; do
install -m 0644 $srcdir/deb/$pkgname/usr/share/icons/hicolor/$icons/apps/seva-yarxi.png $pkgdir/usr/share/icons/hicolor/$icons/apps/
done
install -m 0644 $srcdir/deb/$pkgname/usr/share/pixmaps/*.xpm $pkgdir/usr/share/pixmaps/
install -m 0644 $srcdir/deb/$pkgname/usr/share/$pkgname/yarxice.db $pkgdir/usr/share/$pkgname/
}
#vim: syntax=sh make install
install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}