[Mageia-dev] Need mentor(s) to become a Mageia packager

andre999 andr55 at laposte.net
Fri Jul 22 11:39:54 CEST 2011


Vincent a écrit :
> Hi All,
>
> I am still trying to pack ZoneMinder for Cauldron.
> Now rpms are generated and rpmlint is not complaining, but I am still
> sure, it's not OK :) , that's why I need help.
> Attached is the spec file, if somebody could have a look.
>
> Here are my questions:
> - where should go the installed files? (Zoneminder provides perl
> modules, the site itself, CGI services , doc and conf).
> - some files have no path's variable:
> /usr/share/man/lib/perl5/5.14.1/x86_64-linux-thread-multi/perllocal.pod.xz
> /usr/local/share/man/man3/ZoneMinder.3pm
> ...
> Any idea, what it should be?
> - what should be the permissions for the site under the apache server?
> - should the %install section creates the database table/permissions
> for ZoneMinder? If so, is there any example how to achieve this?
> - should the %install section creates the service launcher scripts? If
> so, is there any example how to achieve this?
>
> Thanks in advance for you help!
>
> Vincent

I'm not sure about all your questions, but I can give you a few tips to improve 
your spec file.

1) The name, version, and release should be defined directly on the first 3 
lines.  These entries define the %{name}, %{version}, and %{release} macros, so 
in lines 9/10/11 you are redefining them to themselves.

2) Use macros whenever possible.  This makes it easier to maintain the spec 
file, as the value will be defined in only one place.
The build system will automatically use the correct name.
As well, it makes it easier to use the spec file in another distro.  The more 
distros do this, the easier it is to share, a big plus of open source/free 
software in general and Linux in particular.

e.g.
for man you should use %{_mandir} ... which is /usr/share/man/ in Mageia
(your spec puts such files in /usr/local/share/man/..., incorrect for Mageia.)
for executables either %{_bindir} ... for /usr/bin
or if a system type of utility,  %{_sbindir} ... for /usr/sbin/

By the way, do you have a mentor ?
If not, you should be in the apprentice table at 
http://www.mageia.org/wiki/doku.php?id=packages_mentoring#packager_apprentice_table

Let me know :)
-- 
André


More information about the Mageia-dev mailing list