]> git.pld-linux.org Git - packages/jsoncpp.git/blame - jsoncpp.spec
new, version 0.6.0-svn
[packages/jsoncpp.git] / jsoncpp.spec
CommitLineData
0cc95b9e
ER
1#
2# Conditional build:
3%bcond_without tests # build without tests
4
5%define svnrev 249
6%define svndate 20120626
7Summary: API for manipulating JSON
8Name: jsoncpp
9Version: 0.6.0
10Release: 0.1.%{svndate}svn%{svnrev}
11License: MIT or Public Domain
12Group: Libraries
13URL: http://jsoncpp.sourceforge.net/
14# Need to use svn.
15# svn export https://jsoncpp.svn.sourceforge.net/svnroot/jsoncpp/trunk/jsoncpp jsoncpp
16# tar cfj jsoncpp-20120626svn249.tar.bz2 jsoncpp
17Source0: %{name}-%{svndate}svn%{svnrev}.tar.bz2
18# Source0-md5: e42665aba92a48b1fa998e534d03b5d8
19Source1: %{name}.pc
20Patch0: %{name}-optflags.patch
21BuildRequires: scons
22BuildRequires: sed >= 4.0
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%description
26JSONCPP provides a simple API to manipulate JSON values, and handle
27serialization and unserialization to strings.
28
29%package devel
30Summary: Headers and libraries for JSONCPP
31Requires: %{name} = %{version}-%{release}
32
33%description devel
34Headers and libraries for JSONCPP.
35
36%prep
37%setup -q -n %{name}
38%patch0 -p1
39%{__sed} -i -e '
40 s|g++|%{__cxx}| # FIXME: still does not work
41 s|@@OPTFLAGS@@|%{rpmcxxflags}|
42' SConstruct
43
44%build
45%scons \
46 platform=linux-gcc
47
48# Now, lets make a proper shared lib. :P
49%{__cxx} -o libjsoncpp.so.0.0.0 -shared -Wl,-soname,libjsoncpp.so.0 buildscons/linux-gcc-*/src/lib_json/*.os -lpthread %{rpmldflags}
50
51%if %{with tests}
52scons platform=linux-gcc check
53%endif
54
55%install
56rm -rf $RPM_BUILD_ROOT
57install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/jsoncpp,%{_pkgconfigdir}}
58install -p libjsoncpp.so.*.*.* $RPM_BUILD_ROOT%{_libdir}
59cp -a include/json $RPM_BUILD_ROOT%{_includedir}/jsoncpp
60%{__sed} -e 's|@@LIBDIR@@|%{_libdir}|g' %{SOURCE1} > $RPM_BUILD_ROOT%{_pkgconfigdir}/jsoncpp.pc
61
62/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
63ln -s $(basename $RPM_BUILD_ROOT%{_libdir}/libjsoncpp.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libjsoncpp.so
64
65%clean
66rm -rf $RPM_BUILD_ROOT
67
68%post -p /sbin/ldconfig
69%postun -p /sbin/ldconfig
70
71%files
72%defattr(644,root,root,755)
73%doc AUTHORS NEWS.txt README.txt version
74%attr(755,root,root) %{_libdir}/libjsoncpp.so.0.0.0
75%ghost %{_libdir}/libjsoncpp.so.0
76
77%files devel
78%defattr(644,root,root,755)
79%doc doc/*
80%{_includedir}/jsoncpp
81%{_libdir}/libjsoncpp.so
82%{_pkgconfigdir}/jsoncpp.pc
This page took 0.070086 seconds and 4 git commands to generate.