File whohas.spec of Package whohas

# spec file for package whohas
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 8/2011 open-slx GmbH <>
# Copyright (c) 2010 - 7/2011 Sascha Manns <>
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           whohas
Version:        0.29
Release:        0
Summary:        Package list querying tool
License:        GPL-2.0+
Group:          System/Console
# PATCH-FIX-OPENSUSE whohas-fix_install.patch -- Added a Makefile for Installation.
Patch0:         whohas-fix_install.patch
# PATCH-FIX-UPSTREAM manpage-0.23.patch -- Add the --shallow option to the syntax line in the manpage
Patch1:         manpage-0.23.patch
# PATCH-FIX-UPSTREAM manpage-0.24.patch -- Update the version number in the manual from 0.23 to 0.24
Patch2:         manpage-0.24.patch
# PATCH-FIX-UPSTREAM ubuntu-versions-510203.patch deb#510203 -- Show all versions of a package from Ubuntu, not just the earliest
Patch3:         ubuntu-versions-510203.patch
# PATCH-FIX-UPSTREAM debian-versions-511364.patch deb#511364 -- Providing output for all Debian distributions
Patch4:         debian-versions-511364.patch
# PATCH-FIX-UPSTREAM help-param-513476.patch deb#513476 -- Handle the --help parameter instead of assuming it is a package name
Patch5:         help-param-513476.patch
# PATCH-FIX-UPSTREAM strictness-510020-510524.patch deb#510020 deb#510524 -- Add a --strict option to output only exactly matching package names
Patch6:         strictness-510020-510524.patch
# PATCH-FIX-OPENSUSE gentoo-result-url-516071.patch deb#516071 -- Return a more official link to the gentoo package, where more useful information can be found
Patch7:         gentoo-result-url-516071.patch
# PATCH-FIX-OPENSUSE improve-fetchdoc.patch -- Shift some of the burden in sub fetchdoc onto the LWP::UserAgent class. This also allows us to process XML files without breaking the first line
Patch8:         improve-fetchdoc.patch
# PATCH-FIX-UPSTREAM openbsd-cache-results-557724 deb#557724 -- For OpenBSD, use @name to loop through a cached list, not @repos which is never populated
Patch9:         openbsd-cache-results-557724
# PATCH-FIX-UPSTREAM dont-mask-vars-560891.patch deb#560891 -- Remove a double-declaration of @dates
Patch10:        dont-mask-vars-560891.patch
# PATCH-FIX-OPENSUSE opensuse-searchpath-585596.patch deb#585596 -- Update search URL for openSUSE repositories
Patch11:        opensuse-searchpath-585596.patch
# PATCH-FIX-OPENSUSE archlinux-url-561536.patch deb#561536 -- Update search URL for Arch repositories
Patch12:        archlinux-url-561536.patch
# PATCH-FIX-OPENSUSE fedora-search-619873 deb#619873 -- Support Fedora's package listing
Patch13:        fedora-search-619873
Requires:       perl = %{perl_version}
Requires:       perl-XML-Simple
Requires:       perl-libwww-perl
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

whohas is a command line tool that allows querying several package lists at
once - currently supported are Arch, Debian, Fedora, Gentoo, Mandriva,
openSUSE, Slackware (and, Source Mage, Ubuntu, FreeBSD,
NetBSD, OpenBSD, Fink, MacPorts, Cygwin and OpenMoko. whohas is written in Perl
and was designed to help package maintainers find ebuilds, pkgbuilds and
similar package definitions from other distributions to learn from. However, it
can also be used by normal users who want to know:

 * Which distribution provides packages on which the user depends.
 * What version of a given package is in use in each distribution, or in each
   release of a distribution (not implemented for all distributions).

%setup -q
%patch1 -p1
%patch3 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch12 -p1
%patch13 -p1

chmod go+rx html_assets
chmod -R 644 Changelog LICENSE intro.html intro.txt html_assets/*


# install binary
# INFO: From line 52 on you will find the searchable repositories. If you would like to
#       change them, just edit these lines.
make DESTDIR=%{buildroot} install

%doc Changelog LICENSE intro.html intro.txt html_assets/
%attr(0755,root,root) %{_bindir}/%{name}
%doc %{_mandir}/man1/%{name}.1%{ext_man}
%doc %dir %{_mandir}/de/man1
%doc %{_mandir}/de/man1/%{name}.1%{ext_man}