mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
106 lines
3.2 KiB
Bash
106 lines
3.2 KiB
Bash
# $Id$
|
|
# Maintainer: Sébastien "Seblu" Luttringer <seblu@archlinux.org>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - patch to remove neon detection in configure
|
|
# - add 32bit ARM to the xfs.h fix
|
|
# - make -j3, RAM constraints
|
|
|
|
highmem=1
|
|
|
|
pkgname=ceph
|
|
pkgver=10.2.5
|
|
pkgrel=1
|
|
pkgdesc='Distributed, fault-tolerant storage platform delivering object, block, and file system'
|
|
arch=('x86_64' 'i686')
|
|
url='https://ceph.com/'
|
|
license=('GPL')
|
|
makedepends=('boost' 'systemd' 'xfsprogs' 'python2-sphinx' 'cython2' 'sed')
|
|
depends=('boost-libs' 'curl' 'expat' 'fcgi' 'fuse2' 'gcc-libs' 'glibc'
|
|
'gperftools' 'keyutils' 'leveldb' 'libaio' 'libatomic_ops' 'libedit'
|
|
'libsystemd' 'libutil-linux' 'ncurses' 'nss' 'python2' 'snappy'
|
|
'python2-setuptools' 'xfsprogs')
|
|
options=('emptydirs')
|
|
source=("https://download.ceph.com/tarballs/$pkgname-$pkgver.tar.gz"
|
|
'ceph.sysusers'
|
|
'01-ceph-detec-init.patch'
|
|
'no-neon.diff')
|
|
md5sums=('772bf99f4360774f5948191a7b012c88'
|
|
'b3e24e3aa005a657ab475f84bfe3291a'
|
|
'da25c78ae413dc134cc99fe9818f6ff1'
|
|
'd75fe7ff3125dd2df43fee6410700dda')
|
|
|
|
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
|
|
# fix xfs.h failure in configure on i686
|
|
[[ $CARCH == i686 || $CARCH == arm || $CARCH == armv6h || $CARCH == armv7h ]] && export CXXFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64"
|
|
# don't use autotools for ceph-disk, ceph-detect and tests
|
|
sed -ri 's,include (ceph-disk|ceph-detect-init|test)/Makefile.am,,' src/Makefile.am
|
|
# regen configure
|
|
./autogen.sh
|
|
# fix python-config binary name
|
|
sed -i 's,python-config,python2-config,g' configure
|
|
# drop neon checks
|
|
patch -p1 -i ../no-neon.diff
|
|
./configure \
|
|
--prefix=/usr \
|
|
--sbindir=/usr/bin \
|
|
--libexecdir=/usr/lib \
|
|
--sysconfdir=/etc \
|
|
--localstatedir=/var \
|
|
--with-man-pages \
|
|
--without-radosgw \
|
|
--without-openldap \
|
|
PYTHON=/usr/bin/python2 \
|
|
CYTHON_CHECK=yes \
|
|
PYTHON_CONFIG_CHECK=yes \
|
|
SPHINX_BUILD=sphinx-build2
|
|
make -j3
|
|
}
|
|
|
|
package() {
|
|
cd $pkgname-$pkgver
|
|
|
|
# main install
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
# ceph-disk
|
|
pushd src/ceph-disk
|
|
python2 setup.py install --root "$pkgdir" --prefix=/usr
|
|
popd
|
|
|
|
# ceph-detect-init
|
|
pushd src/ceph-detect-init
|
|
python2 setup.py install --root "$pkgdir" --prefix=/usr
|
|
popd
|
|
|
|
# systemd stuff
|
|
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"
|
|
|
|
# fix bash completions path
|
|
msg2 'Fix bash completion path'
|
|
install -d -m 755 "$pkgdir"/usr/share/bash-completion
|
|
mv "$pkgdir"/{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 "$pkgdir" -type f -executable -exec \
|
|
sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \;
|
|
}
|
|
|
|
# vim:set ts=2 sw=2 et:
|