glusterfs/glusterfs.spec.in
Pavan Sondur 3af126d594 rpm spec: Use only 3 rpms for GlusterFS
Generates the following 3 rpms:
1. glusterfs-fuse
2. glusterfs-main
3. glusterfs-ibverbs

Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 1275 (Fix rpm glusterfs spec file for 3.1)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1275
2010-08-17 02:23:42 -07:00

180 lines
5.8 KiB
RPMSpec

# 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 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: GPLv3+
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/2.0/@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 main
Summary: GlusterFS common files for both the client and the server
Group: System Environment/Libraries
Obsoletes: glusterfs-libs <= 2.0.0
Provides: glusterfs-libs = %{version}-%{release}
%description main
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.
%package ibverbs
Summary: GlusterFS ibverbs
Group: Applications/File
Requires: libibverbs-devel
%description ibverbs
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.
%package fuse
Summary: GlusterFS Fuse
Group: Applications/File
%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_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 main
/sbin/ldconfig -n %{_libdir}
/sbin/chkconfig --add glusterfsd
%postun main
/sbin/ldconfig -n %{_libdir}
%preun main
if [ $1 -eq 0 ]; then
/sbin/chkconfig --del glusterfsd
fi
%files main
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING INSTALL NEWS README
%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*
%dir /var/log/glusterfs
%exclude %{_libdir}/glusterfs/%{version}/transport/ib-verbs*
%exclude %{_libdir}/glusterfs/%{version}/xlator/mount/fuse*
%config %{_sysconfdir}/glusterfs
%{_sysconfdir}/init.d/glusterfsd
%{_includedir}/glusterfs
%exclude %{_includedir}/glusterfs/y.tab.h
%{_libdir}/*.so
/sbin/mount.glusterfs
%files ibverbs
%defattr(-,root,root)
%{_libdir}/glusterfs/%{version}/transport/ib-verbs*
%files fuse
%defattr(-,root,root)
%{_libdir}/glusterfs/%{version}/xlator/mount/fuse*
%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'.