[shiny: 2/7] Add patch to set soversion, install targets, and linking with Boost.
Igor Gnatenko
ignatenkobrain at fedoraproject.org
Fri May 16 18:25:56 UTC 2014
commit fdbb7c1c2a35e47a12c82c799d14893a52a6a7f8
Author: Richard M. Shaw <hobbes1069 at gmail.com>
Date: Wed May 14 09:49:58 2014 -0500
Add patch to set soversion, install targets, and linking with Boost.
shiny-cmake_fixes.patch | 23 +++++++++++++++++++++++
shiny.spec | 21 +++++++++++++++++----
2 files changed, 40 insertions(+), 4 deletions(-)
---
diff --git a/shiny-cmake_fixes.patch b/shiny-cmake_fixes.patch
new file mode 100644
index 0000000..8bcff8e
--- /dev/null
+++ b/shiny-cmake_fixes.patch
@@ -0,0 +1,23 @@
+diff -Naur shiny-f41178f82765828ac09f9f1da5bd28038c94311d.orig/CMakeLists.txt shiny-f41178f82765828ac09f9f1da5bd28038c94311d/CMakeLists.txt
+--- shiny-f41178f82765828ac09f9f1da5bd28038c94311d.orig/CMakeLists.txt 2014-05-14 07:55:57.845045283 -0500
++++ shiny-f41178f82765828ac09f9f1da5bd28038c94311d/CMakeLists.txt 2014-05-14 08:41:34.589314049 -0500
+@@ -27,6 +27,10 @@
+ include_directories(${Boost_INCLUDE_DIRS})
+ add_definitions(-DBOOST_ALL_NO_LIB)
+ add_library(${SHINY_LIBRARY} SHARED ${SOURCE_FILES})
++target_link_libraries(${SHINY_LIBRARY} ${Boost_LIBRARIES})
++include_directories(${Boost_INCLUDE_DIRS})
++set_target_properties(${SHINY_LIBRARY} PROPERTIES SOVERSION @SOVERSION@)
++install(TARGETS ${SHINY_LIBRARY} LIBRARY DESTINATION lib${LIB_SUFFIX})
+
+ set(SHINY_LIBRARIES ${SHINY_LIBRARY})
+
+@@ -51,6 +54,8 @@
+ add_library(${SHINY_OGREPLATFORM_LIBRARY} SHARED ${OGRE_PLATFORM_SOURCE_FILES})
+ add_dependencies(${SHINY_OGREPLATFORM_LIBRARY} ${SHINY_LIBRARY})
+ set(SHINY_LIBRARIES ${SHINY_LIBRARIES} ${SHINY_OGREPLATFORM_LIBRARY})
++ install(TARGETS ${SHINY_OGREPLATFORM_LIBRARY}
++ LIBRARY DESTINATION lib${LIB_SUFFIX}//OGRE)
+ endif()
+
+ set(SHINY_LIBRARY ${SHINY_LIBRARY} PARENT_SCOPE)
diff --git a/shiny.spec b/shiny.spec
index 0126e80..a831594 100644
--- a/shiny.spec
+++ b/shiny.spec
@@ -1,6 +1,10 @@
%global commit f41178f82765828ac09f9f1da5bd28038c94311d
%global shortcommit %(c=%{commit}; echo ${c:0:7})
+# Manually set soversion. Each new release needs to be tested for ABI breakage
+# and the soversion incremented if breakage occurs.
+%global soversion 0
+
Name: shiny
Version: 0.2
Release: 1.git%{shortcommit}%{?dist}
@@ -10,6 +14,7 @@ License: MIT
URL: https://github.com/scrawl/shiny/
Source0: https://github.com/scrawl/shiny/archive/%{commit}/%{name}-%{version}-%{shortcommit}.zip
Patch0: 0001-build-shared-libraries.patch
+Patch1: shiny-cmake_fixes.patch
BuildRequires: cmake
BuildRequires: boost-devel
@@ -30,8 +35,13 @@ Development files for shader and material management library for OGRE.
%prep
%setup -q -n %{name}-%{commit}
%patch0 -p1 -b .shared
+%patch1 -p1 -b .cmake
mkdir build
+# Make soversion substitution in cmake config.
+sed -i "s/@SOVERSION@/%{soversion}/" CMakeLists.txt
+
+
%build
pushd build
%cmake ../
@@ -40,9 +50,7 @@ popd
%install
pushd build
- mkdir -p %{buildroot}%{_libdir}/OGRE/
- install -D -p -m 0755 lib%{name}.so %{buildroot}%{_libdir}/
- install -D -p -m 0755 lib%{name}.OgrePlatform.so %{buildroot}%{_libdir}/OGRE/
+ %make_install
mkdir -p %{buildroot}%{_includedir}/shiny/
for i in $(find ../ -type f -name *\.hpp -or -name *\.h); do
dir=$(echo $(dirname $i) | cut -c4-)
@@ -57,12 +65,17 @@ popd
%files
%doc License.txt Readme.txt
-%{_libdir}/lib%{name}.so
+%{_libdir}/lib%{name}.so.*
%{_libdir}/OGRE/lib%{name}.OgrePlatform.so
%files devel
%{_includedir}/shiny/
+%{_libdir}/lib%{name}.so
+
%changelog
+* Wed May 14 2014 Richard Shaw <hobbes1069 at gmail.com> - 0.2-2.gitf41178f
+- Add patch to set soversion, install targets, and linking with Boost.
+
* Wed May 14 2014 Igor Gnatenko <i.gnatenko.brain at gmail.com> - 0.2-1.gitf41178f
- Initial package
More information about the scm-commits
mailing list