source: subversion/applications/utils/gentoo/eclass/josm-plugin-scm.eclass @ 6091

Last change on this file since 6091 was 6062, checked in by dennis_de, 12 years ago

Make use of get_libdir and use the menu/icon for scm-version as well

File size: 1.2 KB
Line 
1# Copyright 1999-2007 Gentoo Technologies, Inc.
2# Distributed under the terms of the GNU General Public License v2
3# $Header: $
4# Build upon the official Gentoo-Ebuild by Hanno Boeck
5
6inherit java-pkg-2 java-ant-2 subversion eutils
7
8JOSM_PLUGIN=${PN/josm-plugin-/}
9
10DESCRIPTION="Plugin \"${JOSM_PLUGIN}\" for josm"
11HOMEPAGE=""
12SRC_URI=""
13LICENSE="GPL-2"
14SLOT="0"
15KEYWORDS="~amd64 ~x86"
16DEPEND=">=virtual/jdk-1.5
17        sci-geosciences/josm"
18
19IUSE=""
20
21EXPORT_FUNCTIONS src_unpack src_compile src_install
22ESVN_REPO_URI="http://svn.openstreetmap.org/applications/editors/josm/plugins/${JOSM_PLUGIN}"
23
24josm-plugin-scm_src_unpack() {
25        subversion_src_unpack
26        #HACK but easy way to have a REVISION
27        sed -i -e 's#output="REVISION"#output="_REVISION"#' build.xml
28        svn info --xml ${ESVN_STORE_DIR}/${ESVN_PROJECT}/${JOSM_PLUGIN} > REVISION
29}
30
31josm-plugin-scm_src_compile() {
32        local JAR="${ROOT}/usr/$(get_libdir)/josm/josm.jar"
33        mkdir dist
34        eant -Djosm=${JAR} -Djosm.jar=${JAR} -Dplugin.jar="dist/${JOSM_PLUGIN}.jar" -f build.xml
35}
36
37josm-plugin-scm_src_install() {
38        insinto /usr/$(get_libdir)/josm/plugins
39
40        doins dist/${JOSM_PLUGIN}.jar
41        #for i in dist; do
42        #       [[ -f ${i}/${JOSM_PLUGIN}.jar ]] && doins ${i}/${JOSM_PLUGIN}.jar && break
43        #done
44}
Note: See TracBrowser for help on using the repository browser.