diff options
author | Fabian Groffen <grobian@gentoo.org> | 2010-02-26 17:17:38 +0000 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2010-02-26 17:17:38 +0000 |
commit | 4fbd7578ff22b453cddc841ed92aee11502a38d0 (patch) | |
tree | a342ab8d245c042bbfcd2b6f80a83dcdcc085004 /app-admin/eselect-maven | |
parent | Version bump" (diff) | |
download | historical-4fbd7578ff22b453cddc841ed92aee11502a38d0.tar.gz historical-4fbd7578ff22b453cddc841ed92aee11502a38d0.tar.bz2 historical-4fbd7578ff22b453cddc841ed92aee11502a38d0.zip |
Revbump for Prefix fixes, bug #305359
Package-Manager: portage-2.2.00.15444-prefix/cvs/Darwin powerpc
Diffstat (limited to 'app-admin/eselect-maven')
-rw-r--r-- | app-admin/eselect-maven/ChangeLog | 8 | ||||
-rw-r--r-- | app-admin/eselect-maven/Manifest | 14 | ||||
-rw-r--r-- | app-admin/eselect-maven/eselect-maven-0.1-r1.ebuild | 32 | ||||
-rw-r--r-- | app-admin/eselect-maven/files/maven.eselect-1 | 187 |
4 files changed, 229 insertions, 12 deletions
diff --git a/app-admin/eselect-maven/ChangeLog b/app-admin/eselect-maven/ChangeLog index 0d72286b4f2a..020f358d750e 100644 --- a/app-admin/eselect-maven/ChangeLog +++ b/app-admin/eselect-maven/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-admin/eselect-maven # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-maven/ChangeLog,v 1.6 2010/01/01 19:21:01 fauli Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-maven/ChangeLog,v 1.7 2010/02/26 17:17:37 grobian Exp $ + +*eselect-maven-0.1-r1 (26 Feb 2010) + + 26 Feb 2010; Fabian Groffen <grobian@gentoo.org> + +eselect-maven-0.1-r1.ebuild, +files/maven.eselect-1: + Revbump for Prefix fixes, bug #305359 01 Jan 2010; Christian Faulhammer <fauli@gentoo.org> eselect-maven-0.1.ebuild: diff --git a/app-admin/eselect-maven/Manifest b/app-admin/eselect-maven/Manifest index 6a2099336240..f98a38b2040c 100644 --- a/app-admin/eselect-maven/Manifest +++ b/app-admin/eselect-maven/Manifest @@ -1,14 +1,6 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX maven.eselect 3973 RMD160 5ce8a91cf1df5eddd5444d0a8b17e4e6b02efc2e SHA1 48b49b1a490dee9784d26cb1559550c9a7cbe0fd SHA256 936763f3e8c3eb051414185cd0d54dd86059f2d176eb1078a8856d4bca6b0944 +AUX maven.eselect-1 3960 RMD160 46523ecda0cf9ff9709ada633a6c9c3581b73153 SHA1 d52f08655ee4836ac00432265759b27260187c75 SHA256 e8c855517e64ce9a46462afd3679376e01db2ddcea2947e2ac55be95ecf824a3 +EBUILD eselect-maven-0.1-r1.ebuild 790 RMD160 f47691251427f1efc0970e43bbda2c45919e0a3b SHA1 e35415173f1316e2c96d3dea7dd0bc98fdc29437 SHA256 65dcf5b8ff32d04016b7d5e43dbd38cebe3f94d5f406c9a5bf32f7067b9689df EBUILD eselect-maven-0.1.ebuild 714 RMD160 0efc421f79cf151f681676f3e2e759c6604f4750 SHA1 105ecc293c1d60f2dad6468f690166878fe3e42b SHA256 642012becdb40b08102f4a79c78a08104ca3472b7e259aa957d8917ec0f95c0d -MISC ChangeLog 1226 RMD160 77c14042bc2c9faa2358ad330c72269955dffb95 SHA1 f5d9333519c153b819e397de41c2d08cdfa811fa SHA256 b00794bd1812a1c35802df3db2ff2cb9f357f7e202a47b3c466c8379a93cce70 +MISC ChangeLog 1413 RMD160 ecab0d8332adbb326d6f33f90ae657717f441225 SHA1 7231d72cac6b9307e961e2f834882f1d138a6edc SHA256 28047a47a1a3b3df3ff0308f847ba2c91443b05960f252cdba05ee2441dde8ff MISC metadata.xml 158 RMD160 493079b5fb71d66863beea1b023901c90ba81be5 SHA1 77cd509a8b3c377b9a24480b48a5d5481b7874f1 SHA256 ea882ceccfd160b16cf7e79de423bdcc12b3fa000f124491a6df36f5783894fb ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.11 (GNU/Linux) - -iEYEARECAAYFAks+SyIACgkQNQqtfCuFneM3qwCdGohJu2dPxhb2ajytOxqm2tou -N4AAmgOha7EQtuEm/uaRtawq9Mb4YhcF -=fI2X ------END PGP SIGNATURE----- diff --git a/app-admin/eselect-maven/eselect-maven-0.1-r1.ebuild b/app-admin/eselect-maven/eselect-maven-0.1-r1.ebuild new file mode 100644 index 000000000000..b7d8de7a1c15 --- /dev/null +++ b/app-admin/eselect-maven/eselect-maven-0.1-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-maven/eselect-maven-0.1-r1.ebuild,v 1.1 2010/02/26 17:17:37 grobian Exp $ + +EAPI=3 + +DESCRIPTION="Manages Maven symlinks" +HOMEPAGE="http://www.gentoo.org/" +SRC_URI="" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="" + +RDEPEND=">=app-admin/eselect-1.2.8 + !<dev-java/maven-bin-2.0.10-r1:2.1" +PDEPEND=" +|| ( + dev-java/maven-bin:2.2 + dev-java/maven-bin:2.1 + dev-java/maven-bin:2.0 +)" + +src_unpack() { + mkdir "${S}" + cp "${FILESDIR}"/maven.eselect-1 "${S}"/maven.eselect || die +} + +src_install() { + insinto /usr/share/eselect/modules + doins "${S}"/maven.eselect || die +} diff --git a/app-admin/eselect-maven/files/maven.eselect-1 b/app-admin/eselect-maven/files/maven.eselect-1 new file mode 100644 index 000000000000..af32b0426ee3 --- /dev/null +++ b/app-admin/eselect-maven/files/maven.eselect-1 @@ -0,0 +1,187 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id: maven.eselect-1,v 1.1 2010/02/26 17:17:38 grobian Exp $ + +DESCRIPTION="Manage Maven targets" +MAINTAINER="jieryn@gmail.com" +VERSION="0.1" + +MVN="${EROOT}/usr/bin/mvn" + +# find a list of mvn symlink targets, best first. +find_targets() { + for f in $(ls -r "${MVN}"-[0-9]* 2> /dev/null) ; do + if [[ -f "${f}" ]] ; then + echo $(basename "${f}") + fi + done +} + +# get a named or numbered target. +find_target() { + local target=${1} + + if is_number "${target}" && [[ ${target} -ge 1 ]] ; then + targets=( $(find_targets ) ) + [[ -z "${targets}" ]] && die -q "No targets found!" + target=${targets[$(( ${target} - 1 ))]} + fi + + if [[ "${target}" = mvn-[0-9]* ]] && [[ -f "${EROOT}/usr/bin/${target}" ]] ; then + echo ${target} + else + die -q "Target \"${1}\" doesn't appear to be valid!" + fi +} + +# try to remove the mvn symlink. +remove_symlink() { + rm "${MVN}" &>/dev/null +} + +# determine the current target. +get_target() { + local canonicalised=$(canonicalise "${MVN}") + echo $(basename "${canonicalised}") +} + +# set the Maven symlink. +set_symlink() { + local target=$(find_target "${1}") + remove_symlink + ln -s "${target}" "${MVN}" || \ + die "Couldn't set ${target} symlink." +} + +### show action ### + +describe_show() { + echo "Show current Maven target" +} + +do_show() { + if [[ ${#} -gt 0 ]]; then + die -q "No parameters allowed." + fi + + if [[ -L "${MVN}" ]] ; then + get_target + return 0 + elif [[ -e "${MVN}" ]] ; then + echo "(not a symlink)" >&2 + return 1 + else + echo "(unset)" >&2 + return 1 + fi +} + +### list action ### + +describe_list() { + echo "List available Maven targets" +} + +do_list() { + if [[ ${#} -gt 0 ]]; then + die -q "Usage error: no parameters allowed." + fi + + local i targets + targets=( $(find_targets) ) + + if [[ -n ${targets[@]} ]] ; then + local canonicalised basename + + for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do + canonicalised=$(canonicalise "${MVN}") + basename=$(basename "${canonicalised}") + + if [[ "${targets[${i}]}" = "${basename}" ]] ; then + targets[${i}]="${targets[${i}]} $(highlight '*')" + fi + done + + write_list_start "Available Maven targets:" + write_numbered_list "${targets[@]}" + else + write_kv_list_entry "(none found)" "" + fi +} + +### set action ### + +describe_set() { + echo "Set a new Maven target" +} + +describe_set_options() { + echo "target : Target name or number (from 'list' action)" +} + +describe_set_parameters() { + echo "<target>" +} + +do_set() { + if [[ $# -gt 1 ]]; then + die -q "Too many parameters. Expected only one." + fi + + local target=${1} + + if [[ -z "${target}" ]] ; then + die -q "You didn't give me a target name or number." + elif [[ -L "${MVN}" ]] ; then + if ! remove_symlink ; then + die -q "Can't remove existing Maven provider." + elif ! set_symlink "${1}" ; then + die -q "Can't set new Maven provider." + fi + elif [[ -e "${MVN}" ]] ; then + write_warning_msg "Can't set a new Maven provider. There's a file in the way at ${MVN}. You can try removing it manually, and then re-running this command." + else + set_symlink "${target}" || die -q "Wasn't able to set a new provider." + fi +} + +### update action ### + +describe_update() { + echo "Set the Maven target to the latest if the current target is invalid or if the given target is the latest" +} + +describe_update_options() { + echo "target (optional) : Target name (from 'list' action)" +} + +describe_update_parameters() { + echo "<target>" +} + +do_update() { + if [[ $# -gt 1 ]] ; then + die -q "Too many parameters. Expected only one." + fi + + # For pkg_postrm + if [[ ! $(find_targets) ]]; then + remove_symlink + return + fi + + local canonicalised=$(canonicalise "${MVN}") + + if [[ ! -L "${MVN}" ]] || [[ ! -f "${canonicalised}" ]] ; then + do_set 1 + elif [[ -n "${1}" ]] ; then + # Check whether target name is valid. + find_target "${1}" > /dev/null + + if [[ "${1}" == "$(find_target 1)" ]] ; then + do_set 1 + fi + fi +} + +# vim: set ft=eselect : |