87d616b
%global realname yaml-cpp
87d616b
87d616b
Name:           yaml-cpp03
87d616b
Version:        0.3.0
bd82a0c
Release:        10%{?dist}
87d616b
Summary:        A YAML parser and emitter for C++
87d616b
License:        MIT 
87d616b
URL:            http://code.google.com/p/yaml-cpp/
87d616b
Source0:        http://yaml-cpp.googlecode.com/files/%{realname}-%{version}.tar.gz
87d616b
87d616b
Patch0:         yaml-cpp03-pkgconf.patch
87d616b
87d616b
BuildRequires:  cmake
87d616b
87d616b
Provides:       yaml-cpp = %{version}-%{release}
87d616b
Obsoletes:      yaml-cpp < 0.3.0-5
87d616b
87d616b
%description
87d616b
yaml-cpp is a YAML parser and emitter in C++ written around the YAML 1.2 spec.
87d616b
87d616b
This is a compatibility package for version 0.3.
87d616b
87d616b
87d616b
%package        devel
87d616b
Summary:        Development files for %{name}
87d616b
License:        MIT
87d616b
Requires:       %{name}%{?_isa} = %{version}-%{release}
87d616b
Requires:       pkgconfig
87d616b
Requires:       boost-devel
87d616b
87d616b
Provides:       yaml-cpp-devel = %{version}-%{release}
87d616b
Obsoletes:      yaml-cpp-devel < 0.3.0-5
87d616b
87d616b
%description    devel
87d616b
The %{name}-devel package contains libraries and header files for
87d616b
developing applications that use %{name}.
87d616b
87d616b
This is a compatibility package for version 3.
87d616b
87d616b
87d616b
%prep
87d616b
%setup -q -n %{realname}
87d616b
%patch0 -p1 -b .pkgconf
87d616b
87d616b
# Fix eol 
87d616b
sed -i 's/\r//' license.txt
87d616b
87d616b
87d616b
%build
87d616b
# ask cmake to not strip binaries
87d616b
%cmake . -DYAML_CPP_BUILD_TOOLS=0
87d616b
make VERBOSE=1 %{?_smp_mflags}
87d616b
87d616b
87d616b
%install
87d616b
%make_install
87d616b
#find %{buildroot} -name '*.la' -exec rm -f {} ';'
87d616b
87d616b
# Move things as to not conflict with the main package
87d616b
mv %{buildroot}%{_includedir}/yaml-cpp %{buildroot}%{_includedir}/%{name}
87d616b
mv %{buildroot}%{_libdir}/libyaml-cpp.so %{buildroot}%{_libdir}/lib%{name}.so
87d616b
mv %{buildroot}%{_libdir}/pkgconfig/yaml-cpp.pc \
87d616b
   %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
87d616b
87d616b
# Correct paths in yaml headers
87d616b
for header in %{buildroot}%{_includedir}/%{name}/*.h; do
87d616b
    sed -i "s|#include \"yaml-cpp|#include \"%{name}|g" $header
87d616b
done
87d616b
87d616b
87d616b
%post -p /sbin/ldconfig
87d616b
87d616b
%postun -p /sbin/ldconfig
87d616b
87d616b
87d616b
%files
87d616b
%doc license.txt
87d616b
%{_libdir}/*.so.*
87d616b
87d616b
%files devel
87d616b
%{_includedir}/%{name}
87d616b
%{_libdir}/lib%{name}.so
87d616b
%{_libdir}/pkgconfig/%{name}.pc
87d616b
87d616b
87d616b
%changelog
bd82a0c
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-10
bd82a0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
bd82a0c
4ff5dec
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-9
4ff5dec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
4ff5dec
a07fa0c
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-8
a07fa0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
a07fa0c
4c9bec3
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.3.0-7
4c9bec3
- Rebuilt for GCC 5 C++11 ABI change
4c9bec3
e37a0e9
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-6
e37a0e9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
e37a0e9
018e54b
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-5
018e54b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
018e54b
87d616b
* Wed Oct 30 2013 Richard Shaw <hobbes1069@gmail.com> - 0.3.0-4
87d616b
- Change package name to yaml-cpp03 per reviewer input.
87d616b
87d616b
* Wed Sep  4 2013 Richard Shaw <hobbes1069@gmail.com> - 0.3.0-3
87d616b
- Add obsoletes/provides for proper upgrade path.
87d616b
- Fix internal header references to yaml-cpp3.
87d616b
- Fix pkg-config file to reference yaml-cpp3.
87d616b
87d616b
* Mon Aug 26 2013 Richard Shaw <hobbes1069@gmail.com> - 0.3.0-1
87d616b
- Initial packaging.