[4878] | 1 | %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0} |
---|
| 2 | |
---|
[9311] | 3 | %define pkg_version 0.11 |
---|
[7171] | 4 | %define pkg_release 1%{?_dist_release} |
---|
[4876] | 5 | |
---|
| 6 | Summary: A JSON implementation in C |
---|
| 7 | Name: json-c |
---|
| 8 | Version: %{pkg_version} |
---|
| 9 | Release: %{pkg_release} |
---|
| 10 | |
---|
[9311] | 11 | Source0: https://github.com/downloads/json-c/json-c/json-c-%{version}.tar.gz |
---|
[4876] | 12 | |
---|
| 13 | License: MIT |
---|
| 14 | Group: System Environment/Libraries |
---|
[7171] | 15 | URL: https://github.com/json-c/json-c/wiki |
---|
[4876] | 16 | |
---|
| 17 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 18 | |
---|
| 19 | Vendor: Project Vine |
---|
| 20 | Distribution: Vine Linux |
---|
| 21 | Packager: Takemikaduchi |
---|
| 22 | |
---|
| 23 | |
---|
| 24 | %description |
---|
| 25 | JSON-C implements a reference counting object model that allows you to easily |
---|
| 26 | construct JSON objects in C, output them as JSON formatted strings and parse |
---|
| 27 | JSON formatted strings back into the C representation of JSON objects. |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | %package devel |
---|
| 31 | Summary: Development files for json-c |
---|
| 32 | Group: Development/Libraries |
---|
| 33 | Requires: %{name} = %{version}-%{release} |
---|
| 34 | Requires: pkgconfig |
---|
| 35 | |
---|
| 36 | %description devel |
---|
| 37 | This package contains the libraries and header files that are needed |
---|
| 38 | for writing applications that are using json-c. |
---|
| 39 | |
---|
| 40 | |
---|
| 41 | %package doc |
---|
| 42 | Summary: Documentation for json-c |
---|
| 43 | Group: Documentation |
---|
| 44 | Requires: %{name} = %{version}-%{release} |
---|
| 45 | BuildArch: noarch |
---|
| 46 | |
---|
| 47 | %description doc |
---|
| 48 | This package contains documentation for json-c. |
---|
| 49 | |
---|
| 50 | |
---|
[4878] | 51 | %package -n compat32-%{name} |
---|
| 52 | Summary: A JSON implementation in C |
---|
| 53 | Group: System Environment/Libraries |
---|
| 54 | Requires: %{name} = %{version}-%{release} |
---|
| 55 | |
---|
| 56 | %description -n compat32-%{name} |
---|
| 57 | JSON-C implements a reference counting object model that allows you to easily |
---|
| 58 | construct JSON objects in C, output them as JSON formatted strings and parse |
---|
| 59 | JSON formatted strings back into the C representation of JSON objects. |
---|
| 60 | |
---|
| 61 | %package -n compat32-%{name}-devel |
---|
| 62 | Summary: Development files for json-c |
---|
| 63 | Group: Development/Libraries |
---|
| 64 | Requires: compat32-%{name} = %{version}-%{release} |
---|
| 65 | Requires: pkgconfig |
---|
| 66 | |
---|
| 67 | %description -n compat32-%{name}-devel |
---|
| 68 | This package contains the libraries and header files that are needed |
---|
| 69 | for writing applications that are using json-c. |
---|
| 70 | |
---|
| 71 | |
---|
[4876] | 72 | %prep |
---|
| 73 | %setup -q |
---|
| 74 | |
---|
[7171] | 75 | # Hack to get json_object_iterator.c compiled |
---|
| 76 | sed -e 's/json_object.c/json_object.c json_object_iterator.c/' \ |
---|
| 77 | -e 's/json_object.h/json_object.h json_object_iterator.h/' \ |
---|
| 78 | -e 's/json_object.lo/json_object.lo json_object_iterator.lo/' \ |
---|
| 79 | -i Makefile.in |
---|
| 80 | |
---|
[4876] | 81 | %build |
---|
[9311] | 82 | autoreconf -fiv |
---|
| 83 | %configure --enable-shared --disable-static --disable-rpath --enable-rdrand |
---|
| 84 | %{__make} |
---|
[4876] | 85 | |
---|
| 86 | %install |
---|
| 87 | %{__rm} -rf $RPM_BUILD_ROOT |
---|
| 88 | %{__make} install DESTDIR=$RPM_BUILD_ROOT |
---|
| 89 | |
---|
| 90 | %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/*.la |
---|
| 91 | |
---|
| 92 | %clean |
---|
| 93 | %{__rm} -rf $RPM_BUILD_ROOT |
---|
| 94 | |
---|
| 95 | %post -p /sbin/ldconfig |
---|
| 96 | |
---|
| 97 | %postun -p /sbin/ldconfig |
---|
| 98 | |
---|
[4878] | 99 | %post -n compat32-%{name} -p /sbin/ldconfig |
---|
| 100 | |
---|
| 101 | %postun -n compat32-%{name} -p /sbin/ldconfig |
---|
| 102 | |
---|
[4876] | 103 | %files |
---|
| 104 | %defattr(-,root,root,-) |
---|
| 105 | %doc COPYING ChangeLog COPYING NEWS README README.html |
---|
| 106 | %{_libdir}/libjson.so.* |
---|
[9311] | 107 | %{_libdir}/libjson-c.so.* |
---|
[4876] | 108 | |
---|
| 109 | %files devel |
---|
| 110 | %defattr(-,root,root,-) |
---|
| 111 | %{_includedir}/json/* |
---|
[9311] | 112 | %{_includedir}/json-c/* |
---|
[4876] | 113 | %{_libdir}/libjson.so |
---|
[9311] | 114 | %{_libdir}/libjson-c.so |
---|
[4876] | 115 | %{_libdir}/pkgconfig/json.pc |
---|
[9311] | 116 | %{_libdir}/pkgconfig/json-c.pc |
---|
[4876] | 117 | |
---|
| 118 | %files doc |
---|
| 119 | %defattr(-,root,root,-) |
---|
| 120 | %doc doc/html/* |
---|
| 121 | |
---|
[4878] | 122 | %if %{build_compat32} |
---|
| 123 | %files -n compat32-%{name} |
---|
| 124 | %defattr(-,root,root,-) |
---|
| 125 | %{_libdir}/libjson.so.* |
---|
[9311] | 126 | %{_libdir}/libjson-c.so.* |
---|
[4876] | 127 | |
---|
[4878] | 128 | %files -n compat32-%{name}-devel |
---|
| 129 | %defattr(-,root,root,-) |
---|
| 130 | %{_libdir}/libjson.so |
---|
[9311] | 131 | %{_libdir}/libjson-c.so |
---|
[4878] | 132 | %{_libdir}/pkgconfig/json.pc |
---|
[9311] | 133 | %{_libdir}/pkgconfig/json-c.pc |
---|
[4878] | 134 | %endif |
---|
| 135 | |
---|
| 136 | |
---|
[4876] | 137 | %changelog |
---|
[9311] | 138 | * Sat Jan 17 2015 Daisuke SUZUKI <daisuke@vinelinux.org> 0.11-1 |
---|
| 139 | - update to 0.11 |
---|
| 140 | |
---|
[7171] | 141 | * Wed Nov 28 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 0.10-1 |
---|
| 142 | - update to 0.10 |
---|
| 143 | - update URL |
---|
| 144 | |
---|
[4878] | 145 | * Sat Oct 08 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9-2 |
---|
| 146 | - create compat32 sub packages |
---|
| 147 | |
---|
[4876] | 148 | * Fri Oct 07 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9-1 |
---|
| 149 | - initial build for Vine Linux |
---|
| 150 | |
---|