1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
# $Id$
# Maintainer: Ido Rosen <ido@kernel.org>
# Contributor: Evan Teitelman <teitelmanevan@gmail.com>
# Contributor: Eric Renfro <erenfro@gmail.com>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Marti Raudsepp <marti@juffo.org>
# Contributor: Sandman <the0sandman@hotmail.com>
# Contributor: raw <spam@rw23.de>
# Contributor: Dave Simons <miouhpi@gmail.com>
# Contributor: Dominik Hannen <cantares1+github@gmail.com>
# Contributor: David Anderson <dave@natulte.net>
# Contributor: Joe Julian <me@joejulian.name>
#
# NOTE: To request changes to this package, please submit a pull request
# to the GitHub repository at https://github.com/ido/packages-archlinux
# Otherwise, open a GitHub issue. Thank you! -Ido
#
pkgname=ceph-git
pkgver=0.89.370.gcfb03b2
pkgrel=1
epoch=1
pkgdesc='Distributed, fault-tolerant file system delivering object, block, and file storage in one unified system.'
arch=('x86_64' 'i686')
url='http://ceph.com/'
license=('GPL')
depends=('libedit' 'libsigc++' 'gtkmm' 'btrfs-progs' 'crypto++'
'gperftools>=1.8.3-2' 'python2' 'fuse' 'keyutils'
'libatomic_ops' 'curl' 'libaio' 'fcgi' 'expat' 'boost'
'leveldb' 'xfsprogs')
makedepends=('boost' 'boost-libs' 'yasm')
install=ceph.install
options=('!libtool' 'emptydirs')
provides=('ceph')
conflicts=('ceph')
source=("git+https://github.com/ceph/ceph.git"
"ceph-osd@.service"
"ceph-mon@.service"
"ceph-mds@.service"
"ceph.install")
sha256sums=('SKIP'
'29483c0f6718e8830cf52c0d31e391fb52dc1b460bcb65cf9c72dfab83e5b5ce'
'a50811ce62fd6cdcc17d8f1e4d9700c1889ab4bfc5e9a22155bd725a27715e3c'
'b8239a04cc42e3e4ced2e141df6804e61e875131a5c95d6bcbfc3b44f388d44b'
'c1669b2bedc07a313b8bd29735296791abc0fd94eb353c9683b6015f2cc2c93c')
pkgver() {
cd "${srcdir}/${pkgname%%-git}"
#printf "%s" "$(git describe --long --tags | sed 's/v//; s/-/./g')"
git describe --long --tags | sed 's/^v//; s/-/./g'
}
prepare() {
cd "${srcdir}/${pkgname%%-git}"
git submodule sync
git submodule update --init
# fix python scripts to use python2
find . -type f -exec sed -i 's,^#!/usr/bin/env python$,#!/usr/bin/env python2,g' {} \;
# run setup.py script with python2
find . -type f ! -name 'tox.ini' -exec sed -i 's,python setup.py,python2 setup.py,g' {} \;
}
build() {
cd "${srcdir}/${pkgname%%-git}"
./autogen.sh
LIBS="-lpthread -lboost_system" PYTHON=/usr/bin/python2 LDFLAGS="" ./configure \
--prefix=/usr \
--sysconfdir=/etc \
--with-radosgw
make
}
package() {
cd "${srcdir}/${pkgname%%-git}"
# Some python scripts are autogenerated through Makefiles. Fix those
# too, or /usr/bin/ceph will have the wrong shebang.
find . -type f -exec sed -i 's,^#!/usr/bin/env python$,#!/usr/bin/env python2,g' {} \;
make DESTDIR="$pkgdir" install
install -dm755 "$pkgdir/var/run/ceph" "$pkgdir/var/log/ceph" \
"$pkgdir/etc/rc.d" "$pkgdir/etc/ceph"
# Systemd.
install -dm755 "$pkgdir/usr/lib/systemd/system"
install -Dm644 "$srcdir/ceph-osd@.service" "$pkgdir/usr/lib/systemd/system/ceph-osd@.service"
install -Dm644 "$srcdir/ceph-mon@.service" "$pkgdir/usr/lib/systemd/system/ceph-mon@.service"
install -Dm644 "$srcdir/ceph-mds@.service" "$pkgdir/usr/lib/systemd/system/ceph-mds@.service"
install -Dm755 "src/init-ceph" "$pkgdir/etc/rc.d/ceph"
# Ceph udev rules.
install -Dm644 "udev/50-rbd.rules" "$pkgdir/usr/lib/udev/rules.d/50-rbd.rules"
install -Dm644 "udev/60-ceph-partuuid-workaround.rules" \
"$pkgdir/usr/lib/udev/rules.d/60-ceph-partuuid-workaround.rules"
install -Dm644 "udev/95-ceph-osd-alt.rules" "$pkgdir/usr/lib/udev/rules.d/95-ceph-osd.rules"
# Fix bin directory.
mv "$pkgdir/usr/sbin" "$pkgdir/usr/bin"
# Sample config.
install -Dm644 "$pkgdir/usr/share/doc/ceph/sample.ceph.conf" \
"$pkgdir/etc/ceph/ceph.conf.sample"
# License.
install -Dm644 COPYING \
"$pkgdir/usr/share/licenses/${pkgname}/COPYING"
# Clean up.
rmdir "$pkgdir/var/run/ceph"
}
|