Name:       perl-Net-UPnP
Version:    1.4.3
Release:    2%{?_dist_release}
Summary:    Perl extension for UPnP
Summary(ja): UPnP のための Perl 拡張

License:    BSD
Group:      Development/Libraries
URL:        http://search.cpan.org/dist/Net-UPnP/

Source0:    http://search.cpan.org/CPAN/authors/id/S/SK/SKONNO/Net-UPnP-%{version}.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildArch:  noarch
BuildRequires:  perl
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(strict)
BuildRequires:  perl(warnings)
# Run-time:
# Socket not used at tests
BuildRequires:  perl(vars)
BuildRequires:  perl(version)
# Tests:
BuildRequires:  perl(Test::More)
Requires:   perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))

Vendor: Project Vine
Distribution: Vine Linux

%description
This package provides some functions to control UPnP devices.

%prep
%setup -q -n Net-UPnP-%{version}
# Fix file attributes
find -name '*.pm' -exec chmod a-x '{}' +
chmod a-x Changes README

# Fix shebangs
for file in examples/*.pl; do
    sed '1 s|^#!/usr/local/bin/perl|#!%{__perl}|g' "$file" > "${file}.mod" && \
    touch -r "$file" "${file}.mod" && \
    mv "${file}.mod" "$file"
done

%build
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make pure_install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
%{_fixperms} $RPM_BUILD_ROOT/*

%check
make test

%clean
rm -rf $RPM_BUILD_ROOT

%files
%doc Changes README examples/
%{perl_vendorlib}/Net/
%{_mandir}/man3/Net::UPnP*

%changelog
* Sat Jan 31 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 1.4.3-2
- Initial build for Vine Linux

* Mon Oct 20 2014 Petr Pisar <ppisar@redhat.com> - 1:1.4.3-1
- 1.4.3 bump

* Thu Aug 28 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1:1.4.2-15
- Perl 5.20 rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.4.2-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.4.2-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 1:1.4.2-12
- Perl 5.18 rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.4.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.4.2-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Sun Jun 10 2012 Petr Pisar <ppisar@redhat.com> - 1:1.4.2-9
- Perl 5.16 rebuild

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.4.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Fri Jun 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1:1.4.2-7
- Perl mass rebuild

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:1.4.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Tue Dec 21 2010 Marcela Maslanova <mmaslano@redhat.com> - 1:1.4.2-5
- 661697 rebuild for fixing problems with vendorach/lib

* Fri May 14 2010 Petr Pisar <ppisar@redhat.com> - 1:1.4.2-4
- Remove duplicate BuildRequires perl(version)

* Tue May 04 2010 Marcela Maslanova <mmaslano@redhat.com> - 1:1.4.2-3
- Added BR: perl(version) to fix FTBFS.

* Tue May 04 2010 Marcela Maslanova <mmaslano@redhat.com> - 1:1.4.2-2
- Mass rebuild with perl-5.12.0

* Sun Dec 27 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1:1.4.2-1
- Update to 1.4.2.
- Fix spelling in rpm version: 1.4.1 instead of previous 1.41.

* Mon Dec  7 2009 Stepan Kasal <skasal@redhat.com> - 1.4.1-5
- rebuild against perl 5.10.1

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Apr 15 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.4.1-3
- Review fixes.

* Sun Apr 12 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.4.1-2
- Add missing BR: Test::More.

* Sun Apr 12 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 1.4.1-1
- Specfile autogenerated by cpanspec 1.77.

