## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 4; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global srcname switchtec-user Name: switchtec Version: 3.1 Release: %autorelease Summary: Userspace code for the Microsemi PCIe switch License: MIT URL: https://github.com/Microsemi/switchtec-user Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz # cli: Fix format security warning Patch0: %{url}/pull/316.patch # build: Don't strip binary by default Patch1: %{url}/commit/fcd111e2ddc65102224144bf5388b1454f560ad3.patch # Fixes related to the max number of ports Patch2: %{url}/pull/320.patch BuildRequires: doxygen BuildRequires: graphviz BuildRequires: gcc BuildRequires: make BuildRequires: ncurses-devel BuildRequires: openssl-devel Suggests: bash-completions %description Easy to use CLI and C library for communicating with Microsemi's Switchtec management interface. %package libs Summary: Shared Libraries for %{name} %description libs This package contains shared libraries for %{name}. %package devel Summary: Development headers and libraries for %{name} Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description devel This package contains development headers and libraries for %{name}. %package doc Summary: Documentation for %{name} BuildArch: noarch %description doc This package contains additional documentation for %{name}. %prep %autosetup -n %{srcname}-%{version} -p1 %build %configure # https://bugzilla.redhat.com/show_bug.cgi?id=2057636 %ifarch s390x %make_build WINDRES= %else %make_build %endif %make_build -C doc %install %make_install \ PREFIX="%{_prefix}" \ LIBDIR="%{buildroot}%{_libdir}" \ %ifarch s390x WINDRES= \ %endif LDCONFIG=/bin/true # Relocate bash completion config install -Dpm0644 -t %{buildroot}%{_datadir}/bash-completion/completions \ %{buildroot}%{_sysconfdir}/bash_completion.d/%{name} rm -r %{buildroot}%{_sysconfdir} # We don't want static libraries rm %{buildroot}%{_libdir}/*.a %files %license LICENSE %doc README.md %{_bindir}/%{name} %dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion/completions %{_datadir}/bash-completion/completions/%{name} %files libs %license LICENSE %{_libdir}/lib%{name}.so.3* %files devel %{_includedir}/%{name} %{_libdir}/lib%{name}.so %files doc %license LICENSE %doc doc/doxygen/html %changelog * Mon Sep 05 2022 Davide Cavalca 3.1-4 - Use numbered patches as epel8 does not support unnumbered ones * Mon Sep 05 2022 Davide Cavalca 3.1-3 - Backport two upstream bugfixes * Sat Jul 23 2022 Fedora Release Engineering 3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Wed Jun 29 2022 Davide Cavalca 3.1-1 - Initial import; Fixes: RHBZ#2057654