diff options
Diffstat (limited to 'dev-util/idea-ultimate/idea-ultimate-13.1.3.135.760_pre1.ebuild')
-rw-r--r-- | dev-util/idea-ultimate/idea-ultimate-13.1.3.135.760_pre1.ebuild | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/dev-util/idea-ultimate/idea-ultimate-13.1.3.135.760_pre1.ebuild b/dev-util/idea-ultimate/idea-ultimate-13.1.3.135.760_pre1.ebuild new file mode 100644 index 0000000..bcf936a --- /dev/null +++ b/dev-util/idea-ultimate/idea-ultimate-13.1.3.135.760_pre1.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 +inherit eutils versionator + +SLOT="$(get_major_version)" +RDEPEND=">=virtual/jdk-1.6" + +PN1=${PN%-*} +PN2=${PN#*-} +PNS=${PN1:0:1}${PN2:0:1} + +MY_PV="$(get_version_component_range 4-5)" +MY_PRE="$(get_version_component_range 6-6)" +MY_PRE=${MY_PRE/pre/} + +RESTRICT="strip mirror" +QA_TEXTRELS="opt/${P}/bin/libbreakgen.so" + +DESCRIPTION="IntelliJ IDEA is an intelligent Java IDE" +HOMEPAGE="http://jetbrains.com/idea/" + +if [ -z $MY_PRE ]; then + VER=($(get_all_version_components)) + if [[ "${VER[4]}" == "0" ]]; then + if [[ "${VER[2]}" == "0" ]]; then + SRC_URI="http://download.jetbrains.com/${PN1}/${PN1}${PNS^^}-$(get_version_component_range 1-1).tar.gz" + else + SRC_URI="http://download.jetbrains.com/${PN1}/${PN1}${PNS^^}-$(get_version_component_range 1-2).tar.gz" + fi + else + SRC_URI="http://download.jetbrains.com/${PN1}/${PN1}${PNS^^}-$(get_version_component_range 1-3).tar.gz" + fi +else + SRC_URI="http://download.jetbrains.com/${PN1}/${PN1}${PNS^^}-${MY_PV}.tar.gz" +fi + +LICENSE="IntelliJ-IDEA" +IUSE="" +KEYWORDS="~x86 ~amd64" +S="${WORKDIR}/${PN1}-${PNS^^}-${MY_PV}" + +src_prepare() { + epatch ${FILESDIR}/idea-${SLOT}.sh.patch || die +} + +src_install() { + local dir="/opt/${P}" + local exe="${PN}-${SLOT}" + newconfd "${FILESDIR}/config-${SLOT}" idea-${SLOT} + # config files + insinto "/etc/idea" + mv bin/idea.properties bin/idea-${SLOT}.properties + doins bin/idea-${SLOT}.properties + rm bin/idea-${SLOT}.properties + case $ARCH in + amd64|ppc64) + cat bin/idea64.vmoptions > bin/idea.vmoptions + rm bin/idea64.vmoptions + ;; + esac + mv bin/idea.vmoptions bin/idea-${SLOT}.vmoptions + doins bin/idea-${SLOT}.vmoptions + rm bin/idea-${SLOT}.vmoptions + ln -s /etc/idea/idea-${SLOT}.properties bin/idea.properties + # idea itself + insinto "${dir}" + doins -r * + fperms 755 "${dir}/bin/${PN1}.sh" + fperms 755 "${dir}/bin/fsnotifier" + fperms 755 "${dir}/bin/fsnotifier64" + newicon "bin/${PN1}.png" "${exe}.png" + make_wrapper "${exe}" "/opt/${P}/bin/${PN1}.sh" + make_desktop_entry ${exe} "IntelliJ IDEA ${PV}" "${exe}" "Development;IDE" + # Protect idea conf on upgrade + env_file="${T}/25${PN}-${SLOT}" + echo "CONFIG_PROTECT=\"\${CONFIG_PROTECT} /etc/idea/conf\"" > "${env_file}" || die + doenvd "${env_file}" +} |