desktop/ceph/PKGBUILD

64 lines
2.0 KiB
Bash
Raw Normal View History

2017-06-03 05:26:12 +08:00
# Contributions from ArchLinux: https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/ceph
2015-11-19 06:46:22 +08:00
pkgname=ceph
pkgver=12.0.3
2017-06-03 05:26:12 +08:00
pkgrel=2
2015-11-19 06:46:22 +08:00
pkgdesc='Distributed, fault-tolerant storage platform delivering object, block, and file system'
arch=('x86_64')
url='http://ceph.com/'
license=('GPL')
2017-06-03 05:26:12 +08:00
makedepends=('boost' 'xfsprogs' 'python2-sphinx' 'cmake')
depends=('boost-libs' 'curl' 'expat' 'fcgi' 'fuse' 'gperftools' 'keyutils' 'leveldb' 'libaio' 'libatomic_ops'
'libedit' 'systemd' 'util-linux' 'ncurses' 'nss' 'python2' 'snappy' 'python2-cython' 'python2-prettytable' 'yasm')
2015-11-19 06:46:22 +08:00
optdepends=('xfsprogs: support xfs backend')
options=('emptydirs')
source=("https://download.ceph.com/tarballs/$pkgname-$pkgver.tar.gz")
sha256sums=('b0f2655c826bcba12c25828a8434f4e3d4cfdf41b5f59999da54132b96521de7')
2015-11-19 06:46:22 +08:00
prepare() {
[[ -d build ]] && rm -rfv build
mkdir build
# we install python2 version sphinx-build as sphinx-build2, which is not recognized by the script
sed 's,sphinx-build,sphinx-build2,g' -i $pkgname-$pkgver/CMakeLists.txt
}
2015-11-19 06:46:22 +08:00
build() {
cd build
cmake -DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_FULL_SBINDIR=/usr/bin \
-DCMAKE_INSTALL_FULL_LIBDIR=/usr/lib \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DCMAKE_INSTALL_LIBEXECDIR=/usr/lib \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DWITH_SYSTEMD=ON \
-DWITH_LTTNG=OFF \
-DHAVE_BABELTRACE=OFF \
../$pkgname-$pkgver
# FIXME: LTTng and Babeltrace are modules we didn't import yet
2015-11-19 06:46:22 +08:00
make
}
check() {
cd build
make test
}
2015-11-19 06:46:22 +08:00
package() {
make -C build DESTDIR="$pkgdir" install
2015-11-19 06:46:22 +08:00
cd "$pkgdir"
# install bash-completions to /usr/share
2015-11-19 06:46:22 +08:00
install -d -m 755 usr/share/bash-completion
mv etc/bash_completion.d usr/share/bash-completion/completions
# remove upstart scripts
rm -rf etc/init.d
2015-11-19 06:46:22 +08:00
# fix python2 shebang, did not do it in prepare() anymore because it
# confuse automake
find . -type f -exec \
sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \;
}