Fridrich Strba 2024-10-06 17:13:11 +00:00 committed by Git OBS Bridge
commit 970c23132e
7 changed files with 300 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:23cf8dedd3a5841e15ab0a75a4e7556c67b01f93e7fe0524ddc8a04fa49eda5f
size 24552

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.subsystem</artifactId>
<version>1.1.0</version>
<description>OSGi Companion Code for org.osgi.service.subsystem Version 1.1.0.</description>
<name>org.osgi:org.osgi.service.subsystem</name>
<url>http://www.osgi.org/</url>
<organization>
<name>OSGi Alliance</name>
<url>http://www.osgi.org/</url>
</organization>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://opensource.org/licenses/apache2.0.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://osgi.org/git/build.git</url>
<connection>scm:git:https://osgi.org/git/build.git</connection>
<developerConnection>scm:git:https://osgi.org/git/build.git</developerConnection>
</scm>
<developers>
<developer>
<id>osgi</id>
<email>info@osgi.org</email>
<name>OSGi Alliance</name>
<organization>OSGi Alliance</organization>
</developer>
</developers>
</project>

View File

@ -0,0 +1,130 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.osgi.service.subsystem" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property name="compiler.release" value="8"/>
<property name="compiler.source" value="1.${compiler.release}"/>
<property name="compiler.target" value="${compiler.source}"/>
<property name="project.artifactId" value="org.osgi.service.subsystem"/>
<property name="project.groupId" value="org.osgi"/>
<property name="project.version" value="1.1.0"/>
<property name="project.description" value="OSGi Companion Code for org.osgi.service.subsystem Version ${project.version}."/>
<property name="project.organization.name" value="OSGi Alliance"/>
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
<property name="build.dir" value="target"/>
<property name="build.outputDir" value="${build.dir}/classes"/>
<property name="build.srcDir" value="src/main/java"/>
<property name="build.resourceDir" value="src/main/resources"/>
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
<!-- ====================================================================== -->
<!-- Defining classpaths -->
<!-- ====================================================================== -->
<path id="build.classpath">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- ====================================================================== -->
<!-- Cleaning up target -->
<!-- ====================================================================== -->
<target name="clean" description="Clean the output directory">
<delete dir="${build.dir}"/>
</target>
<!-- ====================================================================== -->
<!-- Compilation target -->
<!-- ====================================================================== -->
<target name="compile" description="Compile the code">
<mkdir dir="${build.outputDir}"/>
<javac destdir="${build.outputDir}"
nowarn="false"
debug="true"
optimize="false"
deprecation="true"
release="${compiler.release}"
target="${compiler.target}"
verbose="false"
fork="false"
source="${compiler.source}">
<src>
<pathelement location="${build.srcDir}"/>
</src>
<classpath refid="build.classpath"/>
</javac>
</target>
<!-- ====================================================================== -->
<!-- Javadoc target -->
<!-- ====================================================================== -->
<target name="javadoc" description="Generates the Javadoc of the application">
<javadoc sourcepath="${build.srcDir}"
packagenames="*"
destdir="${reporting.outputDirectory}/apidocs"
access="protected"
source="${compiler.source}"
verbose="false"
version="true"
use="true"
author="true"
splitindex="false"
nodeprecated="false"
nodeprecatedlist="false"
notree="false"
noindex="false"
nohelp="false"
nonavbar="false"
serialwarn="false"
charset="ISO-8859-1"
linksource="false"
breakiterator="false">
<classpath refid="build.classpath"/>
</javadoc>
</target>
<!-- ====================================================================== -->
<!-- Package target -->
<!-- ====================================================================== -->
<target name="package" depends="compile" description="Package the application">
<jar jarfile="${build.dir}/${build.finalName}.jar"
compress="true"
index="false"
basedir="${build.outputDir}"
excludes="**/package.html">
<manifest>
<attribute name="Bundle-Description" value="${project.description}"/>
<attribute name="Bundle-ManifestVersion" value="2"/>
<attribute name="Bundle-Name" value="${project.artifactId}"/>
<attribute name="Bundle-SymbolicName" value="${project.artifactId}"/>
<attribute name="Bundle-Vendor" value="${project.organization.name}"/>
<attribute name="Bundle-Version" value="${project.version}"/>
<attribute name="Export-Package" value="org.osgi.service.subsystem;version=&quot;1.1&quot;;uses:=&quot;org.osgi.framework,org.osgi.resource&quot;"/>
<attribute name="Import-Package" value="java.io,java.lang,java.security,java.util,org.osgi.framework;version=&quot;[1.10,2)&quot;,org.osgi.resource;version=&quot;[1.0,2)&quot;"/>
<attribute name="JavaPackages-ArtifactId" value="${project.artifactId}"/>
<attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
<attribute name="JavaPackages-Version" value="${project.version}"/>
<attribute name="Require-Capability" value="osgi.ee;filter:=&quot;(&amp;(osgi.ee=JavaSE)(version=${compiler.target}))&quot;"/>
</manifest>
</jar>
</target>
<!-- ====================================================================== -->
<!-- A dummy target for the package named after the type it creates -->
<!-- ====================================================================== -->
<target name="jar" depends="package" description="Builds the jar for the application"/>
</project>

View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Sun Oct 6 17:13:03 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Initial packaging

105
osgi-service-subsystem.spec Normal file
View File

@ -0,0 +1,105 @@
#
# spec file for package osgi-service-subsystem
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: osgi-service-subsystem
Version: 1.1.0
Release: 0
Summary: OSGi Service Log
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://www.osgi.org
Source0: https://repo1.maven.org/maven2/org/osgi/org.osgi.service.subsystem/%{version}/org.osgi.service.subsystem-%{version}-sources.jar
Source1: https://repo1.maven.org/maven2/org/osgi/org.osgi.service.subsystem/%{version}/org.osgi.service.subsystem-%{version}.pom
Source100: %{name}-build.xml
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: javapackages-local >= 1.8
BuildRequires: osgi-annotation
BuildRequires: osgi-core
BuildRequires: unzip
BuildArch: noarch
%description
OSGi Companion Code for org.osgi.service.subsystem Version 1.1.0.
%package javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description javadoc
This package provides %{summary}.
%prep
%setup -q -c
mkdir -p src/main/java
mv org src/main/java/
cp -p %{SOURCE1} pom.xml
cp -p %{SOURCE100} build.xml
%pom_add_dep org.osgi:osgi.annotation::provided
%pom_add_dep org.osgi:osgi.core::provided
# not needed for this build but useful to regenerate the osgi manifest
# when we change version
%pom_xpath_inject pom:project '
<packaging>bundle</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Name>${project.artifactId}</Bundle-Name>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
</instructions>
</configuration>
</plugin>
</plugins>
</build>'
%build
mkdir -p lib
build-jar-repository -s lib osgi-annotation osgi-core
ant jar javadoc
%install
# jar
install -dm 0755 %{buildroot}%{_javadir}/%{name}
install -pm 0644 target/org.osgi.service.subsystem-%{version}.jar %{buildroot}%{_javadir}/%{name}/org.osgi.service.subsystem.jar
# pom
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{name}/org.osgi.service.subsystem.pom
%add_maven_depmap %{name}/org.osgi.service.subsystem.pom %{name}/org.osgi.service.subsystem.jar
# javadoc
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles
%license LICENSE
%files javadoc
%{_javadocdir}/%{name}
%license LICENSE
%changelog