[arch-commits] Commit in ceph/trunk (PKGBUILD.v12)
Sébastien Luttringer
seblu at archlinux.org
Fri Sep 22 03:45:17 UTC 2017
Date: Friday, September 22, 2017 @ 03:45:16
Author: seblu
Revision: 306089
Add v12
Added:
ceph/trunk/PKGBUILD.v12
--------------+
PKGBUILD.v12 | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 91 insertions(+)
Added: PKGBUILD.v12
===================================================================
--- PKGBUILD.v12 (rev 0)
+++ PKGBUILD.v12 2017-09-22 03:45:16 UTC (rev 306089)
@@ -0,0 +1,91 @@
+# $Id: PKGBUILD 287115 2017-01-22 01:54:44Z seblu $
+# Maintainer: Sébastien "Seblu" Luttringer <seblu at archlinux.org>
+
+pkgname=ceph
+pkgver=12.2.0
+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' 'python2-virtualenv'
+ 'cython2' 'cmake' 'yasm' 'gperf')
+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' 'lz4')
+options=('!emptydirs')
+source=("https://download.ceph.com/tarballs/ceph-$pkgver.tar.gz"
+ 'ceph.sysusers')
+md5sums=('e2a1ac94cfce4c5998e4a3c54ff2f344'
+ 'b3e24e3aa005a657ab475f84bfe3291a')
+
+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
+ [[ -d build ]] || mkdir build
+ cd build
+ # list of options defaults: grep ^option CMakeLists.txt
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc \
+ -DCMAKE_INSTALL_SBINDIR=/usr/bin \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib \
+ -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib \
+ -DSPHINX_BUILD=/usr/bin/sphinx-build2 \
+ -DWITH_SYSTEM_BOOST=ON \
+ -DWITH_SYSTEMD=ON \
+ -DWITH_LZ4=ON \
+ -DWITH_EMBEDDED=OFF \
+ -DWITH_OPENLDAP=OFF \
+ -DWITH_LTTNG=OFF \
+ -DWITH_BABELTRACE=OFF \
+ -DWITH_TESTS=OFF \
+ ..
+ make
+}
+
+package() {
+ cd $pkgname-$pkgver/build
+
+ make DESTDIR="$pkgdir" install
+
+ cd "$pkgdir"
+
+ # install tmpfiles.d
+ install -Dm644 "$srcdir"/$pkgname-$pkgver/systemd/ceph.tmpfiles.d \
+ usr/lib/tmpfiles.d/$pkgname.conf
+ install -Dm644 "$srcdir"/ceph.sysusers \
+ usr/lib/sysusers.d/$pkgname.conf
+
+ # fix sbin path
+ msg2 'Fix sbin paths'
+ mv -v usr/sbin/* usr/bin
+
+ # fix bash completions path
+ msg2 'Fix bash completion path'
+ install -d -m 755 usr/share/bash-completion
+ mv -v etc/bash_completion.d usr/share/bash-completion/completions
+
+ # remove debian init
+ rm -v etc/init.d/ceph
+
+ # fix python2 shebang, did not do it in prepare() because cmake remplace some
+ msg2 'Fix python2 shebang'
+ find usr/bin -type f -executable -exec \
+ sed -i '1s,^#! \?/usr/bin/\(env \|\)python$,#!/usr/bin/python2,' {} \;
+}
+
+# vim:set ts=2 sw=2 et:
More information about the arch-commits
mailing list