add libthrift subpackage
This commit is contained in:
parent
7bb281f92d
commit
36b3a39072
BIN
libthrift-0.14.0-sources.jar
Normal file
BIN
libthrift-0.14.0-sources.jar
Normal file
Binary file not shown.
@ -11,7 +11,7 @@
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
@ -31,26 +31,26 @@
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.25</version>
|
||||
<version>1.7.28</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.6</version>
|
||||
<version>4.5.10</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpcore</artifactId>
|
||||
<version>4.4.1</version>
|
||||
<version>4.4.12</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<version>2.5</version>
|
||||
<scope>provided</scope>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-core</artifactId>
|
||||
<version>8.5.46</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
@ -67,14 +67,31 @@
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-all</artifactId>
|
||||
<version>1.9.5</version>
|
||||
<version>1.10.19</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>1.7.25</version>
|
||||
<version>1.7.28</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
<sourceDirectory>org/apache/thrift</sourceDirectory>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
61
thrift.spec
61
thrift.spec
@ -4,7 +4,7 @@
|
||||
%global have_mongrel 0
|
||||
%global have_jsx 0
|
||||
%global want_d 0
|
||||
%global want_java 0
|
||||
%global want_java 1
|
||||
%if 0%{?want_java} == 0
|
||||
%global java_configure --without-java
|
||||
%else
|
||||
@ -38,20 +38,20 @@
|
||||
%global lua_configure --without-lua
|
||||
Name: thrift
|
||||
Version: 0.14.0
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Software framework for cross-language services development
|
||||
License: ASL 2.0 and BSD and zlib
|
||||
URL: https://thrift.apache.org/
|
||||
Source0: https://archive.apache.org/dist/thrift/%{version}/thrift-%{version}.tar.gz
|
||||
Source1: https://repo1.maven.org/maven2/org/apache/thrift/libthrift/%{version}/libthrift-%{version}.pom
|
||||
# wget https://repo1.maven.org/maven2/org/apache/thrift/libthrift/%{version}/libthrift-%{version}.pom
|
||||
# add maven-compiler-plugin in build tag
|
||||
Source1: libthrift-%{version}.pom
|
||||
Source2: https://raw.github.com/apache/thrift/%{version}/bootstrap.sh
|
||||
Source3: https://repo1.maven.org/maven2/org/apache/thrift/libthrift/%{version}/libthrift-%{version}-sources.jar
|
||||
Patch0: thrift-char.patch
|
||||
Patch2: configure-java-prefix.patch
|
||||
%if 0%{?want_java} > 0
|
||||
BuildRequires: ant >= 1.7
|
||||
%endif
|
||||
BuildRequires: make autoconf automake bison boost-devel boost-static flex gcc-c++ glib2-devel
|
||||
BuildRequires: libevent-devel libstdc++-devel libtool openssl-devel qt5-qtbase-devel texlive
|
||||
BuildRequires: libevent-devel libstdc++-devel libtool maven openssl-devel qt5-qtbase-devel texlive
|
||||
BuildRequires: zlib-devel
|
||||
Obsoletes: libthrift-java < %{version}-%{release}
|
||||
Obsoletes: libthrift-javadoc < %{version}-%{release}
|
||||
@ -131,15 +131,6 @@ BuildRequires: php-devel
|
||||
%description -n php-thrift
|
||||
The php-thrift package contains PHP bindings for thrift.
|
||||
%endif
|
||||
%if 0%{?want_java} > 0
|
||||
|
||||
%package -n libthrift-javadoc
|
||||
Summary: API documentation for java-thrift
|
||||
Requires: libthrift-java = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
%description -n libthrift-javadoc
|
||||
The libthrift-javadoc package contains API documentation for the
|
||||
Java bindings for thrift.
|
||||
|
||||
%package -n libthrift-java
|
||||
Summary: Java support for thrift
|
||||
@ -153,7 +144,7 @@ Requires: mvn(org.apache.httpcomponents:httpcore)
|
||||
BuildArch: noarch
|
||||
%description -n libthrift-java
|
||||
The libthrift-java package contains Java bindings for thrift.
|
||||
%endif
|
||||
|
||||
%if 0%{?want_ruby} > 0
|
||||
|
||||
%package -n ruby-thrift
|
||||
@ -187,6 +178,14 @@ sed -i 's|ANT_VALID=.*|ANT_VALID=1|' aclocal/ax_javac_and_java.m4
|
||||
shopt -s globstar
|
||||
sed -i -E 's@^(#!.*/env) *python *$@\1 python3@' **/*.py
|
||||
|
||||
#prepare libthrift's compiler environment
|
||||
mkdir libthrift_dir
|
||||
cp %{SOURCE1} ./libthrift_dir/pom.xml
|
||||
cp %{SOURCE3} ./libthrift_dir
|
||||
pushd libthrift_dir
|
||||
jar -xvf libthrift-0.14.0-sources.jar
|
||||
popd
|
||||
|
||||
%build
|
||||
export PY_PREFIX=%{_prefix}
|
||||
export PERL_PREFIX=%{_prefix}
|
||||
@ -209,17 +208,15 @@ export PYTHON=%{_bindir}/python3
|
||||
sed -i -e 's/ -shared / -Wl,--as-needed\0/g' libtool
|
||||
%make_build
|
||||
|
||||
pushd libthrift_dir
|
||||
mvn package -DskipTests -Dtar
|
||||
popd
|
||||
|
||||
%install
|
||||
%make_install
|
||||
find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
||||
find %{buildroot} -name fastbinary.so | xargs -r chmod 755
|
||||
find %{buildroot} -name \*.erl -or -name \*.hrl -or -name \*.app | xargs -r chmod 644
|
||||
%if 0%{?want_java} > 0
|
||||
find %{buildroot}/%{_javadir} -name libthrift-javadoc.jar -exec rm -f '{}' \;
|
||||
mkdir -p %{buildroot}%{_mavenpomdir}
|
||||
install -pm 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-libthrift.pom
|
||||
%add_maven_depmap JPP-libthrift.pom libthrift.jar
|
||||
%endif
|
||||
find %{buildroot} -name \*.jar -a \! -name \*thrift\* -exec rm -f '{}' \;
|
||||
find %{buildroot} -name \*.pod -exec rm -f '{}' \;
|
||||
find %{buildroot} -name .packlist -exec rm -f '{}' \;
|
||||
@ -234,6 +231,12 @@ find %{buildroot} -name Thread.h -exec chmod a-x '{}' \;
|
||||
find %{buildroot} -name \*.py -exec grep -q /usr/bin/env {} \; -print | xargs -r chmod 755
|
||||
%ldconfig_scriptlets
|
||||
|
||||
install -d -m 755 %{buildroot}%{_datadir}/java/libthrift
|
||||
install -d -m 755 %{buildroot}%{_datadir}/maven-poms/libthrift
|
||||
cp libthrift_dir/target/libthrift-0.14.0.jar %{buildroot}%{_datadir}/java/libthrift/libthrift.jar
|
||||
cp libthrift_dir/pom.xml %{buildroot}%{_datadir}/maven-poms/libthrift/libthrift.pom
|
||||
%add_maven_depmap libthrift/libthrift.pom libthrift/libthrift.jar -f "libthrift"
|
||||
|
||||
%files
|
||||
%doc LICENSE NOTICE
|
||||
%{_bindir}/thrift
|
||||
@ -287,15 +290,17 @@ find %{buildroot} -name \*.py -exec grep -q /usr/bin/env {} \; -print | xargs -r
|
||||
%doc LICENSE NOTICE
|
||||
%if 0%{?want_java} > 0
|
||||
|
||||
%files -n libthrift-javadoc
|
||||
%{_javadocdir}/thrift
|
||||
%doc LICENSE NOTICE
|
||||
|
||||
%files -n libthrift-java -f .mfiles
|
||||
%files -n libthrift-java
|
||||
%{_datadir}/java/libthrift/libthrift.jar
|
||||
%{_datadir}/maven-poms/libthrift/libthrift.pom
|
||||
%{_datadir}/maven-metadata/thrift-libthrift.xml
|
||||
%doc LICENSE NOTICE
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Jul 28 2021 Ge Wang <wangge20@huawei.com> - 0.14.0-2
|
||||
- Add libthrift-java subpackage
|
||||
|
||||
* Tue Feb 23 2021 wangyue <wangyue92@huawei.com> - 0.14.0-1
|
||||
- Update to 0.14.0 to fix CVE-2020-13949 and Drop fb303 package and switch to qt5
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user