Skip to content

Commit

Permalink
Add OBS spec file and install includes not in subdir.
Browse files Browse the repository at this point in the history
  • Loading branch information
mvwieringen committed Jun 28, 2017
1 parent e8e35bd commit 4e3f45c
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 11 deletions.
2 changes: 1 addition & 1 deletion droplet-3.0.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Description: Scality Droplet Library
Version: @VERSION@
Requires: libcrypto libxml-2.0 @JSON_PKG_NAME@
Libs: -L${libdir} -ldroplet
Cflags: -I${includedir}/droplet-3.0
Cflags:
79 changes: 79 additions & 0 deletions libdroplet.obs.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
%define name libdroplet
%define release 1
%define version 1

# do not optimize during compile for debugging
%define noopt 1


Summary: Scality Droplet library
License: BSD
Name: %{name}
Version: 3.0.git.1390558635
Release: 0%{release}
Source: %{name}-%{version}.tar.bz2
Group: Development/Tools
BuildRequires: libxml2-devel, libjson-devel
BuildRequires: automake, autoconf, libtool, pkg-config, check-devel, openssl-devel, bison, attr-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot

BuildRequires: -post-build-checks

%description
Library to help the transition to object based cloud storage by providing a
structured API to simplify application developers job and address key user
concerns.

%package devel
Group: Development/Libraries
Summary: Developer tools for the Scality Droplet library
Requires: libdroplet = %{version}-%{release}
Requires: libxml2-devel

%description devel
Header files needed to develop programs that link against the Droplet library.

%prep
%setup -q
#%patch1 -p1

aclocal -I m4
autoreconf -i -f

%build

%if %{noopt}
export CFLAGS="-g"
export CXXFLAGS="-g"
export GCJFLAGS="-g"
%endif

%configure

make %{?_smp_mflags}

%install
rm -rf %{buildroot}
make install DESTDIR=$RPM_BUILD_ROOT
/sbin/ldconfig -N -n %{buildroot}%{_libdir}

%clean
rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%{_libdir}/libdroplet.so.*

%files devel
%defattr(-,root,root,-)
%{_includedir}/droplet.h
%{_includedir}/dropletp.h
%{_includedir}/droplet
%{_libdir}/libdroplet.so
%{_libdir}/libdroplet.a
%{_libdir}/libdroplet.la
%{_libdir}/pkgconfig/droplet-3.0.pc
20 changes: 10 additions & 10 deletions libdroplet/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ libdroplet_la_SOURCES = \
src/backend/posix/reqbuilder.c \
src/backend/posix/replyparser.c

libdropletincludedir = $(includedir)/droplet-3.0/
libdropletincludedir = $(includedir)
libdropletinclude_HEADERS = \
include/droplet.h \
include/dropletp.h

libdropletdropletincludedir = $(includedir)/droplet-3.0/droplet
libdropletdropletincludedir = $(includedir)/droplet
libdropletdropletinclude_HEADERS = \
include/droplet/conn.h \
include/droplet/converters.h \
Expand All @@ -116,14 +116,14 @@ libdropletdropletinclude_HEADERS = \
include/droplet/queue.h \
include/droplet/json_adapter.h

libdropletdroplets3includedir = $(includedir)/droplet-3.0/droplet/s3
libdropletdroplets3includedir = $(includedir)/droplet/s3
libdropletdroplets3include_HEADERS = \
include/droplet/s3/backend.h \
include/droplet/s3/replyparser.h \
include/droplet/s3/reqbuilder.h \
include/droplet/s3/s3.h

libdropletdropletcdmiincludedir = $(includedir)/droplet-3.0/droplet/cdmi
libdropletdropletcdmiincludedir = $(includedir)/droplet/cdmi
libdropletdropletcdmiinclude_HEADERS = \
include/droplet/cdmi/backend.h \
include/droplet/cdmi/replyparser.h \
Expand All @@ -132,41 +132,41 @@ libdropletdropletcdmiinclude_HEADERS = \
include/droplet/cdmi/crcmodel.h \
include/droplet/cdmi/cdmi.h

libdropletdropletswiftincludedir = $(includedir)/droplet-3.0/droplet/swift
libdropletdropletswiftincludedir = $(includedir)/droplet/swift
libdropletdropletswiftinclude_HEADERS = \
include/droplet/swift/backend.h \
include/droplet/swift/replyparser.h \
include/droplet/swift/reqbuilder.h \
include/droplet/swift/swift.h

libdropletdropletsrwsincludedir = $(includedir)/droplet-3.0/droplet/srws
libdropletdropletsrwsincludedir = $(includedir)/droplet/srws
libdropletdropletsrwsinclude_HEADERS = \
include/droplet/srws/backend.h \
include/droplet/srws/replyparser.h \
include/droplet/srws/reqbuilder.h \
include/droplet/srws/srws.h \
include/droplet/srws/key.h

libdropletdropletsproxydincludedir = $(includedir)/droplet-3.0/droplet/sproxyd
libdropletdropletsproxydincludedir = $(includedir)/droplet/sproxyd
libdropletdropletsproxydinclude_HEADERS = \
include/droplet/sproxyd/backend.h \
include/droplet/sproxyd/replyparser.h \
include/droplet/sproxyd/reqbuilder.h \
include/droplet/sproxyd/sproxyd.h \
include/droplet/sproxyd/key.h

libdropletdropletposixincludedir = $(includedir)/droplet-3.0/droplet/posix
libdropletdropletposixincludedir = $(includedir)/droplet/posix
libdropletdropletposixinclude_HEADERS = \
include/droplet/posix/backend.h \
include/droplet/posix/reqbuilder.h \
include/droplet/posix/replyparser.h \
include/droplet/posix/posix.h

libdropletdropletuksincludedir = $(includedir)/droplet-3.0/droplet/uks
libdropletdropletuksincludedir = $(includedir)/droplet/uks
libdropletdropletuksinclude_HEADERS = \
include/droplet/uks/uks.h

libdropletdropletscalincludedir = $(includedir)/droplet-3.0/droplet/scal
libdropletdropletscalincludedir = $(includedir)/droplet/scal
libdropletdropletscalinclude_HEADERS = \
include/droplet/scal/gc.h

Expand Down

0 comments on commit 4e3f45c

Please sign in to comment.