Upgrade version to 2.18.0

Signed-off-by: cherry530 <707078654@qq.com>
(cherry picked from commit bf0204104aea4a7493a9cc9ccd49b02984f7f3fe)
This commit is contained in:
cherry530 2023-08-10 14:31:20 +08:00 committed by openeuler-sync-bot
parent 85197d86fa
commit 88e8bba39a
4 changed files with 65 additions and 31 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1,13 +1,17 @@
%global majorversion 2
Name: metadata-extractor2
Version: 2.11.0
Version: 2.18.0
Release: 1
Summary: Extracts EXIF, IPTC, XMP, ICC and other metadata from image files
License: ASL 2.0
URL: http://drewnoakes.com/code/exif/
Source0: http://github.com/drewnoakes/metadata-extractor/archive/refs/tags/%{version}.tar.gz
Source0: https://github.com/drewnoakes/metadata-extractor/archive/%{version}/metadata-extractor-%{version}.tar.gz
Source1: xmvn-reactor
BuildRequires: maven-local mvn(com.adobe.xmp:xmpcore) mvn(junit:junit)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) mvn(org.sonatype.oss:oss-parent:pom:)
BuildRequires: maven
Requires: javapackages-tools
Provides: mvn(com.drewnoakes:metadata-extractor) = %{version}-%{release}
BuildArch: noarch
@ -24,52 +28,42 @@ This package contains javadoc for %{name}.
%setup -q -n metadata-extractor-%{version}
find -name '*.jar' -delete
find -name '*.class' -delete
%pom_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin
%pom_remove_plugin org.apache.maven.plugins:maven-gpg-plugin
%pom_remove_plugin org.apache.maven.plugins:maven-source-plugin
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-javadoc-plugin']/pom:executions"
%pom_xpath_set "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-jar-plugin']/pom:configuration/pom:archive/pom:manifest/pom:addClasspath" false
%pom_xpath_inject "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-jar-plugin']/pom:configuration/pom:archive/pom:manifest" "<mainClass>com.drew.imaging.ImageMetadataReader</mainClass>"
%pom_xpath_remove "pom:build/pom:directory"
%pom_xpath_remove "pom:build/pom:outputDirectory"
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-javadoc-plugin']/pom:configuration/pom:bottom"
%pom_xpath_set "pom:project/pom:packaging" bundle
%pom_add_plugin org.apache.felix:maven-bundle-plugin . "
<extensions>true</extensions>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>"
for s in Source/com/drew/lang/GeoLocation.java \
Source/com/drew/metadata/icc/IccDescriptor.java;do
native2ascii -encoding UTF8 ${s} ${s}
done
sed -i 's/\r//' LICENSE README.md Resources/javadoc-stylesheet.css
%mvn_file :metadata-extractor %{name}
%mvn_alias :metadata-extractor "drew:metadata-extractor"
%mvn_compat_version ":metadata-extractor" %{majorversion}
cp %{SOURCE1} ./.xmvn-reactor
echo `pwd` > absolute_prefix.log
sed -i 's/\//\\\//g' absolute_prefix.log
absolute_prefix=`head -n 1 absolute_prefix.log`
sed -i 's/absolute-prefix/'"$absolute_prefix"'/g' .xmvn-reactor
%build
%mvn_build
mvn package org.apache.maven.plugins:maven-javadoc-plugin:aggregate
mkdir -p target/site/apidocs
mv Output/maven/apidocs target/site/apidocs
%install
%mvn_install
%jpackage_script com.drew.imaging.ImageMetadataReader "" "" %{name}-%{majorversion}:xmpcore %{name} true
%files -f .mfiles
%files
%{_bindir}/*
%doc README.md
%license LICENSE
%attr(0644,root,root) /usr/share/maven-metadata/metadata-extractor2.xml
%attr(0644,root,root) /usr/share/java/metadata-extractor2/metadata-extractor.jar
%attr(0644,root,root) /usr/share/maven-poms/metadata-extractor2/metadata-extractor.pom
%files javadoc -f .mfiles-javadoc
%files javadoc
%license LICENSE
/usr/share/javadoc/metadata-extractor2
%changelog
* Thu Aug 10 2023 xu_ping <707078654@qq.com> - 2.18.0-1
- Update to 2.18.0
* Mon May 30 2022 xigaoxinyan <xigaoxinyan@h-partners.com> - 2.11.0-1
- Update to 2.11.0

40
xmvn-reactor Normal file
View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://fedorahosted.org/xmvn/METADATA/3.0.0">
<artifacts>
<artifact>
<groupId>com.drewnoakes</groupId>
<artifactId>metadata-extractor</artifactId>
<version>2.18.0</version>
<path>absolute-prefix/Output/maven/metadata-extractor-2.18.0.jar</path>
<properties>
<type>bundle</type>
<requiresJava>1.6</requiresJava>
</properties>
<dependencies>
<dependency>
<groupId>com.adobe.xmp</groupId>
<artifactId>xmpcore</artifactId>
<requestedVersion>5.1.3</requestedVersion>
</dependency>
</dependencies>
</artifact>
<artifact>
<groupId>com.drewnoakes</groupId>
<artifactId>metadata-extractor</artifactId>
<extension>pom</extension>
<version>2.18.0</version>
<path>absolute-prefix/pom.xml</path>
<properties>
<type>bundle</type>
<requiresJava>1.6</requiresJava>
</properties>
<dependencies>
<dependency>
<groupId>com.adobe.xmp</groupId>
<artifactId>xmpcore</artifactId>
<requestedVersion>5.1.3</requestedVersion>
</dependency>
</dependencies>
</artifact>
</artifacts>
</metadata>