Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
10de7ef9ad
!10 Improve the project according to the requirements of compliance improvement
From: @tanyulong2021 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
2022-06-08 09:08:13 +00:00
tanyulong2021
a960a17ad5 Improve the project according to the requirements of compliance improvement 2022-05-18 18:39:02 +08:00
openeuler-ci-bot
e9ae36b7e7
!9 Submit yaml file into this repository
From: @duyiwei7w 
Reviewed-by: @pei-jiankang 
Signed-off-by: @pei-jiankang
2022-05-09 03:36:13 +00:00
duyiwei
82a2566505 add qjson.yaml. 2022-05-07 15:46:50 +08:00
openeuler-ci-bot
30d209b26a !6 remove Annotation in spec files
Merge pull request !6 from tanyulong2021/master
2021-12-23 06:40:27 +00:00
tanyulong2021
dfa0b09535 remove Annotation in spec files 2021-12-20 10:08:10 +08:00
openeuler-ci-bot
3a1873a4ae !5 remove %{?dist}
Merge pull request !5 from 华亚东/master
2021-12-13 09:44:30 +00:00
huayadong
0e725d92b5 remove %{?dist} 2021-12-13 10:48:46 +08:00
openeuler-ci-bot
f93f8aef1f !1 initial release
Merge pull request !1 from yangzhao_kl/initial_release
2020-07-23 14:47:12 +08:00
yangzhao_kl
2a3e83b472 initial release 2020-07-23 11:25:28 +08:00
4 changed files with 168 additions and 0 deletions

12
qjson-0.9.0-static.patch Normal file
View 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

Binary file not shown.

152
qjson.spec Normal file
View File

@ -0,0 +1,152 @@
%if 0%{?fedora} || 0%{?rhel} > 6
%global qt5 1
%endif
Name: qjson
Version: 0.9.0
Release: 10
Summary: A qt-based library that maps JSON data to QVariant objects
License: LGPLv2+
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
## 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 May 19 2022 tanyulong<tanyulong@kylinos.cn> - 0.9.0-10
- Improve the project according to the requirements of compliance improvement
* Mon Dec 20 2021 tanyulong <tanyulong@kylinos.cn> - 0.9.0-9
- remove Annotation in spec files
* Mon Dec 13 2021 huayadong <huayadong@kylinos.cn> - 0.9.0-8
- remove %{?dist}
* Thu Jul 23 2020 Zhao Yang <yangzhao1@kylinos.cn> - 0.9.0-7
- Initial release for OpenEuler

4
qjson.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: flavio/qjson
tag_prefix: "v"
separator: "."