Summary: High performance search for IP addresses and CIDR ranges Name: grepcidr3 Version: 3.0 Release: 1%{?dist} License: BSD-2-Clause AND GPL-2.0-or-later URL: https://github.com/jrlevine/grepcidr3 Source0: https://github.com/jrlevine/grepcidr3/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc BuildRequires: make %description The grepcidr3 utility can be used to filter a list of IP addresses against one or more Classless Inter-Domain Routing (CIDR) specifications, or also arbitrary networks specified by an address range. As with grep, there are options to invert matching and load patterns from a file. It is capable of comparing thousands or even millions of IPs to networks with little memory usage and in reasonable computation time. %prep %setup -q sed -e 's/install /$(INSTALL) /' -i Makefile # Rename from grepcidr to grepcidr3 due to installation as # grepcidr3 (to avoid conflict with grepcidr RPM package) sed \ -e 's/grepcidr\([ \\]\)/%{name}\1/g' \ -e 's/GREPCIDR/GREPCIDR3/g' \ -i grepcidr.c grepcidr.1 README touch -c -r ChangeLog grepcidr.c grepcidr.1 %build %make_build CFLAGS="$RPM_OPT_FLAGS $RPM_LD_FLAGS" %install %make_install \ INSTALL='install -D -p' \ INSTALLDIR_BIN="$RPM_BUILD_ROOT%{_bindir}/%{name}" \ INSTALLDIR_MAN="$RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1" %files %license COPYING LICENSE %doc ChangeLog README %{_bindir}/%{name} %{_mandir}/man1/%{name}.1* %changelog * Mon Sep 23 2024 Robert Scheck 3.0-1 - Upgrade to 3.0 (#2314288) - Initial spec file for Fedora and Red Hat Enterprise Linux