summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac22
-rw-r--r--gluster-block.spec.in34
-rw-r--r--rpc/Makefile.am4
4 files changed, 30 insertions, 32 deletions
diff --git a/Makefile.am b/Makefile.am
index a07333b..97cc3be 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,7 +6,7 @@ DISTCLEANFILES = Makefile.in gluster-block.spec autom4te.cache
CLEANFILES = *~ gluster-block.spec
-EXTRA_DIST = autogen.sh README.md
+EXTRA_DIST = autogen.sh README.md COPYING-GPLV2 COPYING-LGPLV3
rpms: prep
QA_RPATHS=17 rpmbuild --define '_topdir $(abs_top_builddir)/build/rpmbuild' \
diff --git a/configure.ac b/configure.ac
index 90ffafb..231e6a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,7 +11,7 @@ AC_PREREQ([2.69])
AC_INIT([gluster-block],
m4_esyscmd(echo -n `git describe --always --tags`),
[pkalever@redhat.com],,
- [https://github.com/pkalever/gluster-block.git])
+ [https://github.com/gluster/gluster-block.git])
AC_SUBST([PACKAGE_RELEASE], 1)
@@ -51,9 +51,12 @@ AC_CHECK_HEADERS([stdio.h stdlib.h string.h stdbool.h stddef.h \
rpc/pmap_clnt.h ])
# Checks for libraries.
-AC_CHECK_LIB([gfapi], [glfs_init], [GFAPI="-lgfapi"],
- AC_MSG_ERROR([gfapi library is required to build gluster-block]))
-AC_SUBST(GFAPI)
+# glusterfs-api versions have a prefix of "7."
+PKG_CHECK_MODULES([GFAPI], [glusterfs-api >= 7.3.6],,
+ [AC_MSG_ERROR([gfapi library >= 3.6 is required to build gluster-block])])
+AC_SUBST(GFAPI_CFLAGS)
+AC_SUBST(GFAPI_LIBS)
+
AC_CHECK_LIB([uuid], [uuid_generate], [UUID="-luuid"],
AC_MSG_ERROR([uuid library is required to build gluster-block]))
AC_SUBST(UUID)
@@ -61,17 +64,6 @@ AC_CHECK_LIB([pthread], [pthread_mutex_init],[PTHREAD="-lpthread"],
AC_MSG_ERROR([Posix threads library is required to build gluster-block]))
AC_SUBST(PTHREAD)
-AC_CHECK_PROG(TCMURUNNER, tcmu-runner, yes, no)
-if test "x$TCMURUNNER" = "xno"; then
- AC_MSG_ERROR([tcmu-runner not found; try again after installing])
-fi
-
-# FIXME: version check, need atleast 'targetcli-2.1.fb43'
-AC_CHECK_PROG(TARGETCLI, targetcli, yes, no)
-if test "x$TARGETCLI" = "xno"; then
- AC_MSG_ERROR([targetcli not found; try again after installing])
-fi
-
# Dirty hacky stuff to make STATEDIR work
if test "x$prefix" = xNONE; then
test $localstatedir = '${prefix}/var' && localstatedir=$ac_default_prefix/var
diff --git a/gluster-block.spec.in b/gluster-block.spec.in
index 352cce8..dec3f8d 100644
--- a/gluster-block.spec.in
+++ b/gluster-block.spec.in
@@ -2,30 +2,25 @@
Summary: Gluster block storage utility
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
-Vendor: Gluster Community
Release: @PACKAGE_RELEASE@
License: GPLv2 or LGPLv3+
-Group: System Environment/Base
-BuildRequires: tcmu-runner >= 1.0.4
-BuildRequires: targetcli >= 2.1.fb43
+URL: https://github.com/gluster/gluster-block
+Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
+
BuildRequires: glusterfs-api-devel >= 3.6.0
BuildRequires: help2man >= 1.36
-Requires: tcmu-runner >= 1.0.4
-Requires: targetcli >= 2.1.fb43
-Requires: glusterfs-api >= 3.6.0
%if ( 0%{?_with_systemd:1} )
-BuildRequires: systemd
+BuildRequires: systemd-units
%endif
-URL: http://www.gluster.org/docs/index.php/GlusterFS
-Source0: @PACKAGE_NAME@-@PACKAGE_VERSION@.tar.gz
+
+Requires: tcmu-runner >= 1.0.4
+Requires: targetcli >= 2.1.fb43
%description
-gluster-block is a CLI utility, which aims at making gluster backed
-block storage creation and maintenance as simple as possible.
+gluster-block is a CLI utility, which aims at making gluster backed block
+storage creation and maintenance as simple as possible.
%prep
-rm -rf %{_topdir}/BUILD/*
-
%setup
%build
@@ -39,6 +34,17 @@ make DESTDIR=${RPM_BUILD_ROOT} install
rm -rf ${RPM_BUILD_ROOT}
%files
+%license COPYING-GPLV2 COPYING-LGPLV3
+%doc README.md
%{_sbindir}/gluster-block
%{_sbindir}/gluster-blockd
+%if ( 0%{?_with_systemd:1} )
%{_unitdir}/gluster-blockd.service
+%endif
+
+%changelog
+* Thu Feb 23 2017 Niels de Vos <ndevos@redhat.com>
+- cleanup and add licenses and README.md to the package
+
+* Sun Feb 5 2017 Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
+- Initial spec file
diff --git a/rpc/Makefile.am b/rpc/Makefile.am
index 9f85e23..66717bb 100644
--- a/rpc/Makefile.am
+++ b/rpc/Makefile.am
@@ -5,10 +5,10 @@ libgbxdr_la_SOURCES = block_clnt.c block_xdr.c block_svc.c \
noinst_HEADERS = block.h glfs-operations.h
-libgbxdr_la_CFLAGS = -DDATADIR=\"$(localstatedir)\" \
+libgbxdr_la_CFLAGS = $(GFAPI_CFLAGS) -DDATADIR=\"$(localstatedir)\" \
-I$(top_srcdir)/utils/
-libgbxdr_la_LIBADD = $(GFAPI) $(UUID)
+libgbxdr_la_LIBADD = $(GFAPI_LIBS) $(UUID)
libgbxdr_ladir = $(includedir)/gluster-block/rpc