#
# Conditional build:
-%bcond_with tests # do not perform "make test"
+%bcond_with tests # perform "make test" (requires /proc access)
#
-%include /usr/lib/rpm/macros.perl
-%define pdir GTop
+%define pdir GTop
Summary: GTop - Perl interface to libgtop
-Summary(pl): GTop - interfejs perlowy do libgtop
+Summary(pl.UTF-8): GTop - interfejs perlowy do libgtop
Name: perl-GTop
-Version: 0.12
-Release: 2
+Version: 0.16
+Release: 18
# same as perl
License: GPL v1+ or Artistic
Group: Development/Languages/Perl
-Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{version}.tar.gz
-Patch0: %{name}-xmalloc_h_and_g_free.patch
-# Source0-md5: 9c6ade812379d346e18a2354f39e82b0
+Source0: http://www.cpan.org/modules/by-module/GTop/%{pdir}-%{version}.tar.gz
+# Source0-md5: c3b1f36c3c9e1031f783027fe1c098d0
+Patch0: %{name}-error_h.patch
+URL: http://search.cpan.org/dist/GTop/
BuildRequires: libgtop-devel >= 2.0
-BuildRequires: perl-devel >= 5.6
+BuildRequires: perl-devel >= 1:5.8.0
BuildRequires: pkgconfig
BuildRequires: rpm-perlprov >= 4.1-13
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
This package is a Perl interface to libgtop:
-http://home-of-linux.org/gnome/libgtop/ .
+<http://home-of-linux.org/gnome/libgtop/>.
See also: Stas Bekman's Apache::VMonitor
-http://www.cpan.org/modules/by-module/Apache/ .
+<http://www.cpan.org/modules/by-module/Apache/>.
-%description -l pl
+%description -l pl.UTF-8
Ten pakiet jest perlowym interfejsem do libgtop:
-http://home-of-linux.org/gnome/libgtop/ .
+<http://home-of-linux.org/gnome/libgtop/>.
-Warto zobaczyæ tak¿e Apache::VMonitor Stasa Bekmana:
-http://www.cpan.org/modules/by-module/Apache/ .
+Warto zobaczyć także Apache::VMonitor Stasa Bekmana:
+<http://www.cpan.org/modules/by-module/Apache/>.
%prep
%setup -q -n %{pdir}-%{version}
%patch0 -p1
%build
-GTOP_LIB="`pkg-config --libs libgtop-2.0`" \
-GTOP_INCLUDE="`pkg-config --cflags libgtop-2.0`" \
%{__perl} Makefile.PL \
INSTALLDIRS=vendor
%{__make} \
- OPTIMIZE="%{rpmcflags}" \
- INC="`pkg-config --cflags libgtop-2.0`" \
- EXTRALIBS="`pkg-config --libs libgtop-2.0`"
+ CC="%{__cc}" \
+ OPTIMIZE="%{rpmcflags}"
%{?with_tests:%{__make} test}
%files
%defattr(644,root,root,755)
%{perl_vendorarch}/*.pm
-%{perl_vendorarch}/%{pdir}
-%dir %{perl_vendorarch}/auto/%{pdir}
-%attr(755,root,root) %{perl_vendorarch}/auto/%{pdir}/*.so
-%{perl_vendorarch}/auto/%{pdir}/*.bs
-%dir %{perl_vendorarch}/auto/%{pdir}/Server
-%attr(755,root,root) %{perl_vendorarch}/auto/%{pdir}/Server/*.so
-%{perl_vendorarch}/auto/%{pdir}/Server/*.bs
+%dir %{perl_vendorarch}/auto/GTop
+%attr(755,root,root) %{perl_vendorarch}/auto/GTop/GTop.so
+%{perl_vendorarch}/config.pl
%{_mandir}/man3/*