[packages/nifticlib] - updated to 3.0.0 (note: new libznz soname)
qboosh
qboosh at pld-linux.org
Sat Apr 27 18:53:19 CEST 2024
commit 6fc1da2ad655bd92d5eccf10560763d52b16bf80
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Apr 27 18:28:43 2024 +0200
- updated to 3.0.0 (note: new libznz soname)
nifticlib-cmake.patch | 28 ++++++++++------------------
nifticlib-link.patch | 10 ----------
nifticlib.spec | 44 ++++++++++++++++++++++++++++++++------------
3 files changed, 42 insertions(+), 40 deletions(-)
---
diff --git a/nifticlib.spec b/nifticlib.spec
index 60810a6..3b59833 100644
--- a/nifticlib.spec
+++ b/nifticlib.spec
@@ -1,16 +1,18 @@
Summary: C I/O libraries for files in the nifti-1 data format
Summary(pl.UTF-8): Biblioteki C wejścia/wyjścia dla plików danych w formacie nifti-1
Name: nifticlib
-Version: 2.0.0
+Version: 3.0.0
Release: 1
License: Public Domain
Group: Libraries
-Source0: http://downloads.sourceforge.net/niftilib/%{name}-%{version}.tar.gz
-# Source0-md5: 425a711f8f92fb1e1f088cbc55bea53a
-Patch0: %{name}-link.patch
+#Source0Download: https://github.com/NIFTI-Imaging/nifti_clib/releases
+Source0: https://github.com/NIFTI-Imaging/nifti_clib/archive/v%{version}/nifti_clib-%{version}.tar.gz
+# Source0-md5: ee40068103775a181522166e435ee82d
Patch1: %{name}-cmake.patch
-URL: http://niftilib.sourceforge.net/
-BuildRequires: cmake
+URL: https://github.com/NIFTI-Imaging/nifti_clib
+BuildRequires: cmake >= 3.10.2
+BuildRequires: expat-devel
+BuildRequires: help2man
BuildRequires: zlib-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -45,14 +47,15 @@ Header files for niftilib C libraries.
Pliki nagłówkowe bibliotek C niftilib.
%prep
-%setup -q
-%patch0 -p1
+%setup -q -n nifti_clib-%{version}
%patch1 -p1
%build
install -d build
cd build
-%cmake ..
+%cmake .. \
+ -DDOWNLOAD_TEST_DATA=OFF
+
%{__make}
%install
@@ -61,6 +64,15 @@ rm -rf $RPM_BUILD_ROOT
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
+for f in nifti1_tool nifti_stats nifti_tool ; do
+ %{__mv} $RPM_BUILD_ROOT%{_mandir}/man1/${f}_manpage.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/${f}.1.gz
+done
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}
+%{__mv} $RPM_BUILD_ROOT%{_docdir}/NIFTI/examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+# packaged as %doc
+%{__rm} $RPM_BUILD_ROOT%{_docdir}/NIFTI/README.md
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -69,20 +81,28 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc LICENSE README Updates.txt
+%doc LICENSE README.md Updates.txt
+%attr(755,root,root) %{_bindir}/nifti1_tool
%attr(755,root,root) %{_bindir}/nifti_stats
%attr(755,root,root) %{_bindir}/nifti_tool
-%attr(755,root,root) %{_bindir}/nifti1_test
+%attr(755,root,root) %{_libdir}/libnifti2.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libnifti2.so.2
%attr(755,root,root) %{_libdir}/libnifticdf.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libnifticdf.so.2
%attr(755,root,root) %{_libdir}/libniftiio.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libniftiio.so.2
%attr(755,root,root) %{_libdir}/libznz.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libznz.so.2
+%attr(755,root,root) %ghost %{_libdir}/libznz.so.3
+%{_mandir}/man1/nifti1_tool.1*
+%{_mandir}/man1/nifti_stats.1*
+%{_mandir}/man1/nifti_tool.1*
%files devel
%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libnifti2.so
%attr(755,root,root) %{_libdir}/libnifticdf.so
%attr(755,root,root) %{_libdir}/libniftiio.so
%attr(755,root,root) %{_libdir}/libznz.so
%{_includedir}/nifti
+%{_datadir}/cmake/NIFTI
+%{_examplesdir}/%{name}-%{version}
diff --git a/nifticlib-cmake.patch b/nifticlib-cmake.patch
index c533e4e..54f4061 100644
--- a/nifticlib-cmake.patch
+++ b/nifticlib-cmake.patch
@@ -1,19 +1,11 @@
---- nifticlib-2.0.0/CMakeLists.txt.orig 2010-07-07 21:05:44.000000000 +0200
-+++ nifticlib-2.0.0/CMakeLists.txt 2018-12-23 15:32:48.339462174 +0100
-@@ -1,6 +1,6 @@
- #File Generated by Hans J. Johnson
- #Please contact hans-johnson at uiowa.edu for making enhancments/corrections
--PROJECT(NIFTI)
-+PROJECT(NIFTI C)
- # Configure Dart testing support.
- INCLUDE(${CMAKE_ROOT}/Modules/Dart.cmake)
+--- nifti_clib-3.0.0/CMakeLists.txt.orig 2024-04-27 17:42:15.648355337 +0200
++++ nifti_clib-3.0.0/CMakeLists.txt 2024-04-27 17:46:23.020348541 +0200
+@@ -69,7 +69,7 @@ if(BUILD_SHARED_LIBS AND NOT NIFTI_LIBRA
+ endif()
-@@ -46,7 +46,7 @@
- SET(NIFTI_LIBRARY_PROPERTIES VERSION ${NIFTI_SHAREDLIB_VERSION} SOVERSION ${NIFTI_SHAREDLIB_SOVERSION})
-
- SET(NIFTI_INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin")
-- SET(NIFTI_INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
-+ SET(NIFTI_INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
- SET(NIFTI_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include/nifti")
- SET(NIFTI_ZLIB_LIBRARIES ${ZLIB_LIBRARIES})
- SET(NIFTI_INSTALL_NO_DEVELOPMENT 0)
+ set_if_not_defined(NIFTI_INSTALL_RUNTIME_DIR bin)
+-set_if_not_defined(NIFTI_INSTALL_LIBRARY_DIR lib)
++set_if_not_defined(NIFTI_INSTALL_LIBRARY_DIR lib${LIB_SUFFIX})
+ set_if_not_defined(NIFTI_INSTALL_ARCHIVE_DIR ${NIFTI_INSTALL_LIBRARY_DIR})
+ set_if_not_defined(NIFTI_INSTALL_INCLUDE_DIR include/nifti)
+ set_if_not_defined(NIFTI_INSTALL_MAN_DIR share/man/man1)
diff --git a/nifticlib-link.patch b/nifticlib-link.patch
deleted file mode 100644
index 2c182dd..0000000
--- a/nifticlib-link.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- nifticlib-1.0.0/nifticdf/CMakeLists.txt.orig 2007-12-05 14:07:45.000000000 +0100
-+++ nifticlib-1.0.0/nifticdf/CMakeLists.txt 2008-01-20 15:39:43.600595839 +0100
-@@ -7,6 +7,7 @@
- SET(NIFTI_CDFLIB_NAME ${PACKAGE_PREFIX}nifticdf)
-
- ADD_LIBRARY(${NIFTI_CDFLIB_NAME} ${NIFTICDFLIB_SRC} )
-+TARGET_LINK_LIBRARIES( ${NIFTI_CDFLIB_NAME} m)
-
- IF (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES(${NIFTI_CDFLIB_NAME} PROPERTIES SOVERSION ${NIFTI_SHAREDLIB_SOVERSION} VERSION ${NIFTI_SHAREDLIB_VERSION})
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nifticlib.git/commitdiff/6fc1da2ad655bd92d5eccf10560763d52b16bf80
More information about the pld-cvs-commit
mailing list