# Contributions from ArchLinux: https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/ceph pkgname=ceph pkgver=12.0.3 pkgrel=2 pkgdesc='Distributed, fault-tolerant storage platform delivering object, block, and file system' arch=('x86_64') url='http://ceph.com/' license=('GPL') 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') optdepends=('xfsprogs: support xfs backend') options=('emptydirs') source=("https://download.ceph.com/tarballs/$pkgname-$pkgver.tar.gz") sha256sums=('b0f2655c826bcba12c25828a8434f4e3d4cfdf41b5f59999da54132b96521de7') 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 } 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 make } check() { cd build make test } package() { make -C build DESTDIR="$pkgdir" install cd "$pkgdir" # install bash-completions to /usr/share 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 # 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,' {} \; }