Gentoo Archives: gentoo-commits

From: Florian Schmaus <flow@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/felix-main/
Date: Thu, 03 Nov 2022 20:45:56
Message-Id: 1667508346.6f6e1abdeb7485ecdeeeb134dea2206490e16b0d.flow@gentoo
1 commit: 6f6e1abdeb7485ecdeeeb134dea2206490e16b0d
2 Author: Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
3 AuthorDate: Wed Sep 21 17:43:47 2022 +0000
4 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 3 20:45:46 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f6e1abd
7
8 dev-java/felix-main: new package, add 7.0.5
9
10 Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
11 Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
12
13 dev-java/felix-main/Manifest | 1 +
14 dev-java/felix-main/felix-main-7.0.5.ebuild | 74 +++++++++++++++++++++++++++++
15 dev-java/felix-main/metadata.xml | 15 ++++++
16 3 files changed, 90 insertions(+)
17
18 diff --git a/dev-java/felix-main/Manifest b/dev-java/felix-main/Manifest
19 new file mode 100644
20 index 000000000000..91eadc1ce506
21 --- /dev/null
22 +++ b/dev-java/felix-main/Manifest
23 @@ -0,0 +1 @@
24 +DIST felix-main-7.0.5.tar.gz 255198 BLAKE2B 289e2305b15c28f985bee1d8687db6ecb5098a2086da6fd32a7db8572f83a1ac37e49deeb89d657d48b943a626d400caccd8185ced565e8c65aa558395aeef05 SHA512 e06f6c330a73100a739575e92a6f0af263a98643bbd6fd6661e799c2a11c8c9d9589f1f5b8802799ffcae7007e8362c629055fa8b25a50a4fa736ed2ba2955b0
25
26 diff --git a/dev-java/felix-main/felix-main-7.0.5.ebuild b/dev-java/felix-main/felix-main-7.0.5.ebuild
27 new file mode 100644
28 index 000000000000..2fbccc53b90c
29 --- /dev/null
30 +++ b/dev-java/felix-main/felix-main-7.0.5.ebuild
31 @@ -0,0 +1,74 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +# Skeleton command:
36 +# java-ebuilder --generate-ebuild --workdir . --pom pom.xml --download-uri mirror://apache/felix/org.apache.felix.main-7.0.5-source-release.tar.gz --slot 0 --keywords "~amd64" --ebuild felix-main-7.0.5.ebuild
37 +
38 +EAPI=8
39 +
40 +JAVA_PKG_IUSE="doc source"
41 +MAVEN_ID="org.apache.felix:org.apache.felix.main:7.0.5"
42 +
43 +inherit java-pkg-2 java-pkg-simple
44 +
45 +DESCRIPTION="Open source OSGi framework by Apache Software Foundation"
46 +HOMEPAGE="https://felix.apache.org/documentation/index.html"
47 +SRC_URI="mirror://apache/felix/org.apache.${PN//-/.}-${PV}-source-release.tar.gz -> ${P}.tar.gz"
48 +
49 +LICENSE="Apache-2.0"
50 +SLOT="0"
51 +KEYWORDS="~amd64"
52 +
53 +# Common dependencies
54 +# POM: pom.xml
55 +# org.apache.felix:org.apache.felix.framework:7.0.5 -> >=dev-java/felix-framework-7.0.5:0
56 +
57 +CP_DEPEND="~dev-java/felix-framework-${PV}:0"
58 +
59 +DEPEND="
60 + >=virtual/jdk-1.8:*
61 + ${CP_DEPEND}
62 +"
63 +
64 +RDEPEND="
65 + >=virtual/jre-1.8:*
66 + ${CP_DEPEND}
67 +"
68 +
69 +DOCS=( DEPENDENCIES NOTICE )
70 +
71 +S="${WORKDIR}/org.apache.felix.main-${PV}"
72 +
73 +JAVA_MAIN_CLASS="org.apache.felix.main.Main"
74 +JAVA_RESOURCE_DIRS="src/main/resources"
75 +JAVA_SRC_DIR="src/main/java"
76 +
77 +src_prepare() {
78 + default
79 + # 58,91 pom.xml
80 + cat > src/main/java/module-info.java <<-EOF || die
81 + $( sed -n '/<moduleInfoSource>/,/<\/moduleInfoSource/p' pom.xml \
82 + | grep -v moduleInfoSource )
83 + EOF
84 +
85 + # according to pom.xml, line 91
86 + local add_opens="$( sed -n '/<Add-opens>/,/<\/Add-opens/p' pom.xml \
87 + | grep -v Add-opens | tr -s '[:space:]')" || die
88 + mkdir src/main/resources/META-INF || die
89 + echo "Add-opens:${add_opens}" >> src/main/resources/META-INF/MANIFEST.MF \
90 + || die "creating MANIFEST.MF failed"
91 +
92 + # no idea what to do with felix.log.level=${log.level} here, but ...
93 + sed -e 's/{dollar}//' -i src/main/resources/config.properties || die
94 +
95 + # bundling some classes from felix-framework according to 78,94 pom.xml
96 + # if we don't bundle compilation of module-info would fail
97 + cd src/main/resources || die
98 + jar xvf "$(java-pkg_getjar --build-only felix-framework felix-framework.jar)" \
99 + default.properties org/ || die "felix-framework.jar does not exist"
100 +}
101 +
102 +src_install() {
103 + dodoc -r doc
104 + java-pkg-simple_src_install
105 +}
106
107 diff --git a/dev-java/felix-main/metadata.xml b/dev-java/felix-main/metadata.xml
108 new file mode 100644
109 index 000000000000..2052253c1b6e
110 --- /dev/null
111 +++ b/dev-java/felix-main/metadata.xml
112 @@ -0,0 +1,15 @@
113 +<?xml version="1.0" encoding="UTF-8"?>
114 +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
115 +<pkgmetadata>
116 + <maintainer type="project">
117 + <email>java@g.o</email>
118 + </maintainer>
119 + <upstream>
120 + <bugs-to>https://issues.apache.org/jira/browse/FELIX</bugs-to>
121 + <doc>https://felix.apache.org/documentation/</doc>
122 + <remote-id type="github">apache/felix-dev</remote-id>
123 + </upstream>
124 + <longdescription>
125 + Apache Felix is a community effort to implement the OSGi Framework and Service platform and other interesting OSGi-related technologies.
126 + </longdescription>
127 +</pkgmetadata>