json-c-vl.spec 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  2. %define pkg_version 0.10
  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. %configure --enable-shared --disable-static
  60. %{__make} %{?_smp_mflags}
  61. %install
  62. %{__rm} -rf $RPM_BUILD_ROOT
  63. %{__make} install DESTDIR=$RPM_BUILD_ROOT
  64. %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/*.la
  65. %clean
  66. %{__rm} -rf $RPM_BUILD_ROOT
  67. %post -p /sbin/ldconfig
  68. %postun -p /sbin/ldconfig
  69. %post -n compat32-%{name} -p /sbin/ldconfig
  70. %postun -n compat32-%{name} -p /sbin/ldconfig
  71. %files
  72. %defattr(-,root,root,-)
  73. %doc COPYING ChangeLog COPYING NEWS README README.html
  74. %{_libdir}/libjson.so.*
  75. %files devel
  76. %defattr(-,root,root,-)
  77. %{_includedir}/json/*
  78. %{_libdir}/libjson.so
  79. %{_libdir}/pkgconfig/json.pc
  80. %files doc
  81. %defattr(-,root,root,-)
  82. %doc doc/html/*
  83. %if %{build_compat32}
  84. %files -n compat32-%{name}
  85. %defattr(-,root,root,-)
  86. %{_libdir}/libjson.so.*
  87. %files -n compat32-%{name}-devel
  88. %defattr(-,root,root,-)
  89. %{_libdir}/libjson.so
  90. %{_libdir}/pkgconfig/json.pc
  91. %endif
  92. %changelog
  93. * Wed Nov 28 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.10-1
  94. - update to 0.10
  95. - update URL
  96. * Sat Oct 08 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9-2
  97. - create compat32 sub packages
  98. * Fri Oct 07 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9-1
  99. - initial build for Vine Linux