58 lines
2.0 KiB
RPMSpec
58 lines
2.0 KiB
RPMSpec
|
|
Name: jsonic
|
||
|
|
Version: 1.3.0
|
||
|
|
Release: 1
|
||
|
|
Summary: Simple JSON encoder/decoder for Java
|
||
|
|
License: ASL 2.0
|
||
|
|
URL: https://repo1.maven.org/maven2/net/arnx/jsonic
|
||
|
|
Source0: https://repo1.maven.org/maven2/net/arnx/%{name}/%{version}/%{name}-%{version}-sources.jar
|
||
|
|
Source1: https://repo1.maven.org/maven2/net/arnx/%{name}/%{version}/%{name}-%{version}.pom
|
||
|
|
Source2: https://www.apache.org/licenses/LICENSE-2.0.txt
|
||
|
|
Patch0: %{name}-%{version}-pom.patch
|
||
|
|
Patch1: %{name}-%{version}-servlet.patch
|
||
|
|
BuildRequires: maven-local mvn(javax.servlet:javax.servlet-api)
|
||
|
|
BuildRequires: mvn(org.apache.commons:commons-logging) mvn(org.springframework:spring-beans)
|
||
|
|
BuildRequires: mvn(org.springframework:spring-context) mvn(org.springframework:spring-core)
|
||
|
|
BuildRequires: mvn(org.springframework:spring-web) mvn(org.sonatype.sisu:sisu-guice)
|
||
|
|
BuildRequires: mvn(org.sonatype.sisu.inject:guice-servlet)
|
||
|
|
BuildArch: noarch
|
||
|
|
%description
|
||
|
|
Jsonic is a JSON encoding/decoding library for Java implementing RFC 4627
|
||
|
|
(The application/JSON Media Type for JavaScript Object Notation).
|
||
|
|
Encoding/decoding of primitive types and full Java objects is supported.
|
||
|
|
|
||
|
|
%package javadoc
|
||
|
|
Summary: Javadoc for %{name}
|
||
|
|
Provides: %{name}-javadoc = %{version}-%{release}
|
||
|
|
Obsoletes: %{name}-javadoc < %{version}-%{release}
|
||
|
|
%description javadoc
|
||
|
|
This package contains javadoc for %{name}.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -c -n %{name}-%{version}
|
||
|
|
cp %{SOURCE1} ./pom.xml
|
||
|
|
cp %{SOURCE2} ./LICENSE.txt
|
||
|
|
mkdir -p ./src/java
|
||
|
|
mv ./net ./src/java/
|
||
|
|
find -name "*.class" -print -delete
|
||
|
|
find -name "*.jar" -print -delete
|
||
|
|
%patch0 -p0
|
||
|
|
%patch1 -p1
|
||
|
|
sed -i 's/\r//' LICENSE.txt
|
||
|
|
%mvn_file : %{name}
|
||
|
|
|
||
|
|
%build
|
||
|
|
%mvn_build
|
||
|
|
|
||
|
|
%install
|
||
|
|
%mvn_install
|
||
|
|
|
||
|
|
%files -f .mfiles
|
||
|
|
%license LICENSE.txt
|
||
|
|
|
||
|
|
%files javadoc -f .mfiles-javadoc
|
||
|
|
%license LICENSE.txt
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Fri Sep 4 2020 Ge Wang <wangge20@huawei.com> - 1.3.0-1
|
||
|
|
- Package init
|