aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-04-13 01:57:07 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-04-13 05:12:23 +0000
commit00de6b35842e286a6a8c409836966e30f774e171 (patch)
treeb0ea528d02a576d49f58b46eed0d0c39dfae095a
parentae373ddab258c87ce27e04b1957c98cbe2125b36 (diff)
downloadaports-00de6b35842e286a6a8c409836966e30f774e171.tar.gz
aports-00de6b35842e286a6a8c409836966e30f774e171.tar.bz2
aports-00de6b35842e286a6a8c409836966e30f774e171.tar.xz
testing/lizardfs: add bash-completion subpackage
-rw-r--r--testing/lizardfs/APKBUILD56
1 files changed, 33 insertions, 23 deletions
diff --git a/testing/lizardfs/APKBUILD b/testing/lizardfs/APKBUILD
index a13422b0ed..4edb713113 100644
--- a/testing/lizardfs/APKBUILD
+++ b/testing/lizardfs/APKBUILD
@@ -6,14 +6,22 @@ pkgrel=1
pkgdesc="a highly reliable, scalable and efficient distributed file system"
url="https://github.com/lizardfs/lizardfs/"
arch="all"
-license="GPL-3.0"
-makedepends="$depends_dev boost-dev cmake fuse-dev zlib-dev asciidoc python2"
+license="GPL-3.0-only"
+makedepends="boost-dev cmake fuse-dev zlib-dev asciidoc python2"
pkgusers="mfs"
pkggroups="mfs"
install="$pkgname.pre-install"
-subpackages="$pkgname-doc $pkgname-master $pkgname-metalogger
- $pkgname-chunkserver $pkgname-tools $pkgname-cgi $pkgname-cgiserv
- $pkgname-adm"
+subpackages="
+ $pkgname-doc
+ $pkgname-master
+ $pkgname-metalogger
+ $pkgname-chunkserver
+ $pkgname-tools
+ $pkgname-cgi
+ $pkgname-cgiserv
+ $pkgname-adm
+ $pkgname-bash-completion:bashcomp:noarch
+ "
source="lizardfs-$pkgver.tar.gz::https://github.com/lizardfs/lizardfs/archive/v$pkgver.tar.gz
lizardfs-cgiserv.initd
lizardfs-chunkserver.initd
@@ -22,30 +30,21 @@ source="lizardfs-$pkgver.tar.gz::https://github.com/lizardfs/lizardfs/archive/v$
677.patch
"
-prepare() {
- local i
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i;;
- esac
- done
- mkdir -p build
-}
-
build() {
- mkdir -p "$builddir"/build
- cd "$builddir"/build
- cmake .. \
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake -B build \
-DCMAKE_BUILD_TYPE=None \
- -DCMAKE_INSTALL_PREFIX="/" \
+ -DCMAKE_INSTALL_PREFIX=/ \
-DENABLE_TESTS=NO \
- -DENABLE_DEBIAN_PATHS=YES
- make
+ -DENABLE_DEBIAN_PATHS=YES \
+ $CMAKE_CROSSOPTS .
+ make -C build
}
package() {
- cd "$builddir"/build
- make DESTDIR="$pkgdir" install
+ make -C build DESTDIR="$pkgdir" install
chown -R mfs:mfs "$pkgdir"/var/lib/mfs
for i in $source; do
case $i in
@@ -55,6 +54,9 @@ package() {
;;
esac
done
+
+ mkdir -p "$pkgdir"/usr/share/bash-completion
+ mv "$pkgdir"/etc/bash_completion.d "$pkgdir"/usr/share/bash-completion/completions
}
_mv_files() {
@@ -166,6 +168,14 @@ adm() {
usr/bin/lizardfs-probe
}
+bashcomp() {
+ depends=""
+ pkgdesc="Bash completions for $pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
+
+ amove usr/share/bash-completion/completions
+}
+
sha512sums="0136114266dfadcf8e2205bfd19f50ee201566958fba1dc97d4a238ed63ca91dc2cd6352f25d911f4410b0fbd59846f54206da773789d5b959c8c02bde5adf20 lizardfs-3.12.0.tar.gz
2c78af05c2eeba866c25c58d996c64d16a590248660a362e29a52065af93c126c6eb3232c8cdbb797e60cca406608b77f29ce62717446b7c3d1a8d35e0a722d8 lizardfs-cgiserv.initd
f5de527f2c6f729d49c365cbac64d938d8f90de2c78ac2f4fdbb445532fbc6438ed7380b7963f70cfbf99d48282d7da6a8dbb3df9ae84ac7d2fcebda2ce308c8 lizardfs-chunkserver.initd