diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-eselect/eselect-maven | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-eselect/eselect-maven')
-rw-r--r-- | app-eselect/eselect-maven/eselect-maven-0.2-r1.ebuild | 30 | ||||
-rw-r--r-- | app-eselect/eselect-maven/eselect-maven-0.2-r2.ebuild | 30 | ||||
-rw-r--r-- | app-eselect/eselect-maven/files/maven-0.2.eselect | 175 | ||||
-rw-r--r-- | app-eselect/eselect-maven/metadata.xml | 5 |
4 files changed, 240 insertions, 0 deletions
diff --git a/app-eselect/eselect-maven/eselect-maven-0.2-r1.ebuild b/app-eselect/eselect-maven/eselect-maven-0.2-r1.ebuild new file mode 100644 index 00000000000..657d5a88c69 --- /dev/null +++ b/app-eselect/eselect-maven/eselect-maven-0.2-r1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 + !app-eselect/eselect-java" +PDEPEND=" +|| ( + dev-java/maven-bin:3.0 + dev-java/maven-bin:2.2 + dev-java/maven-bin:2.0 +)" + +src_install() { + insinto /usr/share/eselect/modules + newins "${FILESDIR}/maven-${PV}.eselect" maven.eselect \ + || die "newins failed" +} diff --git a/app-eselect/eselect-maven/eselect-maven-0.2-r2.ebuild b/app-eselect/eselect-maven/eselect-maven-0.2-r2.ebuild new file mode 100644 index 00000000000..cbedd98baec --- /dev/null +++ b/app-eselect/eselect-maven/eselect-maven-0.2-r2.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +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 + !app-eselect/eselect-java" +PDEPEND=" +|| ( + dev-java/maven-bin:3.0 + dev-java/maven-bin:2.2 + dev-java/maven-bin:2.0 +)" + +src_install() { + insinto /usr/share/eselect/modules + newins "${FILESDIR}/maven-${PV}.eselect" maven.eselect \ + || die "newins failed" +} diff --git a/app-eselect/eselect-maven/files/maven-0.2.eselect b/app-eselect/eselect-maven/files/maven-0.2.eselect new file mode 100644 index 00000000000..bdc35c9fb30 --- /dev/null +++ b/app-eselect/eselect-maven/files/maven-0.2.eselect @@ -0,0 +1,175 @@ +# -*-eselect-*- vim: ft=eselect +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +DESCRIPTION="Manage Maven targets" +MAINTAINER="java@gentoo.org" +VERSION="0.2" + +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) ) + + for (( i = 0; i < ${#targets[@]}; i++ )); do + [[ ${targets[i]} = $(basename "$(canonicalise "${MVN}")") ]] \ + && targets[i]=$(highlight_marker "${targets[i]}") + done + + write_list_start "Available Maven targets:" + write_numbered_list -m "(none found)" "${targets[@]}" +} + +### 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 +} diff --git a/app-eselect/eselect-maven/metadata.xml b/app-eselect/eselect-maven/metadata.xml new file mode 100644 index 00000000000..7303cef9696 --- /dev/null +++ b/app-eselect/eselect-maven/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>java</herd> +</pkgmetadata> |