java-libpst/java-libpst.spec

84 lines
3.1 KiB
RPMSpec
Raw Normal View History

2020-08-29 15:13:18 +08:00
Name: java-libpst
2024-01-29 17:54:54 +08:00
Version: 0.9.4
2020-08-29 15:13:18 +08:00
Release: 1
Summary: A pure Java library for the reading of Outlook PST and OST files
License: ASL 2.0 and LGPLv3
URL: https://github.com/rjohnsondev/java-libpst/
2024-01-29 17:54:54 +08:00
Source0: https://github.com/rjohnsondev/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
2020-08-29 15:13:18 +08:00
Source1: https://www.gnu.org/licenses/lgpl.txt
2024-01-29 17:54:54 +08:00
Source2: https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
2020-08-29 15:13:18 +08:00
BuildRequires: mvn(junit:junit) maven-local
2024-01-29 17:54:54 +08:00
BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin)
2020-08-29 15:13:18 +08:00
BuildArch: noarch
%description
A library to read PST files with java,
without need for external libraries.
%package help
Summary: Javadoc for %{name}
provides: %{name}-help = %{version}-%{release}
obsoletes: %{name}-help < %{version}-%{release}
%description help
This package contains javadoc for %{name}.
%prep
%setup -q
find -name '*.class' -print -delete
find -name '*.jar' -print -delete
%pom_xpath_set "pom:project/pom:version" %{version}
cp -p %{SOURCE1} LICENSE.LGPL.txt
2024-01-29 17:54:54 +08:00
cp %{SOURCE2} ../pom.xml
2020-08-29 15:13:18 +08:00
sed -i 's/\r//' LICENSE.*.txt README.txt
%mvn_file com.pff:%{name} %{name}
2024-01-29 17:54:54 +08:00
%pom_remove_plugin org.apache.maven.plugins:maven-gpg-plugin
sed -i 's/& 2/and 2/g' src/main/java/com/pff/PSTGlobalObjectId.java
MVN_JAVADOC_PLUGIN_EXTRA_XML="<configuration>
<sourceFileExcludes>
<sourceFileExclude>**/com/pff/PSTActivity.java</sourceFileExclude>
<sourceFileExclude>**/com/pff/PSTMessage.java</sourceFileExclude>
<sourceFileExclude>**/com/pff/PSTObject.java</sourceFileExclude>
<sourceFileExclude>**/com/pff/PSTAttachment.java</sourceFileExclude>
<sourceFileExclude>**/com/pff/PSTFile.java</sourceFileExclude>
<sourceFileExclude>**/com/pff/PSTGlobalObjectId.java</sourceFileExclude>
<sourceFileExclude>**/com/pff/PSTTask.java</sourceFileExclude>
<sourceFileExclude>**/com/pff/PSTContact.java</sourceFileExclude>
<sourceFileExclude>**/com/pff/PSTFolder.java</sourceFileExclude>
<sourceFileExclude>**/com/pff/PSTMessageStore.java</sourceFileExclude>
<sourceFileExclude>**/com/pff/PSTNodeInputStream.java</sourceFileExclude>
<sourceFileExclude>**/com/pff/PSTRss.java</sourceFileExclude>
<sourceFileExclude>**/example/TestGui.java</sourceFileExclude>
</sourceFileExcludes>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>"
%pom_remove_plugin org.apache.maven.plugins:maven-javadoc-plugin
%pom_add_plugin org.apache.maven.plugins:maven-javadoc-plugin:3.0.1 . "$MVN_JAVADOC_PLUGIN_EXTRA_XML"
2020-08-29 15:13:18 +08:00
%build
2024-01-29 17:54:54 +08:00
%mvn_build --xmvn-javadoc
2020-08-29 15:13:18 +08:00
%install
%mvn_install
%files -f .mfiles
%doc README.md README.txt
%license LICENSE.APACHE-2.0.txt LICENSE.LGPL.txt
%files help -f .mfiles-javadoc
%license LICENSE.APACHE-2.0.txt LICENSE.LGPL.txt
%changelog
2024-01-29 17:54:54 +08:00
* Mon Jan 29 2024 Ge Wang <wang__ge@126.com> - 0.9.4-1
- update to version 0.9.4
2020-08-29 15:13:18 +08:00
* Mon Aug 24 2020 huanghaitao <huanghaitao8@huawei.com> - 0.8.1-1
- package init