updated on Mon Jan 23 12:00:23 UTC 2012
[aur-mirror.git] / ceph-git / PKGBUILD
blob61c2df461ae2a748b8ecf7e3ae336d99508e16f8
1 # Maintainer: Alexander Rødseth <rodseth@gmail.com>
2 pkgname=ceph-git
3 pkgver=20110528
4 pkgrel=1
5 pkgdesc="Massively distributed fault-tolerant file system. Git development version."
6 arch=('x86_64' 'i686')
7 url="http://ceph.newdream.net/"
8 license=('GPL')
9 depends=('libedit' 'libsigc++' 'gtkmm' 'btrfs-progs-unstable' 'crypto++' 'google-perftools' 'python2' 'fuse' 'keyutils' 'libatomic_ops' 'kernel26>=2.6.37')
10 makedepends=('boost')
11 optdepends=('fcgi: radosgw - Amazon S3 compatibility'
12                                                 'expat: radosgw - Amazon S3 compatibility')
13 provides=('ceph')
14 conflicts=('ceph')
15 _gitroot="git://ceph.newdream.net/git/ceph.git"
16 _gitname="ceph"
18 build() {
19   cd "$srcdir"
21   msg "Connecting to the ceph git repository..."
22   if [ -d "$srcdir/$_gitname" ] ; then
23     cd $_gitname && git pull origin
24     msg "The local files are updated."
25   else
26     git clone $_gitroot
27   fi
28   msg "GIT checkout done or server timeout"
30   cd "$srcdir"
31   rm -rf "$_gitname-build"
32   git clone "$_gitname" "$_gitname-build"
33   cd "$_gitname-build"
35   msg2 "Configuring..."
36   ./autogen.sh
37   ./configure --prefix=/usr --sysconfdir=/etc
38   make clean
39   msg2 "Compiling..."
40   make
41   msg2 "Patching python scripts..."
42   sed -i 's:thon:thon2:' src/obsync/boto_tool
43   sed -i 's:thon:thon2:' src/obsync/obsync
46 package() {
47   cd "$_gitname-build"
48   msg2 "Packaging..."
49   make DESTDIR="$pkgdir" install
50   mkdir -p "$pkgdir/var/run/ceph" "$pkgdir/var/log/ceph" \
51     "$pkgdir/etc/rc.d" "$pkgdir/etc/ceph"
52   install -Dm755 "src/init-ceph" "$pkgdir/etc/rc.d/ceph"
53   # Move /usr/sbin to /sbin, which is expected by the mount command
54   mv "$pkgdir/usr/sbin" "$pkgdir/"
55   install -Dm644 "$pkgdir/usr/share/doc/ceph/sample.ceph.conf" \
56     "$pkgdir/etc/ceph/ceph.conf.sample"
57   install -Dm644 COPYING \
58     "$pkgdir/usr/share/licenses/$pkgname/COPYING"
61 # vim:set ts=2 sw=2 et: