From c9a99b96fd761ee7b419c837ae39d576921e541baf6b7a68c2276f15ebf2d7b0 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 16 Jun 2025 13:23:38 +0000 Subject: [PATCH] - Name devel packages simply off the SRPM name (libfann-devel -> fann-devel). - Specfile modernization. OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/fann?expand=0&rev=13 --- .gitattributes | 23 ++++++++ .gitignore | 1 + FANN-2.2.0-Source.zip | 3 + fann.changes | 61 ++++++++++++++++++++ fann.spec | 102 +++++++++++++++++++++++++++++++++ fix-cmake-link-libraries.patch | 46 +++++++++++++++ 6 files changed, 236 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 FANN-2.2.0-Source.zip create mode 100644 fann.changes create mode 100644 fann.spec create mode 100644 fix-cmake-link-libraries.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/FANN-2.2.0-Source.zip b/FANN-2.2.0-Source.zip new file mode 100644 index 0000000..616ac1b --- /dev/null +++ b/FANN-2.2.0-Source.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:434b85fce60701c4e0066c442d60110d8e649f278e4edb814f0c0e7a1e0929fd +size 2285087 diff --git a/fann.changes b/fann.changes new file mode 100644 index 0000000..5148c0b --- /dev/null +++ b/fann.changes @@ -0,0 +1,61 @@ +------------------------------------------------------------------- +Fri Jun 13 07:08:24 UTC 2025 - Jan Engelhardt + +- Name devel packages simply off the SRPM name + (libfann-devel -> fann-devel). +- Specfile modernization. + +------------------------------------------------------------------- +Mon Feb 26 08:18:22 UTC 2024 - Dominique Leuenberger + +- Use %autosetup macro. Allows to eliminate the usage of deprecated + PatchN. + +------------------------------------------------------------------- +Sat Oct 22 17:16:21 UTC 2016 - jengelh@inai.de + +- Update descriptions, summaries and license field + +------------------------------------------------------------------- +Tue Nov 3 01:59:05 UTC 2015 - rpm@fthiessen.de + +- Fixed spec file: + * Use cmake macro + * Some cleanup + * Updated URL (new website) +- Added fix-cmake-link-libraries.patch to fix build. + * This will add libm to the linker flags and install pkgconfig + file in lib(64)/pkgconfig + +------------------------------------------------------------------- +Wed May 27 09:44:56 UTC 2015 - coolo@suse.com + +- update to 2.2 + Added Sarprop training + Added fann_create_train for creating an empty training data struct + Added fann_copy for copying an ANN + Added cascade_min_out_epochs and cascade_min_cand_epochs to improve cascade training + Added extra checks when training, to ensure that data and network input and output sizes matches + Added Visual Studio 2010 solution + Added support for 64bit architecture + Cleanup in sources + +------------------------------------------------------------------- +Sun Feb 5 20:10:59 UTC 2012 - jengelh@medozas.de + +- Remove redundant tags/sections +- Parallel build with %_smp_mflags +- Add autotools BuildRequires for factory/12.2 +- Ensure pkgconfig symbols are provided + +------------------------------------------------------------------- +Mon Jun 4 00:05:53 UTC 2007 - judas_iscariote@shorewall.net + +-adapt to the new library package policy as well. + +------------------------------------------------------------------- +Tue Apr 17 03:33:33 UTC 2007 - judas_iscariote@shorewall.net + +- update to version fann-2.1.0.snap20070416 solving several problems +see the vendor site for more info. + diff --git a/fann.spec b/fann.spec new file mode 100644 index 0000000..d51f87f --- /dev/null +++ b/fann.spec @@ -0,0 +1,102 @@ +# +# spec file for package fann +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: fann +Version: 2.2.0 +Release: 0 +Summary: Artificial neural network library +License: LGPL-2.1-or-later +Group: Development/Libraries/C and C++ +URL: http://leenissen.dk/fann/wp/ +Source: http://downloads.sourceforge.net/project/fann/fann/%{version}/FANN-%{version}-Source.zip +Patch0: fix-cmake-link-libraries.patch +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: pkgconfig +BuildRequires: unzip + +%description +FANN is a neural network library which implements multilayer +artificial neural networks in C with support for both fully connected +and sparsely connected networks. Execution in both fixed and floating +point are supported. It includes a framework for easy handling of +training data sets. + +%package -n libfann2 +Summary: Artificial neural network library +Group: System/Libraries + +%description -n libfann2 +FANN is a neural network library which implements multilayer +artificial neural networks in C with support for both fully connected +and sparsely connected networks. Execution in both fixed and floating +point are supported. It includes a framework for easy handling of +training data sets. + +%package devel +Summary: Development package for fann, an artificial neural network library +Group: Development/Libraries/C and C++ +Requires: glibc-devel +Requires: libfann2 = %{version} +Requires: libstdc++-devel +Provides: libfann-devel = %{version}-%{release} +Obsoletes: libfann-devel < %{version}-%{release} + +%description devel +FANN is a neural network library which implements multilayer +artificial neural networks in C with support for both fully connected +and sparsely connected networks. + +This subpackage contains the headers for FANN. + +%prep +%autosetup -p1 -n FANN-%{version}-Source + +perl -pi -e "s| -L[^ ']*||g" *.pc.* +sed -i 's/\r//g' COPYING.txt + +%build +%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo + +%install +cd build +make DESTDIR=%{buildroot} install %{?_smp_mflags} + +%ldconfig_scriptlets -n libfann2 + +%files -n libfann2 +%{_libdir}/libfloatfann.so.2* +%{_libdir}/libdoublefann.so.2* +%{_libdir}/libfixedfann.so.2* +%{_libdir}/libfann.so.2* + +%files devel +%license COPYING.txt +%doc README.txt +%{_libdir}/libfloatfann.so +%{_libdir}/libdoublefann.so +%{_libdir}/libfixedfann.so +%{_libdir}/libfann.so +%{_includedir}/compat_time.h +%{_includedir}/doublefann.h +%{_includedir}/fann*.h +%{_includedir}/fixedfann.h +%{_includedir}/floatfann.h +%{_libdir}/pkgconfig/fann.pc + +%changelog diff --git a/fix-cmake-link-libraries.patch b/fix-cmake-link-libraries.patch new file mode 100644 index 0000000..e0d25ed --- /dev/null +++ b/fix-cmake-link-libraries.patch @@ -0,0 +1,46 @@ +diff -Nur FANN-2.2.0-Source/CMakeLists.txt FANN-2.2.0-Source-new/CMakeLists.txt +--- FANN-2.2.0-Source/CMakeLists.txt 2012-01-24 06:31:40.000000000 +0100 ++++ FANN-2.2.0-Source-new/CMakeLists.txt 2015-11-03 02:32:40.583341093 +0100 +@@ -16,7 +16,7 @@ + + configure_file( ${CMAKE_SOURCE_DIR}/cmake/fann.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/fann.pc @ONLY ) + +-SET(PKGCONFIG_INSTALL_DIR /lib/pkgconfig) ++SET(PKGCONFIG_INSTALL_DIR /lib${LIB_SUFFIX}/pkgconfig) + + ########### install files ############### + +diff -Nur FANN-2.2.0-Source/src/CMakeLists.txt FANN-2.2.0-Source-new/src/CMakeLists.txt +--- FANN-2.2.0-Source/src/CMakeLists.txt 2012-01-24 06:31:40.000000000 +0100 ++++ FANN-2.2.0-Source-new/src/CMakeLists.txt 2015-11-03 02:36:14.472334773 +0100 +@@ -11,6 +11,7 @@ + ADD_LIBRARY(floatfann SHARED ${floatfann_LIB_SRCS}) + + SET_TARGET_PROPERTIES(floatfann PROPERTIES VERSION ${VERSION} SOVERSION 2 ) ++TARGET_LINK_LIBRARIES(floatfann m) + INSTALL(TARGETS floatfann DESTINATION ${LIB_INSTALL_DIR} ) + + +@@ -23,6 +24,7 @@ + ADD_LIBRARY(doublefann SHARED ${doublefann_LIB_SRCS}) + + SET_TARGET_PROPERTIES(doublefann PROPERTIES VERSION ${VERSION} SOVERSION 2 ) ++TARGET_LINK_LIBRARIES(doublefann m) + INSTALL(TARGETS doublefann DESTINATION ${LIB_INSTALL_DIR} ) + + +@@ -35,6 +37,7 @@ + ADD_LIBRARY(fixedfann SHARED ${fixedfann_LIB_SRCS}) + + SET_TARGET_PROPERTIES(fixedfann PROPERTIES VERSION ${VERSION} SOVERSION 2 ) ++TARGET_LINK_LIBRARIES(fixedfann m) + INSTALL(TARGETS fixedfann DESTINATION ${LIB_INSTALL_DIR} ) + + +@@ -47,5 +50,6 @@ + ADD_LIBRARY(fann SHARED ${fann_LIB_SRCS}) + + SET_TARGET_PROPERTIES(fann PROPERTIES VERSION ${VERSION} SOVERSION 2 ) ++TARGET_LINK_LIBRARIES(fann m) + INSTALL(TARGETS fann DESTINATION ${LIB_INSTALL_DIR} ) +