annotate dev-java/maven/maven-3.2.5.ebuild @ 386:9d2a913e5010

pull the Maven 3.3.1 ebuild from Holgi's portage
author Dirk Olmes <dirk@xanthippe.ping.de>
date Wed, 18 Mar 2015 08:19:31 +0100
parents d790e87dc863
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
384
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
1
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
2 EAPI="5"
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
3
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
4 inherit java-pkg-2
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
5
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
6 MY_PN=apache-${PN%%-bin}
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
7 MY_PV=${PV/_alpha/-alpha-}
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
8 MY_P="${MY_PN}-${MY_PV}"
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
9 MY_MV="${PV%%.*}"
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
10
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
11 DESCRIPTION="Project Management and Comprehension Tool for Java"
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
12 SRC_URI="mirror://apache/maven/maven-${MY_MV}/${PV}/binaries/${MY_P}-bin.tar.gz"
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
13 HOMEPAGE="http://maven.apache.org/"
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
14
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
15 LICENSE="Apache-2.0"
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
16 SLOT="3.2"
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
17 KEYWORDS="amd64 x86"
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
18
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
19 DEPEND="|| ( app-admin/eselect-java app-admin/eselect-maven )"
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
20
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
21 RDEPEND=">=virtual/jdk-1.5
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
22 ${DEPEND}"
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
23
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
24 S="${WORKDIR}/${MY_P}"
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
25
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
26 MAVEN=${PN}-${SLOT}
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
27 MAVEN_SHARE="/usr/share/${MAVEN}"
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
28
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
29 java_prepare() {
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
30 rm -v "${S}"/bin/*.bat || die
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
31 chmod 644 "${S}"/boot/*.jar "${S}"/lib/*.jar "${S}"/conf/settings.xml || die
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
32 }
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
33
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
34 src_install() {
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
35 dodir "${MAVEN_SHARE}"
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
36
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
37 cp -Rp bin boot conf lib "${ED}/${MAVEN_SHARE}" || die "failed to copy"
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
38
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
39 java-pkg_regjar "${ED}/${MAVEN_SHARE}"/boot/*.jar
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
40 java-pkg_regjar "${ED}/${MAVEN_SHARE}"/lib/*.jar
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
41
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
42 dodoc README.txt
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
43
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
44 dodir /usr/bin
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
45 dosym "${MAVEN_SHARE}/bin/mvn" /usr/bin/mvn-${SLOT}
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
46
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
47 # See bug #342901.
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
48 echo "CONFIG_PROTECT=\"${MAVEN_SHARE}/conf\"" > "${T}/25${MAVEN}" || die
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
49 doenvd "${T}/25${MAVEN}"
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
50 }
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
51
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
52 pkg_postinst() {
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
53 eselect maven update mvn-${SLOT}
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
54 }
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
55
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
56 pkg_postrm() {
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
57 eselect maven update
d790e87dc863 add Holgi's Maven ebuild
Dirk Olmes <dirk@xanthippe.ping.de>
parents:
diff changeset
58 }