summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2015-10-14 11:13:50 -0400
committerNiels de Vos <ndevos@redhat.com>2015-11-16 01:15:04 -0800
commit82e45b87e30ce4ec2ab62c39820951da7a82eddb (patch)
treef74f1763191e4229c762e337e6793785b3c6a0f3
parent8ad921e8d61e8b7b1dcd4aaba5d00aafbb55cf2a (diff)
build: install and package header files more conventionally
The current way we install and package header files for the -devel package is a hack. This patch uses more conventional autoconf, libtool, and rpmbuild idioms to package -devel headers and libraries. Change-Id: I63ffb3460f5c12b6b355493bd00824ac9e5354c5 BUG: 1271907 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/12360 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
-rw-r--r--glusterfs.spec.in16
-rw-r--r--libglusterfs/src/Makefile.am34
-rw-r--r--rpc/rpc-lib/src/Makefile.am4
-rw-r--r--rpc/rpc-transport/rdma/src/Makefile.am2
-rw-r--r--rpc/xdr/src/Makefile.am5
-rw-r--r--xlators/protocol/server/src/Makefile.am4
6 files changed, 31 insertions, 34 deletions
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index 6f7ee953e2d..90705b1ae3c 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -629,20 +629,8 @@ pushd xlators/features/glupy/src
python setup.py install --skip-build --verbose --root %{buildroot}
popd
# Install include directory
-mkdir -p %{buildroot}%{_includedir}/glusterfs
-install -p -m 0644 libglusterfs/src/*.h \
- %{buildroot}%{_includedir}/glusterfs/
install -p -m 0644 contrib/uuid/*.h \
%{buildroot}%{_includedir}/glusterfs/
-# Following needed by hekafs multi-tenant translator
-mkdir -p %{buildroot}%{_includedir}/glusterfs/rpc
-install -p -m 0644 rpc/rpc-lib/src/*.h \
- %{buildroot}%{_includedir}/glusterfs/rpc/
-install -p -m 0644 rpc/xdr/src/*.h \
- %{buildroot}%{_includedir}/glusterfs/rpc/
-mkdir -p %{buildroot}%{_includedir}/glusterfs/server
-install -p -m 0644 xlators/protocol/server/src/*.h \
- %{buildroot}%{_includedir}/glusterfs/server/
%if ( 0%{_for_fedora_koji_builds} )
install -D -p -m 0644 %{SOURCE1} \
%{buildroot}%{_sysconfdir}/sysconfig/glusterd
@@ -1027,8 +1015,8 @@ fi
%{_sysconfdir}/bash_completion.d/gluster
%files devel
-%{_includedir}/glusterfs
-%exclude %{_includedir}/glusterfs/y.tab.h
+%dir %{_includedir}/glusterfs
+%{_includedir}/glusterfs/*
%exclude %{_includedir}/glusterfs/api
%exclude %{_libdir}/libgfapi.so
%{_libdir}/*.so
diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am
index 904da328bea..1b3a5572c8b 100644
--- a/libglusterfs/src/Makefile.am
+++ b/libglusterfs/src/Makefile.am
@@ -36,23 +36,27 @@ nodist_libglusterfs_la_SOURCES = y.tab.c graph.lex.c defaults.c
BUILT_SOURCES = graph.lex.c defaults.c
-noinst_HEADERS = common-utils.h defaults.h default-args.h dict.h glusterfs.h \
- hashfn.h timespec.h \
- logging.h xlator.h stack.h timer.h list.h inode.h call-stub.h compat.h \
- fd.h revision.h compat-errno.h event.h mem-pool.h byte-order.h \
+libglusterfs_la_HEADERS = common-utils.h defaults.h default-args.h \
+ dict.h glusterfs.h hashfn.h timespec.h logging.h xlator.h \
+ stack.h timer.h list.h inode.h call-stub.h compat.h fd.h \
+ revision.h compat-errno.h event.h mem-pool.h byte-order.h \
gf-dirent.h locking.h syscall.h iobuf.h globals.h statedump.h \
- checksum.h daemon.h $(CONTRIBDIR)/rbtree/rb.h store.h\
- rbthash.h iatt.h latency.h mem-types.h syncop.h cluster-syncop.h \
- graph-utils.h trie.h refcount.h \
- run.h options.h lkowner.h fd-lk.h circ-buff.h event-history.h \
- gidcache.h client_t.h glusterfs-acl.h glfs-message-id.h \
- template-component-messages.h strfd.h syncop-utils.h parse-utils.h \
- libglusterfs-messages.h ctr-messages.h \
- $(CONTRIBDIR)/mount/mntent_compat.h lvm-defaults.h \
+ checksum.h daemon.h store.h rbthash.h iatt.h latency.h \
+ mem-types.h syncop.h cluster-syncop.h graph-utils.h trie.h \
+ refcount.h run.h options.h lkowner.h fd-lk.h circ-buff.h \
+ event-history.h gidcache.h client_t.h glusterfs-acl.h \
+ glfs-message-id.h template-component-messages.h strfd.h \
+ syncop-utils.h parse-utils.h libglusterfs-messages.h tw.h \
+ ctr-messages.h lvm-defaults.h quota-common-utils.h rot-buffs.h \
+ compat-uuid.h upcall-utils.h
+
+libglusterfs_ladir = $(includedir)/glusterfs
+
+noinst_HEADERS = unittest/unittest.h \
+ $(CONTRIBDIR)/rbtree/rb.h \
+ $(CONTRIBDIR)/mount/mntent_compat.h \
$(CONTRIBDIR)/libexecinfo/execinfo_compat.h \
- unittest/unittest.h quota-common-utils.h rot-buffs.h \
- $(CONTRIBDIR)/timer-wheel/timer-wheel.h compat-uuid.h \
- tw.h upcall-utils.h
+ $(CONTRIBDIR)/timer-wheel/timer-wheel.h
if !HAVE_LIBUUID
# FIXME: unbundle libuuid, see compat-uuid.h.
diff --git a/rpc/rpc-lib/src/Makefile.am b/rpc/rpc-lib/src/Makefile.am
index 36eb245bc06..8d0ef9a01b8 100644
--- a/rpc/rpc-lib/src/Makefile.am
+++ b/rpc/rpc-lib/src/Makefile.am
@@ -7,10 +7,12 @@ libgfrpc_la_SOURCES = auth-unix.c rpcsvc-auth.c rpcsvc.c auth-null.c \
libgfrpc_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
libgfrpc_la_LDFLAGS = -version-info $(LIBGFRPC_LT_VERSION) $(GF_LDFLAGS)
-noinst_HEADERS = rpcsvc.h rpc-transport.h xdr-common.h xdr-rpc.h xdr-rpcclnt.h \
+libgfrpc_la_HEADERS = rpcsvc.h rpc-transport.h xdr-common.h xdr-rpc.h xdr-rpcclnt.h \
rpc-clnt.h rpcsvc-common.h protocol-common.h rpc-drc.h rpc-clnt-ping.h \
rpc-lib-messages.h
+libgfrpc_ladir = $(includedir)/glusterfs/rpc
+
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
-I$(top_srcdir)/rpc/xdr/src \
-DRPC_TRANSPORTDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/rpc-transport\" \
diff --git a/rpc/rpc-transport/rdma/src/Makefile.am b/rpc/rpc-transport/rdma/src/Makefile.am
index 6526b6ce790..b5fb06f4f01 100644
--- a/rpc/rpc-transport/rdma/src/Makefile.am
+++ b/rpc/rpc-transport/rdma/src/Makefile.am
@@ -10,8 +10,6 @@ rdma_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
-libverbs -lrdmacm
noinst_HEADERS = rdma.h name.h rpc-trans-rdma-messages.h
- -I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/rpc-lib/src/ \
- -I$(top_srcdir)/xlators/protocol/lib/src/ $(GF_CFLAGS)
AM_CPPFLAGS = $(GF_CPPFLAGS) \
-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/rpc-lib/src/ \
diff --git a/rpc/xdr/src/Makefile.am b/rpc/xdr/src/Makefile.am
index eae7c9b673d..56e64ad3797 100644
--- a/rpc/xdr/src/Makefile.am
+++ b/rpc/xdr/src/Makefile.am
@@ -18,7 +18,10 @@ libgfxdr_la_LDFLAGS = -version-info $(LIBGFXDR_LT_VERSION)
libgfxdr_la_SOURCES = xdr-generic.c xdr-nfs3.c msg-nfs3.c
nodist_libgfxdr_la_SOURCES = $(XDRSOURCES)
-noinst_HEADERS = xdr-generic.h xdr-nfs3.h msg-nfs3.h glusterfs3.h
+libgfxdr_la_HEADERS = xdr-generic.h xdr-nfs3.h msg-nfs3.h glusterfs3.h \
+ $(XDRHEADERS)
+
+libgfxdr_ladir = $(includedir)/glusterfs/rpc
BUILT_SOURCES = $(XDRSOURCES) $(XDRHEADERS)
diff --git a/xlators/protocol/server/src/Makefile.am b/xlators/protocol/server/src/Makefile.am
index 50799790445..688d0202bcc 100644
--- a/xlators/protocol/server/src/Makefile.am
+++ b/xlators/protocol/server/src/Makefile.am
@@ -10,9 +10,11 @@ server_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
server_la_SOURCES = server.c server-resolve.c server-helpers.c \
server-rpc-fops.c server-handshake.c authenticate.c
-noinst_HEADERS = server.h server-helpers.h server-mem-types.h authenticate.h \
+server_la_HEADERS = server.h server-helpers.h server-mem-types.h authenticate.h \
server-messages.h
+server_ladir = $(includedir)/glusterfs/server
+
AM_CPPFLAGS = $(GF_CPPFLAGS) \
-I$(top_srcdir)/libglusterfs/src \
-DCONFDIR=\"$(sysconfdir)/glusterfs\" \