File qjson.spec of Package qjson

Name:           qjson
Version:        0.7.1
Release:        4%{?dist}
Summary:        A qt-based library that maps JSON data to QVariant objects

Group:          Development/Languages
License:        GPLv2+
BuildRoot:  %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRoot:  %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: redhat-rpm-config redhat-release

BuildRequires:  gcc-c++
BuildRequires:  qt4-devel
BuildRequires:  cmake >= 2.6
BuildRequires:  doxygen

JSON is a lightweight data-interchange format. It can represents integer, real
number, string, an ordered sequence of value, and a collection of
name/value pairs.QJson is a qt-based library that maps JSON data to
QVariant objects.

%package devel
Summary:  Development files for qjson
Group:    Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: qt-devel >= 4.0
Requires: pkgconfig
Requires: cmake

%description devel
The %{name}-devel package contains the libraries and header files required for
developing applications that use %{name}.

%setup -qn qjson

mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake} -DQJSON_BUILD_TESTS=1  -DCMAKE_MODULES_INSTALL_DIR=%{_datadir}/cmake/Modules/  ..
cd %{_builddir}/%{buildsubdir}/doc

sed -i -e 's/-fno-exceptions -fno-check-new -fno-common//' \
-e 's/-fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden//' \
-e 's/-ansi//' %{_target_platform}/src/CMakeFiles/qjson.dir/flags.make

make %{?_smp_mflags} -C %{_target_platform}

rm -rf %{buildroot}
make install DESTDIR=%{buildroot} -C %{_target_platform}

LD_PRELOAD=%{_target_platform}/%{_lib}/ \
LD_PRELOAD=%{_target_platform}/%{_lib}/ \

rm -rf %{buildroot}

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig


%files devel
%doc doc/html