initial release
This commit is contained in:
parent
9051e6b9cd
commit
2a3e83b472
12
qjson-0.9.0-static.patch
Normal file
12
qjson-0.9.0-static.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up qjson-0.9.0/tests/qobjecthelper/CMakeLists.txt.static qjson-0.9.0/tests/qobjecthelper/CMakeLists.txt
|
||||||
|
--- qjson-0.9.0/tests/qobjecthelper/CMakeLists.txt.static 2016-11-29 09:44:51.000000000 -0600
|
||||||
|
+++ qjson-0.9.0/tests/qobjecthelper/CMakeLists.txt 2016-12-21 14:14:21.794182731 -0600
|
||||||
|
@@ -20,7 +20,7 @@ IF (NOT Qt5Core_FOUND)
|
||||||
|
QT4_WRAP_CPP(qjson_test_support_MOC_SRCS person.h)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
-ADD_LIBRARY (qjson_test_support STATIC ${qjson_test_support_SRCS}
|
||||||
|
+ADD_LIBRARY (qjson_test_support ${qjson_test_support_SRCS}
|
||||||
|
${qjson_test_support_MOC_SRCS})
|
||||||
|
|
||||||
|
SET( UNIT_TESTS
|
||||||
BIN
qjson-0.9.0.tar.gz
Normal file
BIN
qjson-0.9.0.tar.gz
Normal file
Binary file not shown.
150
qjson.spec
Normal file
150
qjson.spec
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
|
||||||
|
#global snap0 20150318
|
||||||
|
#global commit0 d0f62e65f0b79fb7724d8d551dc9ff11d085127b
|
||||||
|
#global gittag0 GIT-TAG
|
||||||
|
#global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
|
||||||
|
|
||||||
|
# define to support qjson-qt5(-devel)
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} > 6
|
||||||
|
%global qt5 1
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Name: qjson
|
||||||
|
Version: 0.9.0
|
||||||
|
Release: 7%{?dist}
|
||||||
|
Summary: A qt-based library that maps JSON data to QVariant objects
|
||||||
|
|
||||||
|
License: GPLv2+
|
||||||
|
URL: https://github.com/flavio/qjson
|
||||||
|
%if 0%{?commit0:1}
|
||||||
|
Source0: https://github.com/flavio/qjson/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz
|
||||||
|
%else
|
||||||
|
Source0: https://github.com/flavio/qjson/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
%endif
|
||||||
|
|
||||||
|
## upstream patches
|
||||||
|
|
||||||
|
## upstreamable patches
|
||||||
|
Patch100: qjson-0.9.0-static.patch
|
||||||
|
|
||||||
|
BuildRequires: cmake >= 2.8.8
|
||||||
|
BuildRequires: doxygen
|
||||||
|
BuildRequires: pkgconfig(QtCore)
|
||||||
|
%if 0%{?qt5}
|
||||||
|
BuildRequires: pkgconfig(Qt5Core)
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# %%check
|
||||||
|
BuildRequires: xorg-x11-server-Xvfb
|
||||||
|
|
||||||
|
%description
|
||||||
|
JSON is a lightweight data-interchange format. It can represents integer, real
|
||||||
|
number, string, an ordered sequence of value, and a collection of
|
||||||
|
name/value pairs.QJson is a qt-based library that maps JSON data to
|
||||||
|
QVariant objects.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for %{name}
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
%description devel
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%package qt5
|
||||||
|
Summary: A Qt5-based barcode abstraction library
|
||||||
|
%description qt5
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%package qt5-devel
|
||||||
|
Summary: Development files for %{name}-qt5
|
||||||
|
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
|
||||||
|
%description qt5-devel
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q %{?commit0:-n %{name}-%{commit0}}
|
||||||
|
|
||||||
|
%patch100 -p1 -b .static
|
||||||
|
|
||||||
|
|
||||||
|
%build
|
||||||
|
mkdir %{_target_platform}
|
||||||
|
pushd %{_target_platform}
|
||||||
|
%{cmake} .. \
|
||||||
|
-DQJSON_BUILD_TESTS:BOOL=ON \
|
||||||
|
-DQT4_BUILD:BOOL=ON
|
||||||
|
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
popd
|
||||||
|
|
||||||
|
%if 0%{?qt5}
|
||||||
|
mkdir %{_target_platform}-qt5
|
||||||
|
pushd %{_target_platform}-qt5
|
||||||
|
%{cmake} .. \
|
||||||
|
-DQJSON_BUILD_TESTS:BOOL=ON \
|
||||||
|
-DQT4_BUILD:BOOL=OFF
|
||||||
|
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# build docs
|
||||||
|
pushd doc
|
||||||
|
doxygen
|
||||||
|
popd
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
%if 0%{?qt5}
|
||||||
|
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}-qt5
|
||||||
|
%endif
|
||||||
|
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
|
||||||
|
|
||||||
|
|
||||||
|
%check
|
||||||
|
export PKG_CONFIG_PATH=%{buildroot}%{_datadir}/pkgconfig:%{buildroot}%{_libdir}/pkgconfig
|
||||||
|
test "$(pkg-config --modversion QJson)" = "%{version}"
|
||||||
|
export CTEST_OUTPUT_ON_FAILURE=1
|
||||||
|
xvfb-run -a make test -C %{_target_platform} ||:
|
||||||
|
%if 0%{?qt5}
|
||||||
|
test "$(pkg-config --modversion QJson-qt5)" = "%{version}"
|
||||||
|
xvfb-run -a make test -C %{_target_platform}-qt5 ||:
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license COPYING.lib
|
||||||
|
%doc README.md README.license
|
||||||
|
%{_libdir}/libqjson.so.%{version}
|
||||||
|
%{_libdir}/libqjson.so.0*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%doc doc/html
|
||||||
|
%{_includedir}/qjson/
|
||||||
|
%{_libdir}/libqjson.so
|
||||||
|
%{_libdir}/pkgconfig/QJson.pc
|
||||||
|
%dir %{_libdir}/cmake
|
||||||
|
%{_libdir}/cmake/qjson/
|
||||||
|
|
||||||
|
%if 0%{?qt5}
|
||||||
|
%files qt5
|
||||||
|
%license COPYING.lib
|
||||||
|
%doc README.md README.license
|
||||||
|
%{_libdir}/libqjson-qt5.so.%{version}
|
||||||
|
%{_libdir}/libqjson-qt5.so.0*
|
||||||
|
|
||||||
|
%files qt5-devel
|
||||||
|
%doc doc/html
|
||||||
|
%{_includedir}/qjson-qt5/
|
||||||
|
%{_libdir}/libqjson-qt5.so
|
||||||
|
%{_libdir}/pkgconfig/QJson-qt5.pc
|
||||||
|
%dir %{_libdir}/cmake
|
||||||
|
%{_libdir}/cmake/qjson-qt5/
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Jul 23 2020 Zhao Yang <yangzhao1@kylinos.cn> - 0.9.0-7
|
||||||
|
- Initial release for OpenEuler
|
||||||
Loading…
x
Reference in New Issue
Block a user