diff options
author | kashirin.alex | 2021-02-07 09:02:58 +0100 |
---|---|---|
committer | kashirin.alex | 2021-02-07 09:02:58 +0100 |
commit | a763c67662f2d2a83435e7909fd0e5e9ec2ac264 (patch) | |
tree | 4ebe6497ec74d4c225d342df1fcdb2f1b0f142cf | |
download | aur-hdfs-lib-cpp.tar.gz |
Initial HDFS C++ Library package
-rw-r--r-- | .SRCINFO | 26 | ||||
-rwxr-xr-x | PKGBUILD | 80 | ||||
-rwxr-xr-x | README.md | 22 |
3 files changed, 128 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..55199fd94770 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,26 @@ +pkgbase = hdfs-lib-cpp + pkgdesc = Libhdfs++ for Hadoop’s Distributed File System (HDFS) + pkgver = 3.3.0 + pkgrel = 1 + url = https://github.com/apache/hadoop/tree/rel/release-3.3.0/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp + install = README.md + arch = x86_64 + groups = hdfs + license = APACHE + makedepends = pkg-config + makedepends = cmake + makedepends = make + makedepends = gcc + makedepends = gsasl + makedepends = openssl + makedepends = protobuf + makedepends = jdk-openjdk + depends = gsasl + depends = openssl + depends = protobuf + provides = libhdfspp.so + source = hdfs-lib-cpp-3.3.0-source::git+https://github.com/apache/hadoop.git#tag=rel/release-3.3.0 + sha256sums = SKIP + +pkgname = hdfs-lib-cpp + diff --git a/PKGBUILD b/PKGBUILD new file mode 100755 index 000000000000..e9d5005bade9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,80 @@ +# Maintainer: Alex Kashirin <kashirin.alex@gmail.com> + +_group_name="hdfs" +_sub_name="lib-cpp" + +pkgname=${_group_name}-${_sub_name} +pkgver=3.3.0 +pkgrel=1 +pkgdesc="Libhdfs++ for Hadoop’s Distributed File System (HDFS)" +arch=("x86_64") + +groups=($_group_name) +provides=( + libhdfspp.so +) + +url="https://github.com/apache/hadoop/tree/rel/release-3.3.0/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp" +license=('APACHE') + + +depends=( + 'gsasl' + 'openssl' + 'protobuf' +) +makedepends=( + 'pkg-config' + 'cmake' + 'make' + 'gcc' + 'gsasl' + 'openssl' + 'protobuf' + 'jdk-openjdk' +) + +optdepends=() +conflicts=() +replaces=() +backup=() +options=() +install=README.md +changelog= + + +source=( + $pkgname-$pkgver-source::git+https://github.com/apache/hadoop.git#tag=rel/release-$pkgver +) +sha256sums=('SKIP') + +build() { + export JAVA_HOME=/usr/lib/jvm/default; + _src_path=`pwd`/$pkgname-$pkgver-source/; + _build_path=`pwd`/$pkgname-$pkgver-build/; + + sed -i 's/set(LIBHDFSPP_VERSION "0.1.0")/set(LIBHDFSPP_VERSION "'${pkgver}'")/g' \ + ${_src_path}/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt; + + mkdir -p ${_build_path}; + cd ${_build_path}; + + cmake ${_src_path}/hadoop-hdfs-project/hadoop-hdfs-native-client/src/ \ + -DJVM_ARCH_DATA_MODEL=64 -DHADOOP_BUILD=ON -DHDFSPP_LIBRARY_ONLY=ON \ + -DBUILD_SHARED_HDFSPP=ON -DLIBHDFSPP_VERSION=$pkgver \ + -DCMAKE_CXX_FLAGS="-ffile-prefix-map=${_src_path}= -ffile-prefix-map=${_build_path}=" \ + -DCMAKE_SKIP_RPATH=ON -DCMAKE_INSTALL_PREFIX=$pkgdir/usr \ + -DCMAKE_BUILD_TYPE=Release; + + cd main/native/libhdfspp; + make hdfspp -j$((`grep -c processor < /proc/cpuinfo || echo 1`)) VERBOSE=1; +} + + +package() { + mkdir -p $pkgdir/usr/share/$pkgname; + cp $pkgname-$pkgver-source/LICENSE.txt $pkgdir/usr/share/$pkgname/; + + cd $pkgname-$pkgver-build/main/native/libhdfspp; + make hdfspp install; +} diff --git a/README.md b/README.md new file mode 100755 index 000000000000..7a9050b30786 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ + + +#### Creating the `hdfs-lib-cpp` Package + +* Clone the package from AUR: +``` +git clone https://aur.archlinux.org/hdfs-lib-cpp.git; +``` + + +* Configure, Build and Create the Package: +``` +# while at the folder of `PKGBUILD` +cd hdfs-lib-cpp; +chmod -R 777 ./; + +sudo -u swcdb_builder makepkg --printsrcinfo > .SRCINFO; +sudo -u swcdb_builder makepkg -s -r; + +# Install +sudo -u swcdb_builder makepkg -i; +```
\ No newline at end of file |