From 84785e010c2626860bd71c7dbe8ac116debfe54f Mon Sep 17 00:00:00 2001 From: TizenOpenSource Date: Thu, 7 Dec 2023 17:57:37 +0900 Subject: [PATCH] Bump to 0.17 Signed-off-by: TizenOpenSource --- .gitignore | 95 ----------------------------------------------- packaging/baselibs.conf | 1 + packaging/json-c.manifest | 5 +++ packaging/json-c.spec | 94 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 100 insertions(+), 95 deletions(-) delete mode 100644 .gitignore create mode 100644 packaging/baselibs.conf create mode 100644 packaging/json-c.manifest create mode 100644 packaging/json-c.spec diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 4b7da9f..0000000 --- a/.gitignore +++ /dev/null @@ -1,95 +0,0 @@ -# Temp files -*~ -*.swp -*.bak -*.backup -\#* -.\#* -*\# -*.sav -*.save -*.autosav -*.autosave - -# Tests -/tests/Makefile -/tests/test1 -/tests/test1Formatted -/tests/test2 -/tests/test2Formatted -/tests/test4 -/tests/testReplaceExisting -/tests/testSubDir -/tests/test_cast -/tests/test_charcase -/tests/test_compare -/tests/test_deep_copy -/tests/test_double_serializer -/tests/test_float -/tests/test_int_add -/tests/test_int_get -/tests/test_json_pointer -/tests/test_locale -/tests/test_null -/tests/test_parse -/tests/test_parse_int64 -/tests/test_printbuf -/tests/test_set_serializer -/tests/test_set_value -/tests/test_util_file -/tests/test_visit -/tests/*.vg.out -/tests/*.log -/tests/*.trs - -# Generated folders -/build -/Debug -/Release -/*/Debug -/*/Release - -# Archives -*.zip -*.tar.* -*.tgz -*.gz -*.bz2 -*.xz -*.lz -*.lzma -*.7z -*.dll -*.deb -*.rpm -*.apk -*.exe -*.msi -*.dmg -*.ipa - -# It's not good practice to build directly in the source tree -# but ignore cmake auto-generated files anyway: -/json_config.h -/json.h -/config.h -/json-c.pc -/Makefile -/CMakeCache.txt -/CMakeFiles -/CMakeDoxyfile.in -/*.cmake -/DartConfiguration.tcl -/tests/CMakeFiles/ -/tests/*.cmake -/Testing/ - -# ...and build artifacts. -/doc/html -/libjson-c.a -/libjson-c.so -/libjson-c.so.* - -# Benchmarking input and output -/bench/data -/bench/work diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf new file mode 100644 index 0000000..5d7a18d --- /dev/null +++ b/packaging/baselibs.conf @@ -0,0 +1 @@ +libjson diff --git a/packaging/json-c.manifest b/packaging/json-c.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/json-c.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/json-c.spec b/packaging/json-c.spec new file mode 100644 index 0000000..b0132fa --- /dev/null +++ b/packaging/json-c.spec @@ -0,0 +1,94 @@ +%define libname libjson +%define libsoname %{libname} +Name: json-c +Version: 0.17 +Release: 0 +Summary: JSON implementation in C +License: MIT +Group: Development/Libraries/C and C++ +Url: https://github.com/json-c/json-c/wiki +#Git-Clone git://github.com/json-c/json-c +Source0: https://s3.amazonaws.com/json-c_releases/releases/%{name}-%{version}.tar.gz +Source1: baselibs.conf +Source1001: json-c.manifest +BuildRequires: libtool +BuildRequires: cmake +BuildRequires: pkgconfig + +%description +JSON-C implements a reference counting object model that allows you to +easily construct JSON objects in C, output them as JSON formatted +strings and parse JSON formatted strings back into the C +representation of JSON objects. + +%package -n %{libsoname} +Summary: JSON-C shared library +Group: System/Libraries + +%description -n %{libsoname} +JSON-C implements a reference counting object model that allows you to +easily construct JSON objects in C, output them as JSON formatted +strings and parse JSON formatted strings back into the C +representation of JSON objects. + +This package includes the JSON library. + +%package -n %{libname}-devel +Summary: Development headers and libraries for json-c +Group: Development/Libraries/C and C++ +Requires: %{libsoname} = %{version} + +%description -n %{libname}-devel +JSON-C implements a reference counting object model that allows you to +easily construct JSON objects in C, output them as JSON formatted +strings and parse JSON formatted strings back into the C +representation of JSON objects. + +This package includes header files and scripts needed for developers +using the json-c library + +%prep +%setup -q +cp %{SOURCE1001} . + +%build +%{?asan: export VALGRIND=1} +%{?hwasan: export VALGRIND=1} +%{cmake} . +%{__make} %{?_smp_mflags} + +%check +# %{__make} test + +%install +DESTDIR=%{buildroot} %{__make} install + +find %{buildroot} -type f -name "*.la" -delete -print +# create a compatibilty pkg-config file for software needing it +(cd %{buildroot}%{_libdir}/pkgconfig && ln -s json-c.pc json.pc) + +# delete static file +rm -f %{buildroot}%{_libdir}/libjson-c.a + +%remove_docs + +%post -n %{libsoname} -p /sbin/ldconfig +%postun -n %{libsoname} -p /sbin/ldconfig + +%files -n %{libsoname} +%manifest %{name}.manifest +%defattr(-,root,root) +%{_libdir}/libjson-c.so.* +%license COPYING + +%files -n %{libname}-devel +%manifest %{name}.manifest +%defattr(-,root,root) +%{_libdir}/libjson-c.so +%{_includedir}/json-c +%{_libdir}/pkgconfig/*.pc +%{_libdir}/cmake/json-c/json-c-config.cmake +%{_libdir}/cmake/json-c/json-c-targets-debug.cmake +%{_libdir}/cmake/json-c/json-c-targets.cmake + +%changelog -- 2.7.4