json-c-vl.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  2. %define pkg_version 0.13.1
  3. %define pkg_date 20180305
  4. %define pkg_release 1%{?_dist_release}
  5. Summary: A JSON implementation in C
  6. Name: json-c
  7. Version: %{pkg_version}
  8. Release: %{pkg_release}
  9. Source0: https://github.com/json-c/json-c/archive/json-c-json-c-%{version}-%{pkg_date}.tar.gz
  10. License: MIT
  11. Group: System Environment/Libraries
  12. URL: https://github.com/json-c/json-c/wiki
  13. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  14. Vendor: Project Vine
  15. Distribution: Vine Linux
  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: Development/Libraries
  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 Environment/Libraries
  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: Development/Libraries
  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. %prep
  52. %setup -q -n json-c-json-c-%{version}-%{pkg_date}
  53. # Hack to get json_object_iterator.c compiled
  54. sed -e 's/json_object.c/json_object.c json_object_iterator.c/' \
  55. -e 's/json_object.h/json_object.h json_object_iterator.h/' \
  56. -e 's/json_object.lo/json_object.lo json_object_iterator.lo/' \
  57. -i Makefile.in
  58. %build
  59. autoreconf -fiv
  60. %configure --enable-shared --disable-static --disable-rpath --enable-rdrand
  61. %{__make}
  62. %install
  63. %{__rm} -rf $RPM_BUILD_ROOT
  64. %{__make} install DESTDIR=$RPM_BUILD_ROOT
  65. %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/*.la
  66. %clean
  67. %{__rm} -rf $RPM_BUILD_ROOT
  68. %post -p /sbin/ldconfig
  69. %postun -p /sbin/ldconfig
  70. %post -n compat32-%{name} -p /sbin/ldconfig
  71. %postun -n compat32-%{name} -p /sbin/ldconfig
  72. %files
  73. %defattr(-,root,root,-)
  74. %license COPYING
  75. %doc AUTHORS ChangeLog NEWS README*
  76. %{_libdir}/libjson-c.so.*
  77. %files devel
  78. %defattr(-,root,root,-)
  79. %dir %{_includedir}/json-c
  80. %{_includedir}/json-c/*
  81. %{_libdir}/libjson-c.so
  82. %{_libdir}/pkgconfig/json-c.pc
  83. %files doc
  84. %defattr(-,root,root,-)
  85. %doc doc/html/*
  86. %if %{build_compat32}
  87. %files -n compat32-%{name}
  88. %defattr(-,root,root,-)
  89. %{_libdir}/libjson-c.so.*
  90. %files -n compat32-%{name}-devel
  91. %defattr(-,root,root,-)
  92. %{_libdir}/libjson-c.so
  93. %{_libdir}/pkgconfig/json-c.pc
  94. %endif
  95. %changelog
  96. * Tue Jan 01 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.13.1-1
  97. - update to 0.13.1.
  98. * Sat Jan 17 2015 Daisuke SUZUKI <daisuke@vinelinux.org> 0.11-1
  99. - update to 0.11
  100. * Wed Nov 28 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.10-1
  101. - update to 0.10
  102. - update URL
  103. * Sat Oct 08 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9-2
  104. - create compat32 sub packages
  105. * Fri Oct 07 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9-1
  106. - initial build for Vine Linux