commit:     fd1926f50b2555db3d637c377223551e3415adf9
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 22 19:17:51 2016 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Fri Jan 22 19:18:41 2016 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=fd1926f5

sci-biology/OBO-Edit: Use ecvs_clean to clean workdir

* add missing die
* Fix quoting

Package-Manager: portage-2.2.27
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 sci-biology/OBO-Edit/OBO-Edit-2.1.0.ebuild   | 35 +++++++++++++++--------
 sci-biology/OBO-Edit/OBO-Edit-2.1.1.6.ebuild | 42 +++++++++++++++++-----------
 sci-biology/OBO-Edit/metadata.xml            |  2 +-
 3 files changed, 51 insertions(+), 28 deletions(-)

diff --git a/sci-biology/OBO-Edit/OBO-Edit-2.1.0.ebuild 
b/sci-biology/OBO-Edit/OBO-Edit-2.1.0.ebuild
index f5d9948..c1b900a 100644
--- a/sci-biology/OBO-Edit/OBO-Edit-2.1.0.ebuild
+++ b/sci-biology/OBO-Edit/OBO-Edit-2.1.0.ebuild
@@ -1,18 +1,18 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
 EAPI=5
 
-inherit toolchain-funcs versionator java-pkg-2
+inherit eutils toolchain-funcs versionator java-pkg-2
 
 MY_PV=$(replace_all_version_separators '-')
 
 DESCRIPTION="Java-based editor optimized for the OBO biological ontology file 
format"
 HOMEPAGE="http://www.oboedit.org/";
 SRC_URI="
-       
http://sourceforge.net/projects/geneontology/files/OBO-Edit%202%20%5BLatest%20versions%5D/OBO-Edit%20"${PV}"/"${MY_PV}"_unix_install4j.sh/download
 -> OBO-Edit_unix_install4j-"${PV}".sh
-       
http://sourceforge.net/projects/geneontology/files/OBO-Edit%202%20%5BLatest%20versions%5D/OBO-Edit%20"${PV}"/ReleaseNotes-"${PV}".txt";
+       
http://sourceforge.net/projects/geneontology/files/OBO-Edit%202%20%5BLatest%20versions%5D/OBO-Edit%20${PV}/${MY_PV}_unix_install4j.sh/download
 -> OBO-Edit_unix_install4j-${PV}.sh
+       
http://sourceforge.net/projects/geneontology/files/OBO-Edit%202%20%5BLatest%20versions%5D/OBO-Edit%20${PV}/ReleaseNotes-${PV}.txt";
 
 LICENSE="OBO-Edit" # Artistic-like
 SLOT="0"
@@ -25,17 +25,30 @@ RDEPEND="virtual/jre"
 S="${WORKDIR}"
 
 src_install(){
-       mkdir -p "${D}"/opt/OBO-Edit2/.install4j || die "Cannot pre-create 
"${D}"/opt/OBO-Edit2/.install4j/"
-       sed "s#\"\${D}\"#"${D}"#g" "${FILESDIR}"/response.varfile > 
"${D}"/opt/OBO-Edit2/.install4j/response.varfile || die "sed failed"
-       sed "s#/bin/java\" -Dinstall4j.jvmDir#/bin/java\" 
-Duser.home="${D}"/../temp -Dinstall4j.jvmDir#" -i 
"${DISTDIR}"/OBO-Edit_unix_install4j-"${PV}".sh || die "failed to set userHome 
value"
-
-       sh "${DISTDIR}"/OBO-Edit_unix_install4j-"${PV}".sh -q -overwrite 
--varfile="${D}"/opt/OBO-Edit2/.install4j/response.varfile 
--destination="${D}"/opt/OBO-Edit2 -dir "${D}"/opt/OBO-Edit2 || die "Failed to 
run the self-extracting "${DISTDIR}"/OBO-Edit_unix_install4j-"${PV}".sh file"
+       dodir /opt/OBO-Edit2/.install4j
+
+       sed \
+               -e "s#\"\${D}\"#"${D}"#g" \
+               "${FILESDIR}"/response.varfile \
+               > "${D}"/opt/OBO-Edit2/.install4j/response.varfile || die "sed 
failed"
+
+       sed \
+               -e "s#/bin/java\" -Dinstall4j.jvmDir#/bin/java\" 
-Duser.home="${D}"/../temp -Dinstall4j.jvmDir#" \
+               -i "${DISTDIR}"/OBO-Edit_unix_install4j-"${PV}".sh || die 
"failed to set userHome value"
+
+       sh "${DISTDIR}"/OBO-Edit_unix_install4j-"${PV}".sh \
+               -q -overwrite \
+               --varfile="${D}"/opt/OBO-Edit2/.install4j/response.varfile \
+               --destination="${D}"/opt/OBO-Edit2 \
+               -dir "${D}"/opt/OBO-Edit2 \
+               || die "Failed to run the self-extracting 
${DISTDIR}/OBO-Edit_unix_install4j-"${PV}".sh file"
        find . -name firstrun -delete || die
-       find . -name .svn -exec rm -rf '{}' \; || die
+
+       esvn_clean
 
        insinto /opt/
        doins -r OBO-Edit2
-       chmod 755 "${ED}"/opt/OBO-Edit2/*
+       chmod 755 "${ED}"/opt/OBO-Edit2/* || die
 
        dodoc "${DISTDIR}"/ReleaseNotes-2.1.0.txt
 }

diff --git a/sci-biology/OBO-Edit/OBO-Edit-2.1.1.6.ebuild 
b/sci-biology/OBO-Edit/OBO-Edit-2.1.1.6.ebuild
index 0a3ca5d..4aa6496 100644
--- a/sci-biology/OBO-Edit/OBO-Edit-2.1.1.6.ebuild
+++ b/sci-biology/OBO-Edit/OBO-Edit-2.1.1.6.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
 EAPI=5
 
-inherit toolchain-funcs versionator java-pkg-2
+inherit eutils toolchain-funcs versionator java-pkg-2
 
 # MY_PV=$(replace_all_version_separators '-')
 MY_PV="oboedit_2_1_1-b6"
@@ -14,8 +14,8 @@ MY_PV=$(replace_all_version_separators '-')
 DESCRIPTION="Java-based editor optimized for the OBO biological ontology file 
format"
 HOMEPAGE="http://www.oboedit.org/";
 SRC_URI="
-       
http://downloads.sourceforge.net/project/geneontology/OBO-Edit%202%20%5BLatest%20versions%5D/"${MY_VER}"/"${MY_PV}"_unix_install4j.sh
 -> "${PN}"_unix_install4j-"${PV}".sh
-       
http://sourceforge.net/projects/geneontology/files/OBO-Edit%202%20%5BLatest%20versions%5D/"${MY_PV}"/ReleaseNotes-"${MY_VER}".txt
 -> "${PN}"_ReleaseNotes-"${PV}".txt"
+       
http://downloads.sourceforge.net/project/geneontology/OBO-Edit%202%20%5BLatest%20versions%5D/${MY_VER}/${MY_PV}_unix_install4j.sh
 -> ${PN}_unix_install4j-${PV}.sh
+       
http://sourceforge.net/projects/geneontology/files/OBO-Edit%202%20%5BLatest%20versions%5D/${MY_PV}/ReleaseNotes-${MY_VER}.txt
 -> ${PN}_ReleaseNotes-${PV}.txt"
 
 LICENSE="OBO-Edit" # Artistic-like
 SLOT="0"
@@ -36,24 +36,26 @@ pkg_setup() {
 }
 
 src_prepare(){
-       mkdir -p "${D}"/opt/OBO-Edit2/.install4j || die "Cannot pre-create 
"${D}"/opt/OBO-Edit2/.install4j/"
-       mkdir -p "${D}"/usr/bin
+       dodir /opt/OBO-Edit2/.install4j /usr/bin
 
        # 
/var/tmp/portage/sci-biology/OBO-Edit-2.1.1.6/image//opt/OBO-Edit2/.install4j/response.varfile
        sed -e "s#\"\${D}\"#"${D}"#g" "${FILESDIR}"/response.varfile | \
        sed -e "s#\"\${TMPDIR}\"#"${TMPDIR}"#g" | \
-       sed -e 
"[email protected]=/usr/local/bin@#sys.symlinkDir=/usr/local/bin@" > \
-                                                               
"${D}"/opt/OBO-Edit2/.install4j/response.varfile || die "sed failed"
-       cp -r "${D}"/opt/OBO-Edit2/.install4j "${TMPDIR}"
+       sed -e 
"[email protected]=/usr/local/bin@#sys.symlinkDir=/usr/local/bin@" \
+       > "${D}"/opt/OBO-Edit2/.install4j/response.varfile || die "sed failed"
+       cp -r "${D}"/opt/OBO-Edit2/.install4j "${TMPDIR}" || die
 
        # for user root install4j writes into 
/opt/icedtea-bin-7.2.0/jre/.systemPrefs or whatever it
        # found via JAVA_HOME or similar variables
        # for other users it writes into $HOME/.java/.userPrefs/
 
        # trick setting -Djava.util.prefs.systemRoot="${TMPDIR}" does not work
-       sed -e "s@/bin/java\" 
-Dinstall4j.jvmDir=\"\$app_java_home\"@/bin/java\" -Duser.home="${TMPDIR}" 
-Dinstall4j.jvmDir="${TMPDIR}" -Dsys.symlinkDir="${D}"usr/bin 
-Djava.util.prefs.systemRoot="${TMPDIR}"@" -i 
"${DISTDIR}"/"${PN}"_unix_install4j-"${PV}".sh || die "failed to set userHome 
and jvmDir where JAVA .systemPrefs can be found"
+       sed \
+               -e "s@/bin/java\" 
-Dinstall4j.jvmDir=\"\$app_java_home\"@/bin/java\" -Duser.home="${TMPDIR}" 
-Dinstall4j.jvmDir="${TMPDIR}" -Dsys.symlinkDir="${D}"usr/bin 
-Djava.util.prefs.systemRoot="${TMPDIR}"@" \
+               -i "${DISTDIR}"/"${PN}"_unix_install4j-"${PV}".sh \
+               || die "failed to set userHome and jvmDir where JAVA 
.systemPrefs can be found"
 
-       chmod u+rx "${DISTDIR}"/"${PN}"_unix_install4j-"${PV}".sh
+       chmod u+rx "${DISTDIR}"/"${PN}"_unix_install4j-"${PV}".sh || die
 }
 
 src_install(){
@@ -62,12 +64,20 @@ src_install(){
        # cat "${TMPDIR}"/.install4j/response.varfile
        # chmod a-w "${TMPDIR}"/.install4j/response.varfile
 
-       INSTALL4J_KEEP_TEMP="yes" HOME="${TMPDIR}" 
"${DISTDIR}"/"${PN}"_unix_install4j-"${PV}".sh -q 
--varfile="${TMPDIR}"/.install4j/response.varfile 
--destination="${D}"/opt/OBO-Edit2 -dir "${D}"/opt/OBO-Edit2 || die "Failed to 
run the self-extracting "${DISTDIR}"/"${PN}"_unix_install4j-"${PV}".sh file"
-       find . -name firstrun -delete
-       find . -name .svn -exec rm -rf '{}' \;
+       INSTALL4J_KEEP_TEMP="yes" \
+               HOME="${TMPDIR}" \
+               sh "${DISTDIR}"/"${PN}"_unix_install4j-"${PV}".sh -q \
+               --varfile="${TMPDIR}"/.install4j/response.varfile \
+               --destination="${D}"/opt/OBO-Edit2 \
+               -dir "${D}"/opt/OBO-Edit2 \
+               || die "Failed to run the self-extracting 
${DISTDIR}/${PN}_unix_install4j-${PV}.sh file"
+
+       find . -name firstrun -delete || die
+
+       esvn_clean
 
        dodoc "${DISTDIR}"/"${PN}"_ReleaseNotes-"${PV}".txt
 
-       echo "PATH=/opt/OBO-Edit2" > 99OBO-Edit
-       doenvd 99OBO-Edit || die
+       echo "PATH=/opt/OBO-Edit2" > 99OBO-Edit || die
+       doenvd 99OBO-Edit
 }

diff --git a/sci-biology/OBO-Edit/metadata.xml 
b/sci-biology/OBO-Edit/metadata.xml
index c0878bc..51e9384 100644
--- a/sci-biology/OBO-Edit/metadata.xml
+++ b/sci-biology/OBO-Edit/metadata.xml
@@ -1,4 +1,4 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
 <pkgmetadata>
        <herd>sci-biology</herd>

Reply via email to