%define name fann %define major 2 %define minor 2.0 %define version %major.%minor %define libname %mklibname %name %major %define devname %mklibname %name -d %define obsname %mklibname %name Name: %name Summary: Fast artificial neural networks library Group: System/Libraries Version: %version Release: %mkrel 5 License: LGPLv2+ URL: http://fann.sourceforge.net/ Source0: http://sourceforge.net/projects/fann/files/fann/%{version}/FANN-%{version}-Source.zip Patch0: fann-%{version}-pkgconfig.patch BuildRequires: cmake %description Fast Artificial Neural Network (FANN) library is a free open source neural network library. %prep %setup -n FANN-%{version}-Source -q %patch0 -p1 %build export CFLAGS=-lm %cmake -DPKGCONFIG_INSTALL_DIR=/%{_libdir}/pkgconfig %make %install %{makeinstall_std} -C build #------------------------------------------------------------------------------ %package -n %libname Summary: Fast artificial neural networks development library Group: System/Libraries Obsoletes: %obsname <= 2.2.0 %description -n %libname Fast Artificial Neural Network (FANN) library is a free open source neural network library which implements multilayer artificial neural networks in C with support for both fully connected and sparsely connected networks. %files -n %libname %{_libdir}/*.so.%{major} %{_libdir}/*.so.%{major}.* #------------------------------------------------------------------------------ %package -n %devname Summary: Fast artificial neural networks development library Group: Development/C Requires: %libname = %version-%release %description -n %devname Development files for Fast Artificial Neural Network (FANN) library. This package is only needed if you intend to develop and/or compile programs based on the FANN library. %files -n %devname %{_libdir}/*.so %{_libdir}/pkgconfig/fann.pc %{_includedir}/*.h %changelog * Wed Oct 15 2014 umeabot <umeabot> 2.2.0-5.mga5 + Revision: 744310 - Second Mageia 5 Mass Rebuild * Sat Oct 04 2014 filipesaraiva <filipesaraiva> 2.2.0-4.mga5 + Revision: 736719 - Fix Obsoletes; - Release increment; * Sat Oct 04 2014 filipesaraiva <filipesaraiva> 2.2.0-3.mga5 + Revision: 736715 - Using correct name of library package; * Tue Sep 16 2014 umeabot <umeabot> 2.2.0-2.mga5 + Revision: 679089 - Mageia 5 Mass Rebuild * Sat Feb 15 2014 filipesaraiva <filipesaraiva> 2.2.0-1.mga5 + Revision: 592440 - Added group for fann - imported package fann