On 31/08/11 23:17, Guillaume Rousse wrote:
Le 31/08/2011 15:20, Barry Jackson a écrit :
Hello,
Would someone please review the attached src.rpm for the above, with a
view to committing it.
Here you have...

Many thanks Guillaume

You'd better use an author-neutral URL for the sources, such as
http://www.cpan.org/modules/by-module/Sys/%{upstream_name}-%{upstream_version}.tar.gz

This way, if another maintainer submit a new version, the URL will stay
valid (and automatic update tool will work).

Yes - I learned something
The runtime depency on perl is useless: you can't install mageia without
perl anyway, and the minimal version isn't very helpful either.

Done
But you do need a build dependency (buildrequires) on perl-devel, as it
is a native perl package, you won't be able to build without it.

Done
you should not include the debug files (the .debug, and the source
files), they will be automatically included in the implicit
perl-Sys-Mmap-debug package. Especially as the path you're using here is
x86_64-specific :) So just forget them.

You should not own the %{perl_vendorlib} directory (it belongs to perl
package), but just the subdirectory %{perl_vendorlib}/Sys, which is the
base directory for your package files.

Thanks - that explains the problem with the debug etc. as well - they were being listed as installed but not packaged hence my comment and their inclusion ;)
>
The %clean section isn't needed anymore with rpm 4.8

OK sth else I learned.
Usually, the document files (%doc macro) are listed first, but that's
purely cosmetic.
Moved.

Some of your above comments would also apply to the current perl-Sys-Mknod.spec which I used as a template ;)

Updated version attached.

Barry.
%define upstream_name           Sys-Mmap
%define upstream_version        0.16

Name:           perl-%{upstream_name}
Version:        %{upstream_version}
Release:        %mkrel 0

Summary:        Sys::Mmap
License:        GPL
Group:          Development/Perl
Url:            http://www.kernel.org/software/mon/
Source0:        
http://www.cpan.org/modules/by-module/Sys/%{upstream_name}-%{upstream_version}.tar.gz
 
BuildRequires:  perl-devel

%description
The Mmap module lets you use mmap to map in a file as a perl variable rather
than reading the file into dynamically allocated memory.  Multiple programs may
map the same file into memory, and immediately see changes by each other.
Memory may be allocated not attached to a file, and shared with subprocesses.

%prep
%setup -q -n %{upstream_name}-%{upstream_version}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make

%check

%make test

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall_std

%files
%doc Changes README
%{perl_vendorlib}/*
%{_mandir}/*/*

%changelog
* Tue Aug 30 2011 Barry Jackson <zen25...@zen.co.uk> 0.16-0 
- New package for Mageia

Reply via email to