source: projects/specs/trunk/j/json-c/json-c-vl.spec @ 12005

Revision 12005, 3.6 KB checked in by tomop, 5 years ago (diff)

Merge branch 'tomop'

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