]> git.pld-linux.org Git - packages/yajl.git/blob - yajl.spec
- cleaned up cmake options to build with proper flags and debuginfo; release 3
[packages/yajl.git] / yajl.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 Summary:        Yet Another JSON Library
6 Summary(pl.UTF-8):      Yet Another JSON Library - jeszcze jedna biblioteka JSON
7 Name:           yajl
8 Version:        2.1.0
9 Release:        3
10 License:        BSD
11 Group:          Libraries
12 Source0:        https://github.com/lloyd/yajl/archive/%{version}/%{name}-%{version}.tar.gz
13 # Source0-md5:  6887e0ed7479d2549761a4d284d3ecb0
14 Patch0:         %{name}-pc.patch
15 URL:            http://lloyd.github.io/yajl/
16 BuildRequires:  cmake >= 2.6
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %description
20 YAJL (Yet Another JSON Library) is a JSON parsing library written in
21 C.
22
23 %description -l pl.UTF-8
24 YAJL (Yet Another JSON Library, czyli jeszcze jedna biblioteka JSON)
25 to biblioteka analizatora JSON napisana w C.
26
27 %package devel
28 Summary:        Header files for YAJL library
29 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki YAJL
30 Group:          Development/Libraries
31 Requires:       %{name} = %{version}-%{release}
32
33 %description devel
34 Header files for YAJL library.
35
36 %description devel -l pl.UTF-8
37 Pliki nagłówkowe biblioteki YAJL.
38
39 %package static
40 Summary:        Static YAJL library
41 Summary(pl.UTF-8):      Statyczna biblioteka YAJL
42 Group:          Development/Libraries
43 Requires:       %{name}-devel = %{version}-%{release}
44
45 %description static
46 Static YAJL library.
47
48 %description static -l pl.UTF-8
49 Statyczna biblioteka YAJL.
50
51 %prep
52 %setup -q
53 %patch0 -p1
54
55 %if "%{pld_release}" == "ac"
56 #cc1: error: unrecognized option `-Wextra'
57 #cc1: error: unrecognized option `-Wold-style-definition'
58 %{__sed} -i -e 's/-Wold-style-definition//' CMakeLists.txt
59 %{__sed} -i -e 's/-Wextra//' CMakeLists.txt
60 %endif
61
62 %build
63 install -d build
64 cd build
65
66 %cmake .. \
67         -DLIB_INSTALL_DIR=%{_libdir}
68
69 %{__make}
70 %{?with_tests:%{__make} test}
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74
75 %{__make} -C build install \
76         DESTDIR=$RPM_BUILD_ROOT
77
78 %clean
79 rm -rf $RPM_BUILD_ROOT
80
81 %post   -p /sbin/ldconfig
82 %postun -p /sbin/ldconfig
83
84 %files
85 %defattr(644,root,root,755)
86 %doc COPYING ChangeLog README TODO
87 %attr(755,root,root) %{_bindir}/json_reformat
88 %attr(755,root,root) %{_bindir}/json_verify
89 %attr(755,root,root) %{_libdir}/libyajl.so.*.*.*
90 %attr(755,root,root) %ghost %{_libdir}/libyajl.so.2
91
92 %files devel
93 %defattr(644,root,root,755)
94 %attr(755,root,root) %{_libdir}/libyajl.so
95 %{_includedir}/yajl
96 %{_pkgconfigdir}/yajl.pc
97
98 %files static
99 %defattr(644,root,root,755)
100 %{_libdir}/libyajl_s.a
This page took 0.11361 seconds and 4 git commands to generate.