On 23/03/2012, at 2:43 AM, Stanislav Ochotnicky wrote:

> Quoting Brett Porter (2012-03-21 21:06:05)
>> http://svn.apache.org/repos/asf/maven/sandbox/trunk/rpm
>> 
>> $ mvn install
>> $ sudo rpm -ivh 
>> ~/.m2/repository/org/apache/maven/rpm/maven/3.0.4/maven-3.0.4.rpm 
>> 
>> Tested on CentOS 6.0.
>> 
>> It installs to /usr/local/maven and /usr/local/bin/mvn. It also adds 
>> /etc/profile.d/maven.sh to add the bin directory to the PATH and M2_HOME 
>> variable, though neither are strictly necessary. Open to suggestions on 
>> improvements.
> 
> I've had a look at the produced spec file and file layout and I do have
> a few suggestions:
> 
> 1. Put maven into /usr/share/maven instead of /usr/local/maven. Or if
>   you really want to put it into /usr/local subtree then
>   /usr/local/share/maven. /usr/local/maven is...at least weird from
>   FHS perspective. And then just symlink scripts into
>   /usr/[local/]bin.
> 
> 2. Your license tag doesn't state license, just copyright. In most RPM Linux
>   distributions this would probably contain "ASL 2.0". Full license name
>   would be OK as well I guess
> 
> 3. URL should probably be maven.apache.org instead of plain apache.org
> 
> 4. Put settings.xml into /etc/ subtree (/etc/maven/ possibly) and
>   symlink it back to M2_HOME (possibly same thing for m2.conf). It
>   should also be marked as config file.
> 
> 5. Handling of license/readme etc is different on different distros so I
>   guess that can stay inside M2_HOME
> 
> 6. A nice sensible %description copied from main site would be nice :-)

These all sound like good changes to me - I'll have a look when I can, or if 
you want to patch it please do!

> 
>> 
>> I removed and requirement on a JDK package, to avoid requiring one 
>> alternative over another. Open to suggestions if there is a better way to 
>> express that in the spec file.
> 
> 7. I have asked around a bit and it might make sense to add "Requires:
>   java" (or java-devel) to the resulting RPM/spec. It would work at
>   least on Fedora/SuSE/Mageia stack I would assume that works as well.
>   But proprietary Oracle JDK rpm doesn't have this provides so it means
>   we'd still pull in additional jdk. Oh well..

I see a lot of hosts with the Oracle RPMs on there, so it seems better to omit 
rather than force someone to use --nodeps or double up, IMO.

Cheers,
Brett

--
Brett Porter
br...@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter
http://twitter.com/brettporter






---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to