provide pkg-config file
move headers to %{_includedir}/jsoncpp [release 0.6.0_rc2-2mamba;Wed Sep 17 2014]
This commit is contained in:
parent
bb00612351
commit
9ca4f035ea
11
jsoncpp-0.6.0_rc2-buildfix-fPIC.patch
Normal file
11
jsoncpp-0.6.0_rc2-buildfix-fPIC.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- jsoncpp-src-0.6.0-rc2/SConstruct.orig 2014-09-17 14:13:14.742927982 +0200
|
||||||
|
+++ jsoncpp-src-0.6.0-rc2/SConstruct 2014-09-17 14:11:04.782932297 +0200
|
||||||
|
@@ -119,7 +119,7 @@
|
||||||
|
env.Append( CPPDEFINES=[ "WIN32", "NDEBUG", "_MT" ] )
|
||||||
|
elif platform.startswith('linux-gcc'):
|
||||||
|
env.Tool( 'default' )
|
||||||
|
- env.Append( LIBS = ['pthread'], CCFLAGS = "-Wall" )
|
||||||
|
+ env.Append( LIBS = ['pthread'], CCFLAGS = "-Wall -fPIC" )
|
||||||
|
env['SHARED_LIB_ENABLED'] = True
|
||||||
|
else:
|
||||||
|
print "UNSUPPORTED PLATFORM."
|
38
jsoncpp.spec
38
jsoncpp.spec
@ -1,7 +1,7 @@
|
|||||||
%define pkgver %(echo %version | tr _ -)
|
%define pkgver %(echo %version | tr _ -)
|
||||||
Name: jsoncpp
|
Name: jsoncpp
|
||||||
Version: 0.6.0_rc2
|
Version: 0.6.0_rc2
|
||||||
Release: 1mamba
|
Release: 2mamba
|
||||||
Summary: An implementation of a JSON reader and writer in C++
|
Summary: An implementation of a JSON reader and writer in C++
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Vendor: openmamba
|
Vendor: openmamba
|
||||||
@ -10,6 +10,7 @@ Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|||||||
URL: http://jsoncpp.sourceforge.net/
|
URL: http://jsoncpp.sourceforge.net/
|
||||||
Source: http://downloads.sourceforge.net/project/jsoncpp/jsoncpp/%{pkgver}/jsoncpp-src-%{pkgver}.tar.gz
|
Source: http://downloads.sourceforge.net/project/jsoncpp/jsoncpp/%{pkgver}/jsoncpp-src-%{pkgver}.tar.gz
|
||||||
Patch0: jsoncpp-0.5.0-soname.patch
|
Patch0: jsoncpp-0.5.0-soname.patch
|
||||||
|
Patch1: jsoncpp-0.6.0_rc2-buildfix-fPIC.patch
|
||||||
License: MIT
|
License: MIT
|
||||||
## AUTOBUILDREQ-BEGIN
|
## AUTOBUILDREQ-BEGIN
|
||||||
BuildRequires: glibc-devel
|
BuildRequires: glibc-devel
|
||||||
@ -42,19 +43,40 @@ This package contains libraries and header files for developing applications tha
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-src-%{pkgver}
|
%setup -q -n %{name}-src-%{pkgver}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
export CFLAGS="%{optflags}"
|
||||||
|
export CXXFLAGS="%{optflags}"
|
||||||
scons platform=linux-gcc
|
scons platform=linux-gcc
|
||||||
|
|
||||||
%install
|
%install
|
||||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
install -d -m0755 %{buildroot}{%{_includedir},%{_libdir}}
|
install -d -m0755 %{buildroot}{%{_includedir}/jsoncpp,%{_libdir}}
|
||||||
cp -a include/json %{buildroot}%{_includedir}/
|
cp -a include/json %{buildroot}%{_includedir}/jsoncpp
|
||||||
|
|
||||||
cp libs/linux-gcc-*/libjson_linux-gcc-*_libmt.so %{buildroot}%{_libdir}/libjsoncpp.so.0
|
cp libs/linux-gcc-*/libjson_linux-gcc-*_libmt.so %{buildroot}%{_libdir}/libjsoncpp.so.0
|
||||||
ln -s libjsoncpp.so.0 %{buildroot}%{_libdir}/libjsoncpp.so
|
ln -s libjsoncpp.so.0 %{buildroot}%{_libdir}/libjsoncpp.so
|
||||||
|
|
||||||
|
install -d -m0755 %{buildroot}%{_libdir}/pkgconfig
|
||||||
|
cat > %{buildroot}%{_libdir}/pkgconfig/jsoncpp.pc << _EOF
|
||||||
|
prefix=%{_prefix}
|
||||||
|
libdir=%{_libdir}
|
||||||
|
includedir=%{_includedir}/jsoncpp
|
||||||
|
|
||||||
|
version = %{version}
|
||||||
|
|
||||||
|
name = jsoncpp
|
||||||
|
pkgname = libjsoncpp
|
||||||
|
|
||||||
|
Name: \${name}
|
||||||
|
Version: 0.6.0_rc2
|
||||||
|
Description: Jsoncpp library version %{version}
|
||||||
|
Cflags: -I\${includedir}
|
||||||
|
Libs: -L\${libdir} -ljsoncpp
|
||||||
|
_EOF
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||||
|
|
||||||
@ -68,12 +90,18 @@ ln -s libjsoncpp.so.0 %{buildroot}%{_libdir}/libjsoncpp.so
|
|||||||
|
|
||||||
%files -n lib%{name}-devel
|
%files -n lib%{name}-devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%dir %{_includedir}/json
|
%dir %{_includedir}/jsoncpp
|
||||||
%{_includedir}/json/*.h
|
%dir %{_includedir}/jsoncpp/json
|
||||||
|
%{_includedir}/jsoncpp/json/*.h
|
||||||
%{_libdir}/libjsoncpp.so
|
%{_libdir}/libjsoncpp.so
|
||||||
|
%{_libdir}/pkgconfig/jsoncpp.pc
|
||||||
%doc README.txt
|
%doc README.txt
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Sep 17 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.6.0_rc2-2mamba
|
||||||
|
- provide pkg-config file
|
||||||
|
- move headers to %{_includedir}/jsoncpp
|
||||||
|
|
||||||
* Mon Jul 07 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.6.0_rc2-1mamba
|
* Mon Jul 07 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.6.0_rc2-1mamba
|
||||||
- update to 0.6.0_rc2
|
- update to 0.6.0_rc2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user