# The source for this package was pulled from scidavis's vcs. # There hasn't been a 3.0.0 release yet, nor have the changes made in scidavis's liborigin been backported. # Use the following commands to generate the source package: # wget https://github.com/highperformancecoder/scidavis/archive/7c6e07dfad80dbe190af29ffa8a56c82a8aa9180/scidavis-7c6e07df.tar.gz # tar -xzf scidavis-7c6e07df.tar.gz # tar -cvJf liborigin3-3.0.0-7c6e07df.tar.xz -C scidavis-7c6e07dfad80dbe190af29ffa8a56c82a8aa9180/3rdparty/ liborigin %global upname liborigin %global major 3.0 %global commit 7c6e07dfad80dbe190af29ffa8a56c82a8aa9180 %global shortcommit %(c=%{commit}; echo ${c:0:8}) Name: %{upname}3 # The 3.0.0 release replaces previous versions of liborigin Version: %{major}.0 Release: 3.20170628git%{shortcommit}%{?dist} Summary: Library for reading OriginLab OPJ project files License: GPLv2 or GPLv3 URL: http://sourceforge.net/projects/liborigin/ #Source0: https://sourceforge.net/code-snapshots/git/l/li/%{upname}/git.git/%{upname}-git-%{snaphash}.zip #sourceforge.net repo not yet up to speed Source0: liborigin3-3.0.0-%{shortcommit}.tar.xz Patch0: whatamipatching.patch # No longer required #BuildRequires: boost-devel BuildRequires: cmake BuildRequires: doxygen Provides: liborigin = 20080225-18 Provides: liborigin2 = 2.0.0-12 Obsoletes: liborigin < 20080225-18 Obsoletes: liborigin2 < 2.0.0-12 %description A library for reading OriginLab OPJ project files. Compatibility package containing the newer version 3.0 %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Provides: liborigin-devel = 20080225-18 Provides: liborigin2-devel = 2.0.0-12 Obsoletes: liborigin-devel < 20080225-18 Obsoletes: liborigin2-devel < 2.0.0-12 %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package doc Summary: Documentation for %{name} BuildArch: noarch %description doc The %{name}-doc package contains documentation for %{name}. %prep %setup -q -n %{upname} %patch0 -p2 # Recode FORMAT to UTF-8 iconv -f ISO-8859-5 -t UTF-8 FORMAT > FORMAT.UTF8 touch -r FORMAT FORMAT.UTF8 mv FORMAT.UTF8 FORMAT %build # fix for hardcoded path of library location and avoid static lib sed -i "s|install(TARGETS origin origin-static DESTINATION lib)|install(TARGETS origin DESTINATION lib\${LIB_SUFFIX})|" CMakeLists.txt %cmake make %install %make_install # We need to move some files to avoid a conflict with liborigin mv %{buildroot}%{_includedir}/%{upname} %{buildroot}%{_includedir}/%{name} mv %{buildroot}%{_bindir}/opj2dat %{buildroot}%{_bindir}/opj2dat-3.0.0 mv %{buildroot}%{_docdir}/%{upname} %{buildroot}%{_docdir}/%{name} mv %{buildroot}%{_libdir}/liborigin.so %{buildroot}%{_libdir}/liborigin3.so find %{buildroot} -name '*.la' -exec rm -f {} ';' %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %doc README %license COPYING %{_libdir}/*.so.* %{_bindir}/opj2dat-3.0.0 %exclude %{_docdir}/%{name}/html # We have license in different location and FORMAT in -doc %exclude %{_docdir}/%{name}/COPYING %exclude %{_docdir}/%{name}/FORMAT %files devel %{_includedir}/* %{_libdir}/*.so %files doc %doc FORMAT README %license COPYING %dir %{_docdir}/%{name} %{_docdir}/%{name}/html/ %changelog * Wed Jun 28 2017 Alexander Ploumistos - 3.0.0-3.20170628git7c6e07df - Switch source to liborigin from scidavis * Fri Jun 23 2017 Alexander Ploumistos - 3.0.0-2.20170623git7ad5ff - New version with improvements for LabPlot * Mon May 22 2017 Alexander Ploumistos - 3.0.0-1.20170613git795457 - Initial release