jcifs/jcifs.spec
2020-02-14 11:29:02 +08:00

57 lines
1.9 KiB
RPMSpec

Name: jcifs
Version: 1.3.18
Release: 11
Summary: The Java CIFS Client Library
License: LGPLv2+ and BSD and MIT
URL: http://jcifs.samba.org/
Source0: https://www.jcifs.org/src/old/jcifs-1.3.18.tgz
Source1: http://mirrors.ibiblio.org/pub/mirrors/maven2/jcifs/jcifs/1.3.17/jcifs-1.3.17.pom
Patch0: %{name}-1.3.17-build.patch
BuildArch: noarch
BuildRequires: ant, javapackages-local, mvn(javax.servlet:javax.servlet-api)
Provides: %{name}-javadoc%{?_isa} %{name}-javadoc
Obsoletes: %{name}-javadoc
Provides: %{name}-demo%{?_isa} %{name}-demo
Obsoletes: %{name}-demo
%description
JCIFS is an Open Source client library that implements the CIFS/SMB networking protocol in 100% Java.
CIFS is the standard file sharing protocol on the Microsoft Windows platform (e.g. Map Network Drive ...).
This client is used extensively in production on large Intranets.
%prep
%autosetup -n %{name}_%{version} -p0
find -name '*.class' -delete
find -name '*.jar' -delete
sed -i "s|1.5|1.6|" build.xml
cp -p %{SOURCE1} pom.xml
sed -i "s|<version>1.3.17|<version>%{version}|" pom.xml
%pom_remove_plugin :maven-gpg-plugin
%pom_xpath_set "pom:dependency[pom:groupId = 'javax.servlet']/pom:version" 3.1.0
%pom_xpath_set "pom:dependency[pom:groupId = 'javax.servlet']/pom:artifactId" javax.servlet-api
%mvn_file %{name}:%{name} %{name}
%mvn_alias %{name}:%{name} org.samba.jcifs:jcifs
%build
export CLASSPATH=$(build-classpath glassfish-servlet-api)
export OPT_JAR_LIST=:
%ant jar javadoc docs
%mvn_artifact pom.xml %{name}-%{version}.jar
%install
%mvn_install -J docs/api
install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/examples
cp -pr examples/*.java $RPM_BUILD_ROOT%{_datadir}/%{name}/examples
%files -f .mfiles
%doc README.txt docs/*.{html,txt,gif}
%license LICENSE.txt
%{_datadir}/%{name}/*
%{_javadocdir}/%{name}/*
%changelog
* Fri Feb 14 2020 gulining<gulinin1@huawei.com> - 1.3.18-11
- Package init