json-c-vl.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  2. %define pkg_date 20200726
  3. Summary: A JSON implementation in C
  4. Name: json-c
  5. Version: 0.15
  6. Release: 1%{?_dist_release}
  7. Group: system
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. License: MIT
  11. URL: https://github.com/json-c/json-c/wiki
  12. Source0: https://github.com/json-c/json-c/archive/json-c-%{version}-%{pkg_date}.tar.gz
  13. Patch1000: CVE-2020-12762.patch
  14. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  15. BuildRequires: cmake
  16. %description
  17. JSON-C implements a reference counting object model that allows you to easily
  18. construct JSON objects in C, output them as JSON formatted strings and parse
  19. JSON formatted strings back into the C representation of JSON objects.
  20. %package devel
  21. Summary: Development files for json-c
  22. Group: programming
  23. Requires: %{name} = %{version}-%{release}
  24. Requires: pkgconfig
  25. %description devel
  26. This package contains the libraries and header files that are needed
  27. for writing applications that are using json-c.
  28. %package doc
  29. Summary: Documentation for json-c
  30. Group: documentation
  31. Requires: %{name} = %{version}-%{release}
  32. BuildArch: noarch
  33. %description doc
  34. This package contains documentation for json-c.
  35. %package -n compat32-%{name}
  36. Summary: A JSON implementation in C
  37. Group: system,legacy
  38. Requires: %{name} = %{version}-%{release}
  39. %description -n compat32-%{name}
  40. JSON-C implements a reference counting object model that allows you to easily
  41. construct JSON objects in C, output them as JSON formatted strings and parse
  42. JSON formatted strings back into the C representation of JSON objects.
  43. %package -n compat32-%{name}-devel
  44. Summary: Development files for json-c
  45. Group: programming,legacy
  46. Requires: compat32-%{name} = %{version}-%{release}
  47. Requires: pkgconfig
  48. %description -n compat32-%{name}-devel
  49. This package contains the libraries and header files that are needed
  50. for writing applications that are using json-c.
  51. %debug_package
  52. %prep
  53. %setup -q -n json-c-json-c-%{version}-%{pkg_date}
  54. %build
  55. %cmake \
  56. -DBUILD_SHARED_LIBS=ON \
  57. -DBUILD_STATIC_LIBS=OFF \
  58. -DENABLE_RDRAND=ON \
  59. ../
  60. %cmake_build
  61. %install
  62. %{__rm} -rf $RPM_BUILD_ROOT
  63. %cmake_install
  64. %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/*.la
  65. %check
  66. %ctest
  67. %clean
  68. %{__rm} -rf $RPM_BUILD_ROOT
  69. %files
  70. %defattr(-,root,root,-)
  71. %license COPYING
  72. %doc AUTHORS ChangeLog NEWS README*
  73. %{_libdir}/libjson-c.so.*
  74. %files devel
  75. %defattr(-,root,root,-)
  76. %dir %{_includedir}/json-c
  77. %{_includedir}/json-c/*
  78. %{_libdir}/libjson-c.so
  79. %{_libdir}/pkgconfig/json-c.pc
  80. %dir %{_libdir}/cmake/json-c
  81. %{_libdir}/cmake/json-c/*.cmake
  82. %files doc
  83. %defattr(-,root,root,-)
  84. %doc doc/html/*
  85. %if %{build_compat32}
  86. %files -n compat32-%{name}
  87. %defattr(-,root,root,-)
  88. %{_libdir}/libjson-c.so.*
  89. %files -n compat32-%{name}-devel
  90. %defattr(-,root,root,-)
  91. %{_libdir}/libjson-c.so
  92. %endif
  93. %changelog
  94. * Fri Sep 03 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.15-1
  95. - new upstream release.
  96. - dropped Patch1000: fixed in upstream.
  97. * Sat May 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.14-1
  98. - updated to 0.14.
  99. - added Patch1000 to fix CVE-2020-12762.
  100. * Tue Jan 01 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.13.1-1
  101. - updated to 0.13.1.
  102. * Sat Jan 17 2015 Daisuke SUZUKI <daisuke@vinelinux.org> 0.11-1
  103. - update to 0.11
  104. * Wed Nov 28 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.10-1
  105. - update to 0.10
  106. - update URL
  107. * Sat Oct 08 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9-2
  108. - create compat32 sub packages
  109. * Fri Oct 07 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9-1
  110. - initial build for Vine Linux