Skip to content

Commit

Permalink
app-portage/java-ebuilder: initial commit.
Browse files Browse the repository at this point in the history
  Java team package tool for generating maven overlay.
  • Loading branch information
heroxbd committed Oct 9, 2016
1 parent 385a17f commit f278d01
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app-portage/java-ebuilder/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DIST java-ebuilder-0.1.tar.gz 22291 SHA256 0c4dd0f76c0b36c7d736ed2f02ed06244ef7645be45bf7ca83ed27aaafe8787e SHA512 bc058b03da53bab03d7a48b2971f34da812bfd03aff7cc64ee4a3209245f4855bf8095d12c5c506f49b896db69fba09f06814f4c35e13a25c4e8f381d6416637 WHIRLPOOL 9ccacb782eedd8e56a5508f1379098579cd12bd86dac727df4577e218c295fa908cbcab49772934508e3f302607d5f075373948bfec93d214ad08b001b600b4f
EBUILD java-ebuilder-0.1.ebuild 1292 SHA256 cf1071eb609722fe98df90b62a03d38b5731fc71aa7788b61946dee95f0a4b39 SHA512 41634ca7d290cecca374242750a929d0a54670ba17e928c16e8904da4a3842e459b5650bc8c30a52ba4ffdc1a5d0276ebc869fb0353f825d38f31e61be88e0bc WHIRLPOOL 3870c039760262cd00157b571743fbb4d8bfd824a32b243805f181f0a0318f57d7d5318f8c6ac225296f78ff6eea624c4b4e7c6cefa628a534b5db6d3a73fb7a
EBUILD java-ebuilder-9999.ebuild 1292 SHA256 cf1071eb609722fe98df90b62a03d38b5731fc71aa7788b61946dee95f0a4b39 SHA512 41634ca7d290cecca374242750a929d0a54670ba17e928c16e8904da4a3842e459b5650bc8c30a52ba4ffdc1a5d0276ebc869fb0353f825d38f31e61be88e0bc WHIRLPOOL 3870c039760262cd00157b571743fbb4d8bfd824a32b243805f181f0a0318f57d7d5318f8c6ac225296f78ff6eea624c4b4e7c6cefa628a534b5db6d3a73fb7a
60 changes: 60 additions & 0 deletions app-portage/java-ebuilder/java-ebuilder-0.1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright 2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI="6"

if [[ ${PV} == 9999 ]]; then
ECLASS="git-r3"
EGIT_REPO_URI="https://github.com/heroxbd/${PN}.git"
else
SRC_URI="https://github.com/gentoo/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
fi

inherit java-pkg-2 java-pkg-simple prefix ${ECLASS}

DESCRIPTION="Java team tool for semi-automatic creation of ebuilds from pom.xml"
HOMEPAGE="https://github.com/gentoo/java-ebuilder"

LICENSE="GPL-2"
SLOT="0"

DEPEND=">=virtual/jdk-1.8"
RDEPEND=">=virtual/jre-1.8"

S="${WORKDIR}/${P}"

JAVA_SRC_DIR="src/main/java"
JAVA_ADDRES_DIRS="src/main/resources"

MAIN_CLASS="org.gentoo.java.ebuilder.Main"

java_prepare() {
eapply_user
local base_dir="target/classes/"
[[ ! -d "${base_dir}" ]] &&mkdir -p "${base_dir}META-INF"
echo "Manifest-Version: 1.0
Main-Class: ${MAIN_CLASS}" \
>> "${base_dir}META-INF/MANIFEST.MF"
}

src_prepare() {
hprefixify scripts/{{tree,meta}.sh,movl}
eapply_user
}

src_install() {
java-pkg-simple_src_install
java-pkg_dolauncher ${PN} --main ${MAIN_CLASS}

insinto /var/lib/${PN}
doins -r maven
dodir /var/lib/${PN}o/{poms,cache}

dodoc README maven.conf

exeinto /usr/lib/${PN}
doexe scripts/{tree,meta}.sh

dobin scripts/movl
}
60 changes: 60 additions & 0 deletions app-portage/java-ebuilder/java-ebuilder-9999.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright 2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI="6"

if [[ ${PV} == 9999 ]]; then
ECLASS="git-r3"
EGIT_REPO_URI="https://github.com/heroxbd/${PN}.git"
else
SRC_URI="https://github.com/gentoo/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
fi

inherit java-pkg-2 java-pkg-simple prefix ${ECLASS}

DESCRIPTION="Java team tool for semi-automatic creation of ebuilds from pom.xml"
HOMEPAGE="https://github.com/gentoo/java-ebuilder"

LICENSE="GPL-2"
SLOT="0"

DEPEND=">=virtual/jdk-1.8"
RDEPEND=">=virtual/jre-1.8"

S="${WORKDIR}/${P}"

JAVA_SRC_DIR="src/main/java"
JAVA_ADDRES_DIRS="src/main/resources"

MAIN_CLASS="org.gentoo.java.ebuilder.Main"

java_prepare() {
eapply_user
local base_dir="target/classes/"
[[ ! -d "${base_dir}" ]] &&mkdir -p "${base_dir}META-INF"
echo "Manifest-Version: 1.0
Main-Class: ${MAIN_CLASS}" \
>> "${base_dir}META-INF/MANIFEST.MF"
}

src_prepare() {
hprefixify scripts/{{tree,meta}.sh,movl}
eapply_user
}

src_install() {
java-pkg-simple_src_install
java-pkg_dolauncher ${PN} --main ${MAIN_CLASS}

insinto /var/lib/${PN}
doins -r maven
dodir /var/lib/${PN}o/{poms,cache}

dodoc README maven.conf

exeinto /usr/lib/${PN}
doexe scripts/{tree,meta}.sh

dobin scripts/movl
}
11 changes: 11 additions & 0 deletions app-portage/java-ebuilder/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<upstream>
<remote-id type="github">gentoo/java-ebuilder</remote-id>
</upstream>
<maintainer type="person">
<email>[email protected]</email>
<name>Benda Xu</name>
</maintainer>
</pkgmetadata>

0 comments on commit f278d01

Please sign in to comment.