commit d7d5a18364ef4878176fc83ee23434e9074ae272 Author: Jan Rękorajski <bagg...@pld-linux.org> Date: Sat Oct 28 23:43:20 2023 +0200
- new cxxflags.patch | 13 +++++++ fuzzylite.spec | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ libdir.patch | 11 ++++++ soname.patch | 20 +++++++++++ 4 files changed, 154 insertions(+) --- diff --git a/fuzzylite.spec b/fuzzylite.spec new file mode 100644 index 0000000..1d21cc5 --- /dev/null +++ b/fuzzylite.spec @@ -0,0 +1,110 @@ +# +# Conditional build: +%bcond_without static_libs # static libraries +# +Summary: A Fuzzy Logic Control Library in C++ +Name: fuzzylite +Version: 6.0 +Release: 0.1 +License: GPL v3 +Group: Libraries +Source0: https://github.com/fuzzylite/fuzzylite/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz +# Source0-md5: 34f3e1b27aa2abd9210b7d90f9d45785 +Patch0: cxxflags.patch +Patch1: soname.patch +Patch2: libdir.patch +URL: https://github.com/fuzzylite/fuzzylite/ +BuildRequires: cmake +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +The goal of the FuzzyLite Libraries is to easily design and +efficiently operate fuzzy logic controllers following an +object-oriented programming model without relying on external +libraries. + +%package common +Summary: Common files for %{name} library +Summary(pl.UTF-8): Wspólne pliki biblioteki %{name} +Group: Libraries +Requires: %{name} = %{version}-%{release} + +%description common +Common files for %{name} library. + +%description common -l pl.UTF-8 +Wspólne pliki biblioteki %{name}. + +%package devel +Summary: Header files for %{name} library +Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +Header files for %{name} library. + +%description devel -l pl.UTF-8 +Pliki nagłówkowe biblioteki %{name}. + +%package static +Summary: Static %{name} library +Summary(pl.UTF-8): Statyczna biblioteka %{name} +Group: Development/Libraries +Requires: %{name}-devel = %{version}-%{release} + +%description static +Static %{name} library. + +%description static -l pl.UTF-8 +Statyczna biblioteka %{name}. + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 + +%build +mkdir -p build +cd build +%cmake ../fuzzylite \ + %cmake_on_off static_libs FL_BUILD_STATIC \ + -DFL_BUILD_TESTS=NO + +%{__make} + +%install +rm -rf $RPM_BUILD_ROOT + +%{__make} -C build install \ + DESTDIR=$RPM_BUILD_ROOT + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(644,root,root,755) +%doc AUTHOR README.md THANKS +%attr(755,root,root) %{_libdir}/libfuzzylite.so.*.* +%attr(755,root,root) %ghost %{_libdir}/libfuzzylite.so.6 + +%files common +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/fuzzylite + +%files devel +%defattr(644,root,root,755) +%doc CHANGELOG NEWS +%attr(755,root,root) %{_libdir}/libfuzzylite.so +%{_includedir}/fl +%{_pkgconfigdir}/fuzzylite.pc + +%if %{with static_libs} +%files static +%defattr(644,root,root,755) +%{_libdir}/libfuzzylite.a +%endif diff --git a/cxxflags.patch b/cxxflags.patch new file mode 100644 index 0000000..1e442d3 --- /dev/null +++ b/cxxflags.patch @@ -0,0 +1,13 @@ +--- fuzzylite-6.0/fuzzylite/CMakeLists.txt~ 2017-03-26 11:40:17.000000000 +0200 ++++ fuzzylite-6.0/fuzzylite/CMakeLists.txt 2023-10-28 23:11:29.422539865 +0200 +@@ -72,10 +72,6 @@ + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY bin) + + if(NOT MSVC) +-#TODO: Remove -Werror before release. +-#Add Unix compilation flags +- set(CMAKE_CXX_FLAGS "-pedantic -Wall -Wextra -Werror ${CMAKE_CXX_FLAGS}") +- + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") + diff --git a/libdir.patch b/libdir.patch new file mode 100644 index 0000000..428ed49 --- /dev/null +++ b/libdir.patch @@ -0,0 +1,11 @@ +--- fuzzylite-6.0/fuzzylite/fuzzylite.pc.in~ 2017-03-26 11:40:17.000000000 +0200 ++++ fuzzylite-6.0/fuzzylite/fuzzylite.pc.in 2023-10-28 23:36:10.365687696 +0200 +@@ -1,7 +1,7 @@ + prefix=@CMAKE_INSTALL_PREFIX@ + exec_prefix=${prefix} + includedir=${exec_prefix}/include +-libdir=${exec_prefix}/lib ++libdir=@CMAKE_INSTALL_LIBDIR@ + + Name: fuzzylite + Description: A fuzzy logic control library in C++ diff --git a/soname.patch b/soname.patch new file mode 100644 index 0000000..f96886f --- /dev/null +++ b/soname.patch @@ -0,0 +1,20 @@ +--- fuzzylite-6.0/fuzzylite/CMakeLists.txt~ 2023-10-28 23:30:40.000000000 +0200 ++++ fuzzylite-6.0/fuzzylite/CMakeLists.txt 2023-10-28 23:31:30.337292953 +0200 +@@ -169,14 +169,14 @@ + set_target_properties(fl-shared PROPERTIES OUTPUT_NAME fuzzylite) + set_target_properties(fl-shared PROPERTIES DEBUG_POSTFIX -debug) + target_compile_definitions(fl-shared PRIVATE FL_EXPORT_LIBRARY) +- set_target_properties(fl-shared PROPERTIES VERSION 6.0) ++ set_target_properties(fl-shared PROPERTIES VERSION 6.0 SOVERSION 6) + target_link_libraries(fl-shared ${FL_LIBS}) + endif() + + if(FL_BUILD_STATIC) +- set_target_properties(fl-static PROPERTIES OUTPUT_NAME fuzzylite-static) ++ set_target_properties(fl-static PROPERTIES OUTPUT_NAME fuzzylite) + set_target_properties(fl-static PROPERTIES DEBUG_POSTFIX -debug) +- set_target_properties(fl-static PROPERTIES VERSION 6.0) ++ set_target_properties(fl-static PROPERTIES VERSION 6.0 SOVERSION 6) + target_link_libraries(fl-static ${FL_LIBS}) + endif() + ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/fuzzylite.git/commitdiff/d7d5a18364ef4878176fc83ee23434e9074ae272 _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit