PKGBUILDs/extra/ceph/PKGBUILD

97 lines
2.8 KiB
Bash
Raw Normal View History

2015-09-18 03:27:39 +00:00
# $Id$
# Maintainer: Sébastien "Seblu" Luttringer <seblu@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - patch to remove neon detection in configure
2016-09-10 18:46:53 +00:00
# - patch to remove incompatible gcc flag
2015-09-18 03:27:39 +00:00
pkgname=ceph
2016-10-30 20:37:21 +00:00
pkgver=10.2.3
2017-01-12 13:37:42 +00:00
pkgrel=2
2015-09-18 03:27:39 +00:00
pkgdesc='Distributed, fault-tolerant storage platform delivering object, block, and file system'
arch=('x86_64' 'i686')
url='http://ceph.com/'
license=('GPL')
2016-09-10 17:34:45 +00:00
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')
2015-09-18 03:27:39 +00:00
optdepends=('xfsprogs: support xfs backend')
options=('emptydirs')
2016-09-10 17:34:45 +00:00
install=ceph.install
source=("http://ceph.com/download/$pkgname-$pkgver.tar.gz"
'ceph.sysusers'
'01-virtualenv2.patch'
'02-setup-python2.patch'
2016-10-30 20:37:21 +00:00
'03-Revert-rgw-ldap-fix-ldap-bindpw-parsing.patch'
'04-fix-686-build.patch'
'no-neon.patch')
2016-09-10 17:34:45 +00:00
md5sums=('5cba47af53b3b17002aad3c854e5405c'
'b3e24e3aa005a657ab475f84bfe3291a'
'a3f72dc8e97f9fd5708d52256bcd9e75'
'f11582acceeb6c1790518c3a5a29bb18'
2016-09-10 18:46:53 +00:00
'97d293b08d5d4b4a2db37030c28bc617'
'8c4af30de8c2dab89a8afa3ff8c03a5d')
2015-09-18 03:27:39 +00:00
prepare() {
2016-09-10 17:34:45 +00:00
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
:
2015-09-18 03:27:39 +00:00
}
build() {
cd $pkgname-$pkgver
./configure \
--prefix=/usr \
--sbindir=/usr/bin \
--libexecdir=/usr/lib \
--sysconfdir=/etc \
--localstatedir=/var \
2016-09-10 17:34:45 +00:00
--with-man-pages \
--with-radosgw \
--without-openldap \
PYTHON=/usr/bin/python2 \
CYTHON_CHECK=yes \
PYTHON_CONFIG_CHECK=yes \
SPHINX_BUILD=sphinx-build2
2015-09-18 03:27:39 +00:00
make
}
package() {
2016-09-10 17:34:45 +00:00
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"
2015-09-18 03:27:39 +00:00
cd "$pkgdir"
2016-09-10 17:34:45 +00:00
# fix sbin path
msg2 'Fix sbin paths'
2016-10-30 20:37:21 +00:00
mv -v usr/sbin/* usr/bin
rmdir -v usr/sbin
2015-09-18 03:27:39 +00:00
2016-09-10 17:34:45 +00:00
# fix bash completions path
msg2 'Fix bash completion path'
2015-09-18 03:27:39 +00:00
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
2016-09-10 17:34:45 +00:00
msg2 'Fix python2 shebang'
find . -type f -executable -exec \
2015-09-18 03:27:39 +00:00
sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \;
}
# vim:set ts=2 sw=2 et: