From da221a791126c4d3ed216ef46e0e13e3edaa327e Mon Sep 17 00:00:00 2001 From: Alexander Ploumistos Date: Nov 24 2018 13:33:24 +0000 Subject: Build opj2dat against shared library - patch by Miquel Garriga Move unversioned shared library to devel subpackage --- diff --git a/liborigin-use-shared-lib-to-link-opj2dat.patch b/liborigin-use-shared-lib-to-link-opj2dat.patch new file mode 100644 index 0000000..b05cc6f --- /dev/null +++ b/liborigin-use-shared-lib-to-link-opj2dat.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 17c613b..18b7aee 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -78,8 +78,12 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liborigin.pc DESTINATION lib${LIB_SUFF + + # command line util + add_executable(opj2dat opj2dat.cpp) +-target_link_libraries (opj2dat origin-static) ++target_link_libraries (opj2dat origin) + ++add_executable(opj2dat-static opj2dat.cpp) ++target_link_libraries (opj2dat-static origin-static) ++ ++install(PROGRAMS opj2dat-static RENAME opj2dat DESTINATION bin OPTIONAL) + install(TARGETS opj2dat DESTINATION bin OPTIONAL) + + # documentation diff --git a/liborigin.spec b/liborigin.spec index 1de288d..a9c5d03 100644 --- a/liborigin.spec +++ b/liborigin.spec @@ -1,6 +1,6 @@ Name: liborigin Version: 3.0.0 -Release: 2%{?dist} +Release: 3%{?dist} Epoch: 1 Summary: Library for reading OriginLab OPJ project files @@ -8,6 +8,7 @@ License: GPLv3 URL: https://sourceforge.net/projects/liborigin/ Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Patch0: liborigin-remove-exit-calls.patch +Patch1: liborigin-use-shared-lib-to-link-opj2dat.patch # No longer required #BuildRequires: boost-devel @@ -41,6 +42,7 @@ The %{name}-doc package contains documentation for %{name}. %prep %setup -q -n %{name}-%{version} %patch0 -p1 +%patch1 -p1 %build %cmake @@ -48,14 +50,13 @@ make origin opj2dat doc %install %make_install -find %{buildroot} -name '*.la' -exec rm -f {} ';' %ldconfig_scriptlets %files %doc README %license COPYING -%{_libdir}/* +%{_libdir}/%{name}.so.3* %{_bindir}/opj2dat %exclude %{_docdir}/%{name}/html # We have license in different location and FORMAT in -doc @@ -64,6 +65,8 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %files devel %{_includedir}/%{name}/ +%{_libdir}/%{name}.so +%{_libdir}/pkgconfig/%{name}.pc %files doc %doc FORMAT README @@ -71,6 +74,10 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %{_docdir}/%{name}/html/ %changelog +* Fri Nov 23 2018 Alexander Ploumistos - 1:3.0.0-3 +- Build opj2dat against shared library - patch by Miquel Garriga +- Move unversioned shared library to devel subpackage + * Wed Nov 21 2018 Alexander Ploumistos - 1:3.0.0-2 - Disable static library generation - Add patch for exit calls - bug #24, patch by Miquel Garriga