forked from pool/jsoncpp
- Create and install cmake files
- Define libname to make maintenance easier - Update to 1.5.4 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/jsoncpp?expand=0&rev=16
This commit is contained in:
19
jsoncpp.spec
19
jsoncpp.spec
@@ -16,8 +16,9 @@
|
||||
#
|
||||
|
||||
|
||||
%define libname lib%{name}1
|
||||
Name: jsoncpp
|
||||
Version: 1.5.2
|
||||
Version: 1.5.4
|
||||
Release: 0
|
||||
Summary: C++ library that allows manipulating with JSON
|
||||
License: MIT
|
||||
@@ -45,7 +46,7 @@ format to store user input files.
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Group: Development/Languages/C and C++
|
||||
Requires: lib%{name}1 = %{version}
|
||||
Requires: %{libname} = %{version}
|
||||
|
||||
%description devel
|
||||
JSON is a lightweight data-interchange format. It can represent numbers,
|
||||
@@ -70,11 +71,11 @@ serialization and deserialization to and from strings. It can also preserve
|
||||
existing comment in unserialization/serialization steps, making it a convenient
|
||||
format to store user input files.
|
||||
|
||||
%package -n lib%{name}1
|
||||
%package -n %{libname}
|
||||
Summary: Shared library for %{name}
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n lib%{name}1
|
||||
%description -n %{libname}
|
||||
JSON is a lightweight data-interchange format. It can represent numbers,
|
||||
strings, ordered sequences of values, and collections of name/value pairs.
|
||||
|
||||
@@ -91,7 +92,8 @@ python doxybuild.py --doxygen=%{_bindir}/doxygen --open --with-dot
|
||||
|
||||
# path needs to be exported otherwise unit tests will fail
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{_builddir}/%{name}-%{version}/build/src/lib_json
|
||||
%cmake -DJSONCPP_LIB_BUILD_SHARED=ON
|
||||
%cmake \
|
||||
-DJSONCPP_WITH_CMAKE_PACKAGE=ON
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
@@ -100,11 +102,11 @@ make %{?_smp_mflags}
|
||||
%fdupes -s dist/doxygen
|
||||
rm -rf %{buildroot}%{_libdir}/lib%{name}.a
|
||||
|
||||
%post -n lib%{name}1 -p /sbin/ldconfig
|
||||
%post -n %{libname} -p /sbin/ldconfig
|
||||
|
||||
%postun -n lib%{name}1 -p /sbin/ldconfig
|
||||
%postun -n %{libname} -p /sbin/ldconfig
|
||||
|
||||
%files -n lib%{name}1
|
||||
%files -n %{libname}
|
||||
%defattr(-,root,root)
|
||||
%doc LICENSE
|
||||
%{_libdir}/lib%{name}.so.*
|
||||
@@ -113,6 +115,7 @@ rm -rf %{buildroot}%{_libdir}/lib%{name}.a
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS LICENSE NEWS.txt README.md
|
||||
%{_libdir}/pkgconfig/%{name}.pc
|
||||
%{_libdir}/cmake/%{name}
|
||||
%{_libdir}/lib%{name}.so
|
||||
%{_includedir}/json/
|
||||
|
||||
|
Reference in New Issue
Block a user