a65de6
# Package mkpasswd tool
21c39d
%{bcond_without whois_enables_mkpasswd}
231243
# Add IDN support
231243
%{bcond_without whois_enables_idn}
86deed
# Use libidn2 instead of libidn
86deed
%{bcond_without whois_enables_libidn2}
231243
1691f4
Name:       whois       
3b668b
Version:    5.5.6
2c9995
Release:    1%{?dist}
1691f4
Summary:    Improved WHOIS client
1691f4
License:    GPLv2+
1691f4
URL:        http://www.linux.it/~md/software/
bb9043
Source0:    http://ftp.debian.org/debian/pool/main/w/%{name}/%{name}_%{version}.tar.xz
a2dec0
BuildRequires:  coreutils
a2dec0
BuildRequires:  gcc
7851d9
BuildRequires:  gettext
231243
%if %{with whois_enables_idn}
231243
%if %{with whois_enables_libidn2}
03fe09
BuildRequires:  pkgconfig(libidn2) >= 2.0.3
231243
%else
03fe09
BuildRequires:  pkgconfig(libidn)
03fe09
BuildConflicts: pkgconfig(libidn2)
231243
%endif
03fe09
%else
03fe09
BuildConflicts: pkgconfig(libidn)
03fe09
BuildConflicts: pkgconfig(libidn2)
231243
%endif
d906de
%if %{with whois_enables_mkpasswd} && ! ( 0%{?fedora} < 28)
d906de
BuildRequires:  pkgconfig(libcrypt)
d906de
BuildRequires:  pkgconfig(libxcrypt) >= 4.1
d906de
%endif
a2dec0
BuildRequires:  make
19471f
BuildRequires:  perl-interpreter
64d0db
BuildRequires:  perl(autodie)
7851d9
BuildRequires:  perl(strict)
7851d9
BuildRequires:  perl(warnings)
1691f4
Requires(post): %{_sbindir}/update-alternatives
1691f4
Requires(postun): %{_sbindir}/update-alternatives
21c39d
Requires:   whois-nls = %{version}-%{release}
1691f4
282a50
%global genname whois
282a50
%global alternative md
282a50
%global cfgfile %{name}.conf
1691f4
1691f4
%description
1691f4
Searches for an object in a RFC 3912 database.
1691f4
1691f4
This version of the WHOIS client tries to guess the right server to ask for
1691f4
the specified object. If no guess can be made it will connect to
1691f4
whois.networksolutions.com for NIC handles or whois.arin.net for IPv4
1691f4
addresses and network names.
1691f4
21c39d
%if %{with whois_enables_mkpasswd}
391692
%package -n mkpasswd
21c39d
Summary:    Encrypt a password with crypt(3) function using a salt
6325ae
# /usr/bin/mkpasswd was provided by "expect" package, bug #1649426
391692
Conflicts:  expect < 5.45.4-8.fc30
21c39d
Requires:   whois-nls = %{version}-%{release}
6325ae
# whois-mkpasswd package renamed to mkpasswd in 5.4.0-2.fc30, bug #1649426
391692
Obsoletes:  whois-mkpasswd <= 5.4.0-1.fc30
24160a
# but we continued upgrading whois in Fedoras < 30 without the rename
1a5f2a
Obsoletes:  whois-mkpasswd <= 5.5.3-1.fc29
391692
Provides:   whois-mkpasswd = %{version}-%{release}
21c39d
391692
%description -n mkpasswd
21c39d
mkpasswd tool encrypts a given password with the crypt(3) libc function
21c39d
using a given salt.
21c39d
%endif
21c39d
21c39d
# The same gettext catalogs are used by whois tool and mkpasswd tool. But we
21c39d
# want to have the tools installable independently.
21c39d
%package nls
21c39d
Summary:    Gettext catalogs for whois tools
21c39d
Conflicts:  whois < 5.3.2-2
21c39d
BuildArch:  noarch
21c39d
21c39d
%description nls
21c39d
whois tools messages translated into different natural languages.
21c39d
1691f4
%prep
d01190
%setup -q -n %{name}
1691f4
1691f4
%build
4d5a12
%{make_build} CONFIG_FILE="%{_sysconfdir}/%{cfgfile}" \
231243
    HAVE_ICONV=1 \
4d5a12
    CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="%{__global_ldflags}"
1691f4
1691f4
%install
21c39d
%if %{with whois_enables_mkpasswd}
21c39d
make install-mkpasswd install-pos BASEDIR=$RPM_BUILD_ROOT
21c39d
%endif
21c39d
make install-whois install-pos BASEDIR=$RPM_BUILD_ROOT
1691f4
install -p -m644 -D %{cfgfile} $RPM_BUILD_ROOT%{_sysconfdir}/%{cfgfile}
1691f4
%find_lang %{name}
1691f4
1691f4
# Rename to alternative names
1691f4
mv $RPM_BUILD_ROOT%{_bindir}/%{name}{,.%{alternative}}
1691f4
touch $RPM_BUILD_ROOT%{_bindir}/%{name}
1691f4
chmod 755 $RPM_BUILD_ROOT%{_bindir}/%{name}
1691f4
mv $RPM_BUILD_ROOT%{_mandir}/man1/%{name}{,.%{alternative}}.1
1691f4
touch $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
1691f4
1691f4
%post
1691f4
%{_sbindir}/update-alternatives \
1691f4
    --install %{_bindir}/%{name} \
1691f4
        %{genname} %{_bindir}/%{name}.%{alternative} 30 \
1691f4
    --slave %{_mandir}/man1/%{name}.1.gz \
1691f4
        %{genname}-man %{_mandir}/man1/%{name}.%{alternative}.1.gz 
1691f4
1691f4
%postun
1691f4
if [ $1 -eq 0 ] ; then
1691f4
    %{_sbindir}/update-alternatives --remove \
1691f4
        %{genname} %{_bindir}/%{name}.%{alternative}
1691f4
fi
1691f4
21c39d
%files
409496
%license COPYING debian/copyright
409496
%doc README debian/changelog
1691f4
%config(noreplace) %{_sysconfdir}/%{cfgfile}
1691f4
%{_bindir}/%{name}.%{alternative}
cb5030
%ghost %{_bindir}/%{name}
1691f4
%{_mandir}/man1/%{name}.%{alternative}.*
cb5030
%ghost %{_mandir}/man1/%{name}.1.gz
cb5030
%{_mandir}/man5/%{cfgfile}.5.*
1691f4
21c39d
%files nls -f %{name}.lang
21c39d
21c39d
%if %{with whois_enables_mkpasswd}
391692
%files -n mkpasswd
21c39d
%license COPYING debian/copyright
21c39d
%doc README debian/changelog
21c39d
%{_bindir}/mkpasswd
21c39d
%{_mandir}/man1/mkpasswd.*
21c39d
%endif
21c39d
1691f4
%changelog
3b668b
* Mon Feb 17 2020 Petr Pisar <ppisar@redhat.com> - 5.5.6-1
3b668b
- 5.5.6 bump
3b668b
2c9995
* Thu Jan 23 2020 Petr Pisar <ppisar@redhat.com> - 5.5.5-1
2c9995
- 5.5.5 bump
2c9995
d27657
* Wed Jan 15 2020 Petr Pisar <ppisar@redhat.com> - 5.5.4-2
d27657
- Fix hiding legal strings on at. subdomains (bug #1791035)
d27657
24160a
* Fri Jan 03 2020 Petr Pisar <ppisar@redhat.com> - 5.5.4-1
24160a
- 5.5.4 bump
24160a
1a5f2a
* Mon Nov 18 2019 Petr Pisar <ppisar@redhat.com> - 5.5.3-1
1a5f2a
- 5.5.3 bump
1a5f2a
5b271c
* Tue Oct 29 2019 Petr Pisar <ppisar@redhat.com> - 5.5.2-2
5b271c
- Adjusts obsoletance for whois-mkpasswd-5.5.2 (bug #1684112)
5b271c
697335
* Thu Oct 03 2019 Jitka Plesnikova <jplesnik@redhat.com> - 5.5.2-1
697335
- 5.5.2 bump
697335
d01190
* Mon Aug 19 2019 Petr Pisar <ppisar@redhat.com> - 5.5.1-1
d01190
- 5.5.1 bump
d01190
f009dd
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.5.0-2
f009dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
f009dd
f47b4e
* Tue Jul 23 2019 Petr Pisar <ppisar@redhat.com> - 5.5.0-1
f47b4e
- 5.5.0 bump
f47b4e
4d5a12
* Thu Jun 13 2019 Petr Pisar <ppisar@redhat.com> - 5.4.3-1
4d5a12
- 5.4.3 bump
4d5a12
cb5030
* Wed Apr 24 2019 Petr Pisar <ppisar@redhat.com> - 5.4.2-2
cb5030
- Modernize spec file
cb5030
6064e3
* Thu Mar 28 2019 Petr Pisar <ppisar@redhat.com> - 5.4.2-1
6064e3
- 5.4.2 bump
6064e3
6325ae
* Tue Feb 26 2019 Petr Pisar <ppisar@redhat.com> - 5.4.1-3
6325ae
- Adjust whois-mkpasswd obsoleteness to 5.4.1 rebase (bug #1649426)
6325ae
03c52c
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.1-2
03c52c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
03c52c
992e1b
* Mon Jan 28 2019 Petr Pisar <ppisar@redhat.com> - 5.4.1-1
992e1b
- 5.4.1 bump
992e1b
0fde4e
* Mon Jan 14 2019 Bjรถrn Esser <besser82@fedoraproject.org> - 5.4.0-3
0fde4e
- Rebuilt for libcrypt.so.2 (#1666033)
0fde4e
391692
* Mon Nov 26 2018 Petr Pisar <ppisar@redhat.com> - 5.4.0-2
391692
- Rename whois-mkpasswd package to mkpasswd (bug #1649456)
391692
d906de
* Wed Nov 14 2018 Petr Pisar <ppisar@redhat.com> - 5.4.0-1
d906de
- 5.4.0 bump
d906de
21c39d
* Tue Nov 13 2018 Petr Pisar <ppisar@redhat.com> - 5.3.2-2
a65de6
- Package mkpasswd tool into whois-mkpasswd package (bug #1649426)
21c39d
551e3a
* Mon Jul 16 2018 Petr Pisar <ppisar@redhat.com> - 5.3.2-1
551e3a
- 5.3.2 bump
551e3a
055ac7
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.1-2
055ac7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
055ac7
d2420d
* Fri May 25 2018 Petr Pisar <ppisar@redhat.com> - 5.3.1-1
d2420d
- 5.3.1 bump
d2420d
cefb81
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.0-2
cefb81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
cefb81
03a2a5
* Wed Jan 24 2018 Petr Pisar <ppisar@redhat.com> - 5.3.0-1
03a2a5
- 5.3.0 bump
03a2a5
91ea8e
* Tue Jan 02 2018 Petr Pisar <ppisar@redhat.com> - 5.2.20-1
91ea8e
- 5.2.20 bump
91ea8e
20887a
* Mon Dec 11 2017 Petr Pisar <ppisar@redhat.com> - 5.2.19-1
20887a
- 5.2.19 bump
20887a
03fe09
* Wed Aug 23 2017 Petr Pisar <ppisar@redhat.com> - 5.2.18-1
03fe09
- 5.2.18 bump
03fe09
f217ea
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.17-2
f217ea
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
f217ea
15b6d6
* Fri Jul 28 2017 Petr Pisar <ppisar@redhat.com> - 5.2.17-1
15b6d6
- 5.2.17 bump
15b6d6
114ffd
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.16-2
114ffd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
114ffd
337ef0
* Tue Jun 13 2017 Petr Pisar <ppisar@redhat.com> - 5.2.16-1
337ef0
- 5.2.16 bump
337ef0
86deed
* Wed Apr 26 2017 Petr Pisar <ppisar@redhat.com> - 5.2.15-2
86deed
- Use libidn2 instead of libidn
86deed
282a50
* Mon Feb 27 2017 Petr Pisar <ppisar@redhat.com> - 5.2.15-1
990b51
- 5.2.15 bump
282a50
1444bf
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.14-2
1444bf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
1444bf
96c1e7
* Mon Jan 02 2017 Petr Pisar <ppisar@redhat.com> - 5.2.14-1
96c1e7
- 5.2.14 bump
96c1e7
048979
* Mon Oct 31 2016 Petr Pisar <ppisar@redhat.com> - 5.2.13-1
048979
- 5.2.13 bump
048979
1a1820
* Tue Mar 29 2016 Petr Pisar <ppisar@redhat.com> - 5.2.12-1
1a1820
- 5.2.12 bump
1a1820
b58b1c
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.11-3
b58b1c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
b58b1c
438d88
* Wed Dec 09 2015 Petr Pisar <ppisar@redhat.com> - 5.2.11-2
438d88
- Pass linker flags properly
438d88
ab6357
* Tue Dec 08 2015 Petr Pisar <ppisar@redhat.com> - 5.2.11-1
ab6357
- 5.2.11 bump
ab6357
a09b68
* Thu Jul 30 2015 Petr Pisar <ppisar@redhat.com> - 5.2.10-1
a09b68
- 5.2.10 bump
a09b68
5409f4
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2.9-2
5409f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
5409f4
a2dec0
* Tue Jun 09 2015 Petr Pisar <ppisar@redhat.com> - 5.2.9-1
a2dec0
- 5.2.9 bump
a2dec0
30609c
* Tue May 19 2015 Petr Pisar <ppisar@redhat.com> - 5.2.8-1
30609c
- 5.2.8 bump
30609c
487a25
* Fri Mar 27 2015 Petr Pisar <ppisar@redhat.com> - 5.2.7-1
487a25
- 5.2.7 bump
487a25
f1bf80
* Tue Mar 24 2015 Petr Pisar <ppisar@redhat.com> - 5.2.6-2
f1bf80
- Fix a regression in hiding disclaimers
f1bf80
eb263b
* Tue Mar 24 2015 Petr Pisar <ppisar@redhat.com> - 5.2.6-1
eb263b
- 5.2.6 bump
eb263b
55a6e7
* Tue Mar 03 2015 Petr Pisar <ppisar@redhat.com> - 5.2.5-1
55a6e7
- 5.2.5 bump
55a6e7
409496
* Mon Feb 02 2015 Petr Pisar <ppisar@redhat.com> - 5.2.4-1
409496
- 5.2.4 bump
409496
233003
* Mon Jan 05 2015 Petr Pisar <ppisar@redhat.com> - 5.2.3-1
233003
- 5.2.3 bump
233003
78e90e
* Thu Nov 13 2014 Petr Pisar <ppisar@redhat.com> - 5.2.2-1
78e90e
- 5.2.2 bump
78e90e
62702d
* Fri Oct 17 2014 Petr Pisar <ppisar@redhat.com> - 5.2.1-1
62702d
- 5.2.1 bump
62702d
8de280
* Fri Sep 19 2014 Petr Pisar <ppisar@redhat.com> - 5.2.0-1
8de280
- 5.2.0 bump
8de280
b180c0
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.5-2
b180c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
b180c0
0c4bbd
* Tue Aug 05 2014 Petr Pisar <ppisar@redhat.com> - 5.1.5-1
0c4bbd
- 5.1.5 bump
0c4bbd
beae71
* Mon Jul 07 2014 Petr Pisar <ppisar@redhat.com> - 5.1.4-1
beae71
- 5.1.4 bump
beae71
0e76d5
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.1.3-2
0e76d5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
0e76d5
496c94
* Mon May 26 2014 Petr Pisar <ppisar@redhat.com> - 5.1.3-1
496c94
- 5.1.3 bump
496c94
43de97
* Wed May 07 2014 Petr Pisar <ppisar@redhat.com> - 5.1.2-1
43de97
- 5.1.2 bump
43de97
da457b
* Mon Jan 13 2014 Petr Pisar <ppisar@redhat.com> - 5.1.1-1
da457b
- 5.1.1 bump
da457b
238526
* Tue Jan 07 2014 Petr Pisar <ppisar@redhat.com> - 5.1.0-1
238526
- 5.1.0 bump
238526
f51ec9
* Thu Nov 28 2013 Petr Pisar <ppisar@redhat.com> - 5.0.26-3
f51ec9
- Fix a typo in the manual (bug #1029065)
f51ec9
69a312
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0.26-2
69a312
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
69a312
40cb5e
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 5.0.26-1
40cb5e
- 5.0.26 bump
40cb5e
0c7de2
* Mon May 13 2013 Petr Pisar <ppisar@redhat.com> - 5.0.25-1
0c7de2
- 5.0.25 bump
0c7de2
7851d9
* Thu Apr 18 2013 Petr Pisar <ppisar@redhat.com> - 5.0.24-1
7851d9
- 5.0.24 bump
7851d9
c57240
* Mon Apr 08 2013 Petr Pisar <ppisar@redhat.com> - 5.0.23-1
c57240
- 5.0.23 bump
c57240
395994
* Thu Apr 04 2013 Petr Pisar <ppisar@redhat.com> - 5.0.22-1
395994
- 5.0.22 bump
395994
fae549
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0.20-2
fae549
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
fae549
0efe72
* Mon Oct 08 2012 Petr Pisar <ppisar@redhat.com> - 5.0.20-1
0efe72
- 5.0.20 bump
0efe72
2e2aa6
* Wed Sep 19 2012 Petr Pisar <ppisar@redhat.com> - 5.0.19-1
2e2aa6
- 5.0.19 bump
2e2aa6
fbb6cb
* Thu Aug 02 2012 Petr Pisar <ppisar@redhat.com> - 5.0.18-1
fbb6cb
- 5.0.18 bump
fbb6cb
7d623c
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0.17-3
7d623c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
7d623c
75ac91
* Fri Jul 13 2012 Petr Pisar <ppisar@redhat.com> - 5.0.17-2
75ac91
- .xn--mgbaam7a8 is handled by whois.aeda.net.ae (bug #839893)
fadb3a
- Document how to write IDN in whois.conf (bug #839898)
75ac91
c5bdd9
* Wed Jun 27 2012 Petr Pisar <ppisar@redhat.com> - 5.0.17-1
c5bdd9
- 5.0.17 bump
c5bdd9
7131ef
* Mon Apr 30 2012 Petr Pisar <ppisar@redhat.com> - 5.0.16-1
7131ef
- 5.0.16 bump
7131ef
bb9043
* Thu Mar 08 2012 Petr Pisar <ppisar@redhat.com> - 5.0.15-1
bb9043
- 5.0.15 bump
bb9043
3b02c6
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.0.14-2
3b02c6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
3b02c6
79e7f7
* Mon Jan 02 2012 Petr Pisar <ppisar@redhat.com> - 5.0.14-1
79e7f7
- 5.0.14 bump
79e7f7
c7f4a1
* Mon Nov 28 2011 Petr Pisar <ppisar@redhat.com> - 5.0.13-1
c7f4a1
- 5.0.13 bump
c7f4a1
c32e71
* Wed Oct 12 2011 Petr Pisar <ppisar@redhat.com> - 5.0.12-1
c32e71
- 5.0.12 bump
c32e71
- Remove defattr from spec code
c32e71
1691f4
* Thu Mar 03 2011 Petr Pisar <ppisar@redhat.com> - 5.0.11-1
1691f4
- 5.0.11 bump
1691f4
1691f4
* Mon Dec 06 2010 Petr Pisar <ppisar@redhat.com> - 5.0.10-1
1691f4
- 5.0.10 bump
1691f4
1691f4
* Wed Sep 29 2010 Petr Pisar <ppisar@redhat.com> - 5.0.7-1
1691f4
- 5.0.7 imported
1691f4