summaryrefslogtreecommitdiffstats
path: root/ceph.spec.in
blob: e14b31445c565010e1cfda3820299484dc5046f6 (plain)
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
%define pkg_version @VERSION@
# Build against the running kernel - this can be changed to whatever kernel version you want to build against.
%define kernel %(uname -r)
# Get the kernel version that is running, but chop off the architecture part (e.g. 2.6.25.10-86.fc9.x86_64 goes to 2.6.25.10-86.fc9)
%define knoarch %(uname -r | sed s/\.[^.]*$//g)
%define mybuildroot %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%define optflags "-O2"

Name:          ceph
Version:       %{pkg_version}
Release:       1%{?dist}
Packager:      Brock Erwin <brock.erwin@pnl.gov>
Summary:       ceph mon, mds, osd, fuse-client, and kernel-client
License:       LGPL
Group:         Utilities/System
URL:           http://ceph.newdream.net/
Source:        %{name}-%{pkg_version}.tar.gz
BuildRequires: fuse-devel, gcc-c++, libtool, libtool-ltdl-devel, boost-devel, git, perl, perl-devel, gdbm, kernel-devel == %{knoarch}
BuildRoot:     %{mybuildroot}
Requires:      ceph-mon, ceph-mds, ceph-osd, kmod-ceph-%{kernel}

%description
Ceph is a distributed network file system designed to provide excellent
performance, reliability, and scalability.

%package    mon
Summary:    ceph monitor and admin binaries
Group:      Utilities/System
Requires:   libstdc++, glibc-devel, glibc, libgcc
%description mon
monitor and admin binaries

%package    mds
Summary:    ceph mds binaries
Group:      Utilities/System
Requires:   libstdc++, glibc-devel, glibc, libgcc
%description mds
mds binaries

%package     osd
Summary:     ceph osd binaries
Group:       Utilities/System
Requires:    libstdc++, glibc-devel, glibc, libgcc
%description osd
osd binaries

%package     fuse-client
Summary:     ceph fuse-based client
Group:       Utilities/System
Requires:    libstdc++, glibc-devel, glibc, libgcc, fuse-devel
%description fuse-client
fuse-based client

%package     -n kmod-ceph-%{kernel}
Summary:        kernel-client tools for mounting the ceph file system.
Group:          Utilities/System
Requires:       libstdc++, glibc-devel, glibc, libgcc
%description -n kmod-ceph-%{kernel}
kernel-client module

%package        testing 
Summary:        kernel-client tools for mounting the ceph file system.
Group:          Utilities/System
Requires:       libstdc++, glibc-devel, glibc, libgcc
%description    testing
Used as a placeholder for binaries that are installed but unused by the user (testing purposes only)

%prep
%setup -q -n %{name}-%{pkg_version}

%build
./autogen.sh
%{configure}
make %{_smp_mflags}
make -C src/kernel KERNELDIR=/lib/modules/%{kernel}/build # Build the kernel module

%install
%{makeinstall}
mkdir -p $RPM_BUILD_ROOT/lib/modules/%{kernel}/extra
install src/kernel/ceph.ko $RPM_BUILD_ROOT/lib/modules/%{kernel}/extra   
# Install the kernel module
mkdir -p $RPM_BUILD_ROOT/usr/share/ceph
install README $RPM_BUILD_ROOT/usr/share/ceph

%clean
rm -rf $RPM_BUILD_ROOT

%files
/usr/share/ceph/README

%files mon
%{_bindir}/cmon
%{_bindir}/ceph
%{_bindir}/crushtool
%{_bindir}/mkmonfs
%{_bindir}/monmaptool
%{_bindir}/osdmaptool
%{_bindir}/csyn
%{_bindir}/crun

%files mds
%{_bindir}/cmds

%files osd
%{_bindir}/cosd
%{_bindir}/dupstore

%files fuse-client
%{_bindir}/cfuse

%files -n kmod-ceph-%{kernel}
/lib/modules/%{kernel}/extra/ceph.ko

%files testing
%{_bindir}/dumpjournal
%{_bindir}/streamtest