# Detect the distribution in use %global __despace head -n 1 | tr -d '[:space:]' | sed -e 's/[(].*[)]//g' %global __lower4 cut -c 1-4 | tr '[:upper:]' '[:lower:]' %global __distfile %([ -f /etc/SuSE-release ] && echo /etc/SuSE-release || echo /etc/redhat-release) %global __distinit %(sed -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' %{__distfile} | %{__despace} | %{__lower4}) %global __distvers %(sed -e 's/.* release \\([^. ]*\\).*/\\1/' %{__distfile} | %{__despace}) # Identify Alma, CentOS, CentOS Stream and Rocky Linux as rhel %if "%{__distinit}" == "a" || "%{__distinit}" == "c" || "%{__distinit}" == "cl" || "%{__distinit}" == "cs" || "%{__distinit}" == "rl" %global __distinit rhel %endif # Dist tag for Fedora is still "fc" %if "%{__distinit}" == "f" %global __distinit fc %endif Summary: BW Whois is a modern whois client with a lot of features Name: bw-whois Version: 5.5.2 Release: 4.%{__distinit}%{__distvers} License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: http://whois.bw.org/ Source0: http://whois.bw.org/dist/whois-%{version}.tgz Patch0: whois-5.5.2-config.patch BuildArch: noarch BuildRequires: coreutils BuildRequires: perl-generators BuildRequires: perl(Fcntl) BuildRequires: perl(Getopt::Long) BuildRequires: perl(IO::File) BuildRequires: perl(IO::Pipe) BuildRequires: perl(IO::Socket) BuildRequires: perl(strict) BuildRequires: perl(subs) BuildRequires: perl(warnings) Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %description BW Whois is a whois client designed to work with the new "Shared Registration System" whois introduced 1 December 1999. This new system has proved to be remarkably disorganized and inconsistent, resulting in tremendous confusion for those of us who need to find the ownership of a domain now and then. %prep %setup -q -n whois-%{version} # Move config files from /etc/whois to /etc/bw-whois %patch0 %build %install install -d %{buildroot}%{_sysconfdir}/bw-whois/ install -d %{buildroot}%{_bindir}/ install -d %{buildroot}%{perl_vendorlib}/ install -d %{buildroot}%{_mandir}/man1/ install -p -m 755 whois %{buildroot}%{_bindir}/bw-whois install -p -m 644 whois.1 %{buildroot}%{_mandir}/man1/bw-whois.1 install -p -m 644 whois.conf %{buildroot}%{_sysconfdir}/bw-whois install -p -m 644 tld.conf %{buildroot}%{_sysconfdir}/bw-whois install -p -m 644 sd.conf %{buildroot}%{_sysconfdir}/bw-whois install -p -m 644 bwInclude.pm %{buildroot}%{perl_vendorlib} %files %license COPYRIGHT %doc DISCLAIMER HISTORY INSTALL README whois*.html whois.txt %doc create_whois*.sql whois.db %dir %{_sysconfdir}/bw-whois/ %config(noreplace) %{_sysconfdir}/bw-whois/tld.conf %config(noreplace) %{_sysconfdir}/bw-whois/whois.conf %config(noreplace) %{_sysconfdir}/bw-whois/sd.conf %{_bindir}/bw-whois %{_mandir}/man1/bw-whois.1* %{perl_vendorlib}/bwInclude.pm %changelog * Thu Jan 19 2023 Paul Howarth - 5.5.2-4 - Use SPDX-format license tag - Drop pointless use of %%{name} macro - Use %%license unconditionally * Mon Mar 19 2018 Paul Howarth - 5.5.2-3 - BR: perl-generators unconditionally - Drop legacy BuildRoot: and Group: tags - Drop explicit buildroot cleaning in %%install section - Drop explicit %%clean section * Wed Aug 3 2016 Paul Howarth - 5.5.2-2 - Specify all dependencies - Use %%license where possible - Drop %%defattr, redundant since rpm 4.4 - No longer need to define %%perl_vendorlib * Thu Aug 9 2012 Paul Howarth - 5.5.2-1 - Update to 5.5.2 - Fixed a problem where SQLite databases weren't expiring old records, caused by a misfeature in DBD::SQLite - Update config patch * Wed Oct 12 2011 Paul Howarth - 5.5.1-2 - Maintain timestamps where possible - Nobody else likes macros for commands - Fix dist tag for CentOS 6 and Scientific Linux * Fri Sep 17 2010 Paul Howarth - 5.5.1-1 - Update to 5.5.1 (create_whois*.sql included again) - Update config patch - Include COPYRIGHT * Fri Sep 17 2010 Paul Howarth - 5.5-1 - Update to 5.5 - General source code cleanup (used perltidy to reformat) - Fix race in calls to error() from loggit() if log file was not writable - Added support for SQLite3 - Minor updates to support changes in whois.arin.net and whois.denic.de - Update config patch - Include create_whois.sql from 5.0 release as it's not included in 5.5 * Fri Jun 25 2010 Paul Howarth - 5.0-6 - Rebuild for perl 5.12.1 in Rawhide * Fri May 7 2010 Paul Howarth - 5.0-5 - Fix dist tag to work with RHEL6 Beta * Thu Feb 25 2010 Paul Howarth - 5.0-4 - Clarify license as GPL (version 1 or later) or Artistic (i.e. same as perl) - Dist tag for Rawhide no longer needs special-casing * Mon Jun 4 2007 Paul Howarth - 5.0-3 - Fix dist tag for Fedora 7 onwards - Add intentionally empty %%build section * Tue Sep 12 2006 Paul Howarth - 5.0-2 - Fix dist tag for development builds * Thu Aug 10 2006 Paul Howarth - 5.0-1 - Update to 5.0 - Simplify distribution-detection - Remove buildroot unconditionally in %%clean and %%install - Use MODULE_COMPAT perl package version compatibility dependency - Update file locations patch - License is GPL or Artistic (same as perl), not just Artistic * Fri Apr 08 2005 Paul Howarth - 3.4-3 - Tidy up spec file * Thu Apr 15 2004 Paul Howarth - 3.4-2 - More macro tweaks to get better RPM names for different distributions * Fri Apr 02 2004 Paul Howarth - 3.4-1 - Tweak for building on Red Hat/Fedora * Tue Jan 28 2003 Oden Eriksson - 3.4-1mdk - 3.4 - Rediff P0 - Add some missing files * Thu Jan 16 2003 Oden Eriksson - 3.1-2mdk - Build release * Sun Jul 28 2002 Oden Eriksson - 3.1-1mdk - New version - Relocated configs to %%{_sysconfdir}/%%{name}/ - Added missing man page and config file - Misc spec file fixes * Tue Jul 16 2002 Pixel - 3.0-2mdk - Rebuild for new perl 5.8.0 - Move bwInclude.pm from vendorarch to vendorlib * Fri Mar 15 2002 Oden Eriksson - 3.0-1mdk - Initial cooker contrib (I wonder why it hasn't made it in here before?)