File perl-App-Nopaste.spec of Package perl-App-Nopaste

#
# spec file for package perl-App-Nopaste
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#

Name:           perl-App-Nopaste
Version:        0.33
Release:        0
Summary:        Easy access to any pastebin
License:        Artistic-1.0 or GPL-1.0+
Group:          Development/Libraries/Perl
Source:         http://search.cpan.org/CPAN/authors/id/S/SA/SARTAK/App-Nopaste-%{version}.tar.gz
Source1:        SusePaste.pm
Url:            http://search.cpan.org/dist/App-Nopaste
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires:  make
BuildRequires:  perl-macros
BuildRequires:  perl(Browser::Open)
BuildRequires:  perl(Class::Load)
BuildRequires:  perl(Clipboard)
BuildRequires:  perl(Config::GitLike)
BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.42
BuildRequires:  perl(File::Spec)
BuildRequires:  perl(File::Temp)
BuildRequires:  perl(HTML::Form)
BuildRequires:  perl(Module::Pluggable)
BuildRequires:  perl(Moose) >= 0.74
BuildRequires:  perl(MooseX::Getopt) >= 0.17
BuildRequires:  perl(WWW::Mechanize)
BuildRequires:  perl(WWW::Pastebin::PastebinCom::Create)
Requires:       perl(MooseX::Getopt) >= 0.17
Requires:       perl(Module::Pluggable)
Requires:       perl(WWW::Mechanize)
Requires:       perl(Moose) >= 0.74
Requires:       perl(HTML::Form)
Recommends:     perl(Browser::Open)
Recommends:     perl(Clipboard)
Recommends:     perl(WWW::Pastebin::PastebinCom::Create)
Recommends:     perl(Config::GitLike)
Recommends:     perl(File::Temp)
Recommends:     perl(File::Spec)

%description
Pastebins (also known as nopaste sites) let you post text, usually code,
for public viewing. They're used a lot in IRC channels to show code that
would normally be too long to give directly in the channel (hence the name
nopaste).

Each pastebin is slightly different. When one pastebin goes down (I'm
looking at you, <http://paste.husk.org>), then you have to find a new one.
And if you usually use a script to publish text, then it's too much
hassle.

This module aims to smooth out the differences between pastebins, and
provides redundancy: if one site doesn't work, it just tries a different
one.

It's also modular: you only need to put on CPAN a
App::Nopaste::Service::Foo module and anyone can begin using it.

%package -n nopaste
Summary:        Easy access to any pastebin
Group:          Productivity/Networking/Web/Utilities
Requires:       %{name} = %{version}
%if 0%{?suse_version} >= 1120
BuildArch:      noarch
%endif

%description -n nopaste
Pastebins (also known as nopaste sites) let you post text, usually code,
for public viewing. They're used a lot in IRC channels to show code that
would normally be too long to give directly in the channel (hence the name
nopaste).

Each pastebin is slightly different. When one pastebin goes down (I'm
looking at you, <http://paste.husk.org>), then you have to find a new one.
And if you usually use a script to publish text, then it's too much
hassle.

This module aims to smooth out the differences between pastebins, and
provides redundancy: if one site doesn't work, it just tries a different
one.

%prep
%setup -q -n "App-Nopaste-%{version}"
%__sed -i '/^auto_install/d' Makefile.PL
%__install -m 0644 "%{SOURCE1}" lib/App/Nopaste/Service/

%build
%__perl Makefile.PL PREFIX="%{_prefix}"
%__make %{?jobs:-j%{jobs}}

%install
%perl_make_install

find "%{buildroot}%{perl_vendorlib}" -type f -name '*.pm' -exec %__chmod 0644 {} \;

%perl_process_packlist

%check
%__make test

%clean
%{?buildroot:%__rm -rf "%{buildroot}"}

%files
%defattr(-,root,root)
%doc Changes
%dir %{perl_vendorlib}/App
%{perl_vendorlib}/App/Nopaste.pm
%dir %{perl_vendorlib}/App/Nopaste
%{perl_vendorlib}/App/Nopaste/*.pm
%dir %{perl_vendorlib}/App/Nopaste/Service
%{perl_vendorlib}/App/Nopaste/Service/*.pm
%dir %{perl_vendorarch}/auto/App
%{perl_vendorarch}/auto/App/Nopaste
%doc %{perl_man3dir}/App::Nopaste.%{perl_man3ext}%{ext_man}
%doc %{perl_man3dir}/App::Nopaste::*.%{perl_man3ext}%{ext_man}

%files -n nopaste
%defattr(-,root,root)
%{_bindir}/nopaste
%doc %{_mandir}/man1/nopaste.1%{ext_man}

%changelog