diff dev-java/maven-bin/maven-bin-3.0.2.ebuild @ 273:f80894b3a960

sync with main portage
author holger
date Wed, 19 Jan 2011 10:51:24 +0100
parents 521bc30000f1
children
line wrap: on
line diff
--- a/dev-java/maven-bin/maven-bin-3.0.2.ebuild	Wed Jan 19 09:44:52 2011 +0100
+++ b/dev-java/maven-bin/maven-bin-3.0.2.ebuild	Wed Jan 19 10:51:24 2011 +0100
@@ -1,11 +1,11 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/maven-bin/maven-bin-2.2.1.ebuild,v 1.3 2010/04/26 11:05:56 phajdan.jr Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/maven-bin/maven-bin-3.0.2.ebuild,v 1.1 2011/01/15 12:25:40 fordfrog Exp $
 
 inherit java-pkg-2
-inherit versionator
 
-MY_P="apache-maven-3.0.2"
+MY_PN=apache-${PN%%-bin}
+MY_P="${MY_PN}-${PV}"
 
 DESCRIPTION="Project Management and Comprehension Tool for Java"
 SRC_URI="mirror://apache/maven/binaries/${MY_P}-bin.tar.gz"
@@ -28,23 +28,22 @@
 	unpack ${A}
 
 	rm -v "${S}"/bin/*.bat || die
+	chmod 644 "${S}"/boot/*.jar "${S}"/lib/*.jar "${S}"/conf/settings.xml || die
 }
 
+# TODO we should use jars from packages, instead of what is bundled
 src_install() {
 	dodir "${MAVEN_SHARE}"
 	cp -Rp bin boot conf lib "${D}/${MAVEN_SHARE}" || die "failed to copy"
 
 	java-pkg_regjar "${D}/${MAVEN_SHARE}"/lib/*.jar
-	
-	# the Maven distro comes with really weird permissions in the tarball 
-	# which will cause the ebuild to preserve these weird permissions, leaving
-	# users with a broken maven installationy
-	chown root: "${D}/${MAVEN_SHARE}"/lib/*.jar "${D}/${MAVEN_SHARE}"/boot/*.jar
-	chmod 644  "${D}/${MAVEN_SHARE}"/lib/*.jar "${D}/${MAVEN_SHARE}"/boot/*.jar
 
 	dodoc NOTICE.txt README.txt || die
 
 	dodir /usr/bin
 	dosym "${MAVEN_SHARE}/bin/mvn" /usr/bin/mvn-${SLOT}
+
+	# bug #342901
+	echo "CONFIG_PROTECT=\"${MAVEN_SHARE}/conf\"" > "${T}/25${MAVEN}" || die
+	doenvd "${T}/25${MAVEN}"
 }
-