Silvan Calarco
9ca4f035ea
move headers to %{_includedir}/jsoncpp [release 0.6.0_rc2-2mamba;Wed Sep 17 2014]
110 lines
3.2 KiB
RPMSpec
110 lines
3.2 KiB
RPMSpec
%define pkgver %(echo %version | tr _ -)
|
|
Name: jsoncpp
|
|
Version: 0.6.0_rc2
|
|
Release: 2mamba
|
|
Summary: An implementation of a JSON reader and writer in C++
|
|
Group: System/Libraries
|
|
Vendor: openmamba
|
|
Distribution: openmamba
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
URL: http://jsoncpp.sourceforge.net/
|
|
Source: http://downloads.sourceforge.net/project/jsoncpp/jsoncpp/%{pkgver}/jsoncpp-src-%{pkgver}.tar.gz
|
|
Patch0: jsoncpp-0.5.0-soname.patch
|
|
Patch1: jsoncpp-0.6.0_rc2-buildfix-fPIC.patch
|
|
License: MIT
|
|
## AUTOBUILDREQ-BEGIN
|
|
BuildRequires: glibc-devel
|
|
BuildRequires: libgcc
|
|
BuildRequires: libstdc++6-devel
|
|
## AUTOBUILDREQ-END
|
|
BuildRequires: scons
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
%description
|
|
jsoncpp is an implementation of a JSON (http://json.org) reader and writer in C++. JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.
|
|
|
|
%package -n lib%{name}
|
|
Summary: An implementation of a JSON reader and writer in C++
|
|
Group: System/Libraries
|
|
|
|
%description -n lib%{name}
|
|
This package contains shared libraries for %{name}.
|
|
|
|
%package -n lib%{name}-devel
|
|
Group: Development/Libraries
|
|
Summary: Development files for %{name}
|
|
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
%description -n lib%{name}-devel
|
|
This package contains libraries and header files for developing applications that use %{name}.
|
|
|
|
%debug_package
|
|
|
|
%prep
|
|
%setup -q -n %{name}-src-%{pkgver}
|
|
%patch0 -p1
|
|
%patch1 -p1
|
|
|
|
%build
|
|
export CFLAGS="%{optflags}"
|
|
export CXXFLAGS="%{optflags}"
|
|
scons platform=linux-gcc
|
|
|
|
%install
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
install -d -m0755 %{buildroot}{%{_includedir}/jsoncpp,%{_libdir}}
|
|
cp -a include/json %{buildroot}%{_includedir}/jsoncpp
|
|
|
|
cp libs/linux-gcc-*/libjson_linux-gcc-*_libmt.so %{buildroot}%{_libdir}/libjsoncpp.so.0
|
|
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
|
|
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
|
|
|
%post -n lib%{name} -p /sbin/ldconfig
|
|
%postun -n lib%{name} -p /sbin/ldconfig
|
|
|
|
%files -n lib%{name}
|
|
%defattr(-,root,root)
|
|
%{_libdir}/libjsoncpp.so.*
|
|
%doc AUTHORS LICENSE
|
|
|
|
%files -n lib%{name}-devel
|
|
%defattr(-,root,root)
|
|
%dir %{_includedir}/jsoncpp
|
|
%dir %{_includedir}/jsoncpp/json
|
|
%{_includedir}/jsoncpp/json/*.h
|
|
%{_libdir}/libjsoncpp.so
|
|
%{_libdir}/pkgconfig/jsoncpp.pc
|
|
%doc README.txt
|
|
|
|
%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
|
|
- update to 0.6.0_rc2
|
|
|
|
* Fri Jun 20 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.5.0-1mamba
|
|
- package created using the webbuild interface
|