[yaml-cpp03] Change package name to yaml-cpp03 per reviewer input.

Richard Shaw hobbes1069 at fedoraproject.org
Thu Oct 31 13:58:06 UTC 2013


commit 87d616b1da7ba7f3c3b5608b5c0f15ec8baf2eb6
Author: Richard M. Shaw <hobbes1069 at gmail.com>
Date:   Thu Oct 31 08:58:17 2013 -0500

    Change package name to yaml-cpp03 per reviewer input.

 .gitignore               |    1 +
 sources                  |    1 +
 yaml-cpp03-pkgconf.patch |   10 +++++
 yaml-cpp03.spec          |   96 ++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 108 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..3987f47 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/yaml-cpp-0.3.0.tar.gz
diff --git a/sources b/sources
index e69de29..8453a58 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+9aa519205a543f9372bf4179071c8ac6  yaml-cpp-0.3.0.tar.gz
diff --git a/yaml-cpp03-pkgconf.patch b/yaml-cpp03-pkgconf.patch
new file mode 100644
index 0000000..cb2f3cd
--- /dev/null
+++ b/yaml-cpp03-pkgconf.patch
@@ -0,0 +1,10 @@
+diff -Naur yaml-cpp.orig/yaml-cpp.pc.cmake yaml-cpp/yaml-cpp.pc.cmake
+--- yaml-cpp.orig/yaml-cpp.pc.cmake	2012-01-21 02:52:48.000000000 -0600
++++ yaml-cpp/yaml-cpp.pc.cmake	2013-10-16 14:41:06.837360011 -0500
+@@ -7,5 +7,5 @@
+ Description: A YAML parser and emitter for C++
+ Version: @YAML_CPP_VERSION@
+ Requires:
+-Libs: -L${libdir} -lyaml-cpp
++Libs: -L${libdir} -lyaml-cpp03
+ Cflags: -I${includedir}
diff --git a/yaml-cpp03.spec b/yaml-cpp03.spec
new file mode 100644
index 0000000..eb0fa57
--- /dev/null
+++ b/yaml-cpp03.spec
@@ -0,0 +1,96 @@
+%global realname yaml-cpp
+
+Name:           yaml-cpp03
+Version:        0.3.0
+Release:        4%{?dist}
+Summary:        A YAML parser and emitter for C++
+License:        MIT 
+URL:            http://code.google.com/p/yaml-cpp/
+Source0:        http://yaml-cpp.googlecode.com/files/%{realname}-%{version}.tar.gz
+
+Patch0:         yaml-cpp03-pkgconf.patch
+
+BuildRequires:  cmake
+
+Provides:       yaml-cpp = %{version}-%{release}
+Obsoletes:      yaml-cpp < 0.3.0-5
+
+%description
+yaml-cpp is a YAML parser and emitter in C++ written around the YAML 1.2 spec.
+
+This is a compatibility package for version 0.3.
+
+
+%package        devel
+Summary:        Development files for %{name}
+License:        MIT
+Requires:       %{name}%{?_isa} = %{version}-%{release}
+Requires:       pkgconfig
+Requires:       boost-devel
+
+Provides:       yaml-cpp-devel = %{version}-%{release}
+Obsoletes:      yaml-cpp-devel < 0.3.0-5
+
+%description    devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
+
+This is a compatibility package for version 3.
+
+
+%prep
+%setup -q -n %{realname}
+%patch0 -p1 -b .pkgconf
+
+# Fix eol 
+sed -i 's/\r//' license.txt
+
+
+%build
+# ask cmake to not strip binaries
+%cmake . -DYAML_CPP_BUILD_TOOLS=0
+make VERBOSE=1 %{?_smp_mflags}
+
+
+%install
+%make_install
+#find %{buildroot} -name '*.la' -exec rm -f {} ';'
+
+# Move things as to not conflict with the main package
+mv %{buildroot}%{_includedir}/yaml-cpp %{buildroot}%{_includedir}/%{name}
+mv %{buildroot}%{_libdir}/libyaml-cpp.so %{buildroot}%{_libdir}/lib%{name}.so
+mv %{buildroot}%{_libdir}/pkgconfig/yaml-cpp.pc \
+   %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
+
+# Correct paths in yaml headers
+for header in %{buildroot}%{_includedir}/%{name}/*.h; do
+    sed -i "s|#include \"yaml-cpp|#include \"%{name}|g" $header
+done
+
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+%files
+%doc license.txt
+%{_libdir}/*.so.*
+
+%files devel
+%{_includedir}/%{name}
+%{_libdir}/lib%{name}.so
+%{_libdir}/pkgconfig/%{name}.pc
+
+
+%changelog
+* Wed Oct 30 2013 Richard Shaw <hobbes1069 at gmail.com> - 0.3.0-4
+- Change package name to yaml-cpp03 per reviewer input.
+
+* Wed Sep  4 2013 Richard Shaw <hobbes1069 at gmail.com> - 0.3.0-3
+- Add obsoletes/provides for proper upgrade path.
+- Fix internal header references to yaml-cpp3.
+- Fix pkg-config file to reference yaml-cpp3.
+
+* Mon Aug 26 2013 Richard Shaw <hobbes1069 at gmail.com> - 0.3.0-1
+- Initial packaging.


More information about the scm-commits mailing list