Bump to json-c 0.15 56/243356/1 submit/tizen/20201109.002734 submit/tizen/20201120.051740
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 7 Sep 2020 03:18:05 +0000 (20:18 -0700)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 7 Sep 2020 03:21:59 +0000 (20:21 -0700)
Change-Id: Id5e885a95bff6a4d7e836e264404e24422507f0e
Signed-off-by: DongHun Kwak <dh0128.kwak@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 1cdaf9b..0000000
+++ /dev/null
@@ -1,93 +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_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
-/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..f8b4e8f
--- /dev/null
@@ -0,0 +1,92 @@
+%define libname libjson
+%define libsoname %{libname}4
+Name:           json-c
+Version:        0.15
+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
+%{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