summaryrefslogtreecommitdiffstats
path: root/glusterfs.spec.in
blob: 58192922fdfd0249ab8e3d89cb381b857eef066d (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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# if you make changes, the it is advised to increment this number, and provide 
# a descriptive suffix to identify who owns or what the change represents
# e.g. release_version 2.MSW
%define release 1%{?dist}

# if you wish to compile an rpm without rdma support, compile like this...
# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without rdma
%{?_without_rdma:%define _without_rdma --disable-ibverbs}

# if you wish to compile an rpm without epoll...
# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --without epoll
%{?_without_epoll:%define _without_epoll --disable-epoll}

# if you wish to compile an rpm with fusermount...
# rpmbuild -ta @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz --with fusermount
%{?_with_fusermount:%define _with_fusermount --enable-fusermount}

Summary: Cluster File System
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Release: %{release}
License: AGPLv3+
Group: System Environment/Base
Vendor: Gluster Inc
Packager: @PACKAGE_BUGREPORT@
URL: http://www.gluster.org/docs/index.php/GlusterFS
Source0: ftp://ftp.gluster.com/pub/gluster/glusterfs/@PACKAGE_VERSION@/@PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/service, /sbin/chkconfig
Requires(postun): /sbin/service

BuildRequires: bison flex 
BuildRequires: gcc make

%description
GlusterFS is a clustered file-system capable of scaling to several
peta-bytes. It aggregates various storage bricks over Infiniband RDMA
or TCP/IP interconnect into one large parallel network file
system. GlusterFS is one of the most sophisticated file system in
terms of features and extensibility.  It borrows a powerful concept
called Translators from GNU Hurd kernel. Much of the code in GlusterFS
is in userspace and easily manageable.

%package core
Summary: GlusterFS common files for both the client and the server 
Group: System Environment/Libraries
Obsoletes: glusterfs-libs <= 2.0.0 glusterfs-common < 3.1.0 glusterfs-server < 3.1.0
Provides: glusterfs-libs = %{version}-%{release}

%description core
GlusterFS is a clustered file-system capable of scaling to several
peta-bytes. It aggregates various storage bricks over Infiniband RDMA
or TCP/IP interconnect into one large parallel network file
system. GlusterFS is one of the most sophisticated file system in
terms of features and extensibility.  It borrows a powerful concept
called Translators from GNU Hurd kernel. Much of the code in GlusterFS
is in userspace and easily manageable.

This package includes the glusterfs binary, the glusterd daemon and the gluster
command line, libglusterfs and glusterfs translator modules common to both
GlusterFS server and client framework.

%if 0%{!?_without_rdma:1}
%package rdma
Summary: GlusterFS rdma
Group: Applications/File
Requires: glusterfs-core = %{version}-%{release}
BuildRequires: libibverbs-devel

%description rdma
GlusterFS is a clustered file-system capable of scaling to several
peta-bytes. It aggregates various storage bricks over Infiniband RDMA
or TCP/IP interconnect into one large parallel network file
system. GlusterFS is one of the most sophisticated file system in
terms of features and extensibility.  It borrows a powerful concept
called Translators from GNU Hurd kernel. Much of the code in GlusterFS
is in userspace and easily manageable.

This package provides support to ib-verbs library.
%endif

%package fuse
Summary: GlusterFS Fuse
Group: Applications/File
Requires: glusterfs-core = %{version}-%{release}
Obsoletes: glusterfs-client < 3.1.0

%description fuse
GlusterFS is a clustered file-system capable of scaling to several
peta-bytes. It aggregates various storage bricks over Infiniband RDMA
or TCP/IP interconnect into one large parallel network file
system. GlusterFS is one of the most sophisticated file system in
terms of features and extensibility.  It borrows a powerful concept
called Translators from GNU Hurd kernel. Much of the code in GlusterFS
is in userspace and easily manageable.

This package provides support to FUSE based clients.


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

%build

%configure %{?_without_rdma} %{?_without_epoll} %{?_with_fusermount}

# Remove rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%{__make} %{?_smp_mflags}


%install
%{__rm} -rf %{buildroot} 
%{__make} install DESTDIR=%{buildroot}
%{__mkdir_p} %{buildroot}%{_includedir}/glusterfs
%{__mkdir_p} %{buildroot}/var/log/glusterfs
%{__install} -p -m 0644 libglusterfs/src/*.h \
    %{buildroot}%{_includedir}/glusterfs/

# Remove unwanted files from all the shared libraries
find %{buildroot}%{_libdir} -name '*.la' | xargs rm -f
find %{buildroot}%{_libdir} -name '*.a' | xargs rm -f

%clean
%{__rm} -rf %{buildroot}

%post core
/sbin/ldconfig -n %{_libdir}
/sbin/chkconfig --add glusterd

%postun core
/sbin/ldconfig -n %{_libdir}

%preun core
if [ $1 -eq 0 ]; then 
    /sbin/chkconfig --del glusterd
fi

%files core
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING INSTALL NEWS README THANKS
%doc /usr/share/doc/glusterfs
%if 0%{?_with_fusermount:1}
%{_bindir}/fusermount-glusterfs 
%endif
%{_datadir}/glusterfs
%{_bindir}/glusterfs-volgen
%{_libdir}/glusterfs
%{_libdir}/*.so.*
%{_sbindir}/glusterfs*
%{_bindir}/glusterfs-defrag
%{_sbindir}/gluster
%{_sbindir}/glusterd
%{_mandir}/man8/*glusterfs.8*
%{_mandir}/man8/*gluster.8*
%{_mandir}/man8/*glusterd.8*
%{_mandir}/man8/*glusterfs-volgen.8*
%dir /var/log/glusterfs
%if 0%{!?_without_rdma:1}
%exclude %{_libdir}/glusterfs/%{version}/rpc-transport/rdma*
%endif
%exclude %{_libdir}/glusterfs/%{version}/xlator/mount/fuse*
%config %{_sysconfdir}/glusterfs
%{_sysconfdir}/init.d/glusterd
%{_includedir}/glusterfs
%exclude %{_includedir}/glusterfs/y.tab.h
%{_libdir}/*.so

%if 0%{!?_without_rdma:1}
%files rdma
%defattr(-,root,root)
%{_libdir}/glusterfs/%{version}/rpc-transport/rdma*
%endif

%files fuse
%defattr(-,root,root)
%{_libdir}/glusterfs/%{version}/xlator/mount/fuse*
/sbin/mount.glusterfs

%changelog
* Wed Jul 01 2009 Harshavardhana <harsha@gluster.com> - 2.1
- Removed mod_glusterfs.so and added new --without epoll build
  option. 

* Thu Apr 16 2009 Harshavardhana <harsha@gluster.com> - 2.0
- Galore of updates including new packages added common,
  client,server splitting the original package. rpmbuild 
  fully restructured to adhere to Fedora rpm standards. 
  Older changelog removed as there were warnings when 
  tried with 'rpmlint'.