Bump to 0.17 accepted/tizen_9.0_unified accepted/tizen_unified accepted/tizen_unified_dev accepted/tizen_unified_riscv sandbox/json-c_0.17 tizen tizen_9.0 accepted/tizen/9.0/unified/20241031.000144 accepted/tizen/unified/20231220.165110 accepted/tizen/unified/dev/20240620.010754 accepted/tizen/unified/riscv/20231226.210724 tizen_9.0_m2_release
authorTizenOpenSource <tizenopensrc@samsung.com>
Thu, 7 Dec 2023 08:57:37 +0000 (17:57 +0900)
committerTizenOpenSource <tizenopensrc@samsung.com>
Thu, 7 Dec 2023 08:57:37 +0000 (17:57 +0900)
Signed-off-by: TizenOpenSource <tizenopensrc@samsung.com>
.gitignore [deleted file]
packaging/baselibs.conf [new file with mode: 0644]
packaging/json-c.manifest [new file with mode: 0644]
packaging/json-c.spec [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
deleted file mode 100644 (file)
index 4b7da9f..0000000
+++ /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 (file)
index 0000000..5d7a18d
--- /dev/null
@@ -0,0 +1 @@
+libjson
diff --git a/packaging/json-c.manifest b/packaging/json-c.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/json-c.spec b/packaging/json-c.spec
new file mode 100644 (file)
index 0000000..b0132fa
--- /dev/null
@@ -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