]> git.pld-linux.org Git - packages/jsoncpp.git/blame - jsoncpp.spec
- cleanup release
[packages/jsoncpp.git] / jsoncpp.spec
CommitLineData
0cc95b9e
ER
1#
2# Conditional build:
3%bcond_without tests # build without tests
4
3831d8ed 5%define svnrev 251
0cc95b9e
ER
6%define svndate 20120626
7Summary: API for manipulating JSON
8Name: jsoncpp
9Version: 0.6.0
01aa9388 10Release: 0.%{svndate}svn%{svnrev}.1
0cc95b9e
ER
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
3831d8ed 18# Source0-md5: cc7964a0787959111ef3d9965287dd3e
0cc95b9e
ER
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
c4ee6642 31Group: Development/Libraries
0cc95b9e
ER
32Requires: %{name} = %{version}-%{release}
33
34%description devel
35Headers and libraries for JSONCPP.
36
37%prep
38%setup -q -n %{name}
39%patch0 -p1
40%{__sed} -i -e '
41 s|g++|%{__cxx}| # FIXME: still does not work
42 s|@@OPTFLAGS@@|%{rpmcxxflags}|
43' SConstruct
44
45%build
46%scons \
47 platform=linux-gcc
48
49# Now, lets make a proper shared lib. :P
50%{__cxx} -o libjsoncpp.so.0.0.0 -shared -Wl,-soname,libjsoncpp.so.0 buildscons/linux-gcc-*/src/lib_json/*.os -lpthread %{rpmldflags}
51
52%if %{with tests}
53scons platform=linux-gcc check
54%endif
55
56%install
57rm -rf $RPM_BUILD_ROOT
58install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/jsoncpp,%{_pkgconfigdir}}
59install -p libjsoncpp.so.*.*.* $RPM_BUILD_ROOT%{_libdir}
60cp -a include/json $RPM_BUILD_ROOT%{_includedir}/jsoncpp
61%{__sed} -e 's|@@LIBDIR@@|%{_libdir}|g' %{SOURCE1} > $RPM_BUILD_ROOT%{_pkgconfigdir}/jsoncpp.pc
62
63/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
64ln -s $(basename $RPM_BUILD_ROOT%{_libdir}/libjsoncpp.so.*.*.*) $RPM_BUILD_ROOT%{_libdir}/libjsoncpp.so
65
66%clean
67rm -rf $RPM_BUILD_ROOT
68
69%post -p /sbin/ldconfig
70%postun -p /sbin/ldconfig
71
72%files
73%defattr(644,root,root,755)
74%doc AUTHORS NEWS.txt README.txt version
75%attr(755,root,root) %{_libdir}/libjsoncpp.so.0.0.0
76%ghost %{_libdir}/libjsoncpp.so.0
77
78%files devel
79%defattr(644,root,root,755)
80%doc doc/*
81%{_includedir}/jsoncpp
82%{_libdir}/libjsoncpp.so
83%{_pkgconfigdir}/jsoncpp.pc
This page took 0.415478 seconds and 4 git commands to generate.