PKGBUILDs/extra/ceph/PKGBUILD
2016-10-30 20:37:21 +00:00

97 lines
2.8 KiB
Bash

# $Id$
# Maintainer: Sébastien "Seblu" Luttringer <seblu@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - patch to remove neon detection in configure
# - patch to remove incompatible gcc flag
pkgname=ceph
pkgver=10.2.3
pkgrel=1
pkgdesc='Distributed, fault-tolerant storage platform delivering object, block, and file system'
arch=('x86_64' 'i686')
url='http://ceph.com/'
license=('GPL')
makedepends=('boost' 'systemd' 'xfsprogs' 'python2-setuptools' 'python2-sphinx'
'python2-virtualenv' 'cython2')
depends=('boost-libs' 'curl' 'expat' 'fcgi' 'fuse' 'gcc-libs' 'glibc'
'gperftools' 'keyutils' 'leveldb' 'libaio' 'libatomic_ops' 'libedit'
'libsystemd' 'libutil-linux' 'ncurses' 'nss' 'python2' 'snappy')
optdepends=('xfsprogs: support xfs backend')
options=('emptydirs')
install=ceph.install
source=("http://ceph.com/download/$pkgname-$pkgver.tar.gz"
'ceph.sysusers'
'01-virtualenv2.patch'
'02-setup-python2.patch'
'03-Revert-rgw-ldap-fix-ldap-bindpw-parsing.patch'
'04-fix-686-build.patch'
'no-neon.patch')
md5sums=('5cba47af53b3b17002aad3c854e5405c'
'b3e24e3aa005a657ab475f84bfe3291a'
'a3f72dc8e97f9fd5708d52256bcd9e75'
'f11582acceeb6c1790518c3a5a29bb18'
'97d293b08d5d4b4a2db37030c28bc617'
'8c4af30de8c2dab89a8afa3ff8c03a5d')
prepare() {
cd $pkgname-$pkgver
# apply patch from the source array (should be a pacman feature)
local filename
for filename in "${source[@]}"; do
if [[ "$filename" =~ \.patch$ ]]; then
msg2 "Applying patch $filename"
patch -p1 -N -i "$srcdir/$filename"
fi
done
:
}
build() {
cd $pkgname-$pkgver
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--localstatedir=/var \
--with-man-pages \
--with-radosgw \
--without-openldap \
PYTHON=/usr/bin/python2 \
CYTHON_CHECK=yes \
PYTHON_CONFIG_CHECK=yes \
SPHINX_BUILD=sphinx-build2
make
}
package() {
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
# install tmpfiles.d
install -Dm644 systemd/ceph.tmpfiles.d "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
install -Dm644 "$srcdir"/ceph.sysusers "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
cd "$pkgdir"
# fix sbin path
msg2 'Fix sbin paths'
mv -v usr/sbin/* usr/bin
rmdir -v usr/sbin
# fix bash completions path
msg2 'Fix bash completion path'
install -d -m 755 usr/share/bash-completion
mv etc/bash_completion.d usr/share/bash-completion/completions
# fix python2 shebang, did not do it in prepare() anymore because it
# confuse automake
msg2 'Fix python2 shebang'
find . -type f -executable -exec \
sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \;
}
# vim:set ts=2 sw=2 et: