1 | Name: yajl |
---|
2 | Summary: Yet Another JSON Library (YAJL) |
---|
3 | Version: 2.0.1 |
---|
4 | Release: 1%{?_dist_release} |
---|
5 | |
---|
6 | Group: System Environment/Libraries |
---|
7 | License: BSD |
---|
8 | URL: http://lloyd.github.com/yajl/ |
---|
9 | |
---|
10 | # |
---|
11 | # NB, upstream does not provide pre-built tar.gz downloads. Instead |
---|
12 | # they make you use the 'on the fly' generated tar.gz from GITHub's |
---|
13 | # web interface |
---|
14 | # |
---|
15 | # The Source0 for any version is obtained by a URL |
---|
16 | # |
---|
17 | # http://github.com/lloyd/yajl/tarball/1.0.7 |
---|
18 | # |
---|
19 | # Which causes a download of a archive named after |
---|
20 | # the GIT hash corresponding to the version tag |
---|
21 | # |
---|
22 | # eg lloyd-yajl-45a1bdb.tar.gz |
---|
23 | # |
---|
24 | # NB even though the tar.gz is generated on the fly by GITHub it |
---|
25 | # will always have identical md5sum |
---|
26 | # |
---|
27 | # So for new versions, update 'githash' to match the hash of the |
---|
28 | # GIT tag associated with updated 'Version:' field just above |
---|
29 | %global githash f4b2b1a |
---|
30 | Source0: lloyd-%{name}-%{version}-0-g%{githash}.tar.gz |
---|
31 | |
---|
32 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
33 | BuildRequires: cmake |
---|
34 | |
---|
35 | %description |
---|
36 | Yet Another JSON Library. YAJL is a small event-driven |
---|
37 | (SAX-style) JSON parser written in ANSI C, and a small |
---|
38 | validating JSON generator. |
---|
39 | |
---|
40 | %package devel |
---|
41 | Summary: Libraries, includes, etc to develop with YAJL |
---|
42 | Group: Development/Libraries |
---|
43 | Requires: %{name} = %{version}-%{release} |
---|
44 | |
---|
45 | %description devel |
---|
46 | Yet Another JSON Library. YAJL is a small event-driven |
---|
47 | (SAX-style) JSON parser written in ANSI C, and a small |
---|
48 | validating JSON generator. |
---|
49 | |
---|
50 | This sub-package provides the libraries and includes |
---|
51 | necessary for developing against the YAJL library |
---|
52 | |
---|
53 | %prep |
---|
54 | %setup -q -n lloyd-%{name}-%{githash} |
---|
55 | |
---|
56 | %build |
---|
57 | # NB, we are not using upstream's 'configure'/'make' |
---|
58 | # wrapper, instead we use cmake directly to better |
---|
59 | # align with Fedora standards |
---|
60 | mkdir build |
---|
61 | cd build |
---|
62 | %cmake .. |
---|
63 | make VERBOSE=1 %{?_smp_mflags} |
---|
64 | |
---|
65 | |
---|
66 | %install |
---|
67 | rm -rf $RPM_BUILD_ROOT |
---|
68 | cd build |
---|
69 | make install DESTDIR=$RPM_BUILD_ROOT |
---|
70 | |
---|
71 | |
---|
72 | # No static libraries |
---|
73 | rm -f $RPM_BUILD_ROOT%{_libdir}/libyajl_s.a |
---|
74 | |
---|
75 | |
---|
76 | %check |
---|
77 | cd test |
---|
78 | ./run_tests.sh |
---|
79 | |
---|
80 | %clean |
---|
81 | rm -rf $RPM_BUILD_ROOT |
---|
82 | |
---|
83 | %post -p /sbin/ldconfig |
---|
84 | |
---|
85 | %postun -p /sbin/ldconfig |
---|
86 | |
---|
87 | %files |
---|
88 | %defattr(-,root,root,-) |
---|
89 | %doc COPYING ChangeLog README TODO |
---|
90 | %{_bindir}/json_reformat |
---|
91 | %{_bindir}/json_verify |
---|
92 | %{_libdir}/libyajl.so.2 |
---|
93 | %{_libdir}/libyajl.so.2.* |
---|
94 | |
---|
95 | %files devel |
---|
96 | %defattr(-,root,root,-) |
---|
97 | %doc COPYING |
---|
98 | %dir %{_includedir}/yajl |
---|
99 | %{_includedir}/yajl/yajl_common.h |
---|
100 | %{_includedir}/yajl/yajl_gen.h |
---|
101 | %{_includedir}/yajl/yajl_parse.h |
---|
102 | %{_includedir}/yajl/yajl_tree.h |
---|
103 | %{_includedir}/yajl/yajl_version.h |
---|
104 | %{_libdir}/libyajl.so |
---|
105 | |
---|
106 | |
---|
107 | %changelog |
---|
108 | * Sun Nov 20 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.0.1-1 |
---|
109 | - updated to 2.0.1 |
---|
110 | |
---|
111 | * Thu Aug 18 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.0.12-2 |
---|
112 | - Initial build for Vine Linux |
---|
113 | |
---|
114 | * Tue May 3 2011 Daniel P. Berrange <berrange@redhat.com> - 1.0.12-1 |
---|
115 | - Update to 1.0.12 release |
---|
116 | |
---|
117 | * Fri Dec 17 2010 Daniel P. Berrange <berrange@redhat.com> - 1.0.11-1 |
---|
118 | - Update to 1.0.11 release |
---|
119 | |
---|
120 | * Mon Jan 11 2010 Daniel P. Berrange <berrange@redhat.com> - 1.0.7-3 |
---|
121 | - Fix ignoring of cflags (rhbz #547500) |
---|
122 | |
---|
123 | * Tue Dec 8 2009 Daniel P. Berrange <berrange@redhat.com> - 1.0.7-2 |
---|
124 | - Change use of 'define' to 'global' |
---|
125 | |
---|
126 | * Mon Dec 7 2009 Daniel P. Berrange <berrange@redhat.com> - 1.0.7-1 |
---|
127 | - Initial Fedora package |
---|