json-c-vl.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  2. %define pkg_version 0.11
  3. %define pkg_release 1%{?_dist_release}
  4. Summary: A JSON implementation in C
  5. Name: json-c
  6. Version: %{pkg_version}
  7. Release: %{pkg_release}
  8. Source0: https://github.com/downloads/json-c/json-c/json-c-%{version}.tar.gz
  9. License: MIT
  10. Group: System Environment/Libraries
  11. URL: https://github.com/json-c/json-c/wiki
  12. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  13. Vendor: Project Vine
  14. Distribution: Vine Linux
  15. Packager: Takemikaduchi
  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
  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. %doc COPYING ChangeLog COPYING NEWS README README.html
  75. %{_libdir}/libjson.so.*
  76. %{_libdir}/libjson-c.so.*
  77. %files devel
  78. %defattr(-,root,root,-)
  79. %{_includedir}/json/*
  80. %{_includedir}/json-c/*
  81. %{_libdir}/libjson.so
  82. %{_libdir}/libjson-c.so
  83. %{_libdir}/pkgconfig/json.pc
  84. %{_libdir}/pkgconfig/json-c.pc
  85. %files doc
  86. %defattr(-,root,root,-)
  87. %doc doc/html/*
  88. %if %{build_compat32}
  89. %files -n compat32-%{name}
  90. %defattr(-,root,root,-)
  91. %{_libdir}/libjson.so.*
  92. %{_libdir}/libjson-c.so.*
  93. %files -n compat32-%{name}-devel
  94. %defattr(-,root,root,-)
  95. %{_libdir}/libjson.so
  96. %{_libdir}/libjson-c.so
  97. %{_libdir}/pkgconfig/json.pc
  98. %{_libdir}/pkgconfig/json-c.pc
  99. %endif
  100. %changelog
  101. * Sat Jan 17 2015 Daisuke SUZUKI <daisuke@vinelinux.org> 0.11-1
  102. - update to 0.11
  103. * Wed Nov 28 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.10-1
  104. - update to 0.10
  105. - update URL
  106. * Sat Oct 08 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9-2
  107. - create compat32 sub packages
  108. * Fri Oct 07 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9-1
  109. - initial build for Vine Linux