This is an automated email from the ASF dual-hosted git repository. jamesge pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git
The following commit(s) were added to refs/heads/master by this push: new 5fa8506 Add rpm packaging spec new 2657d52 Merge pull request #1290 from wasphin/feature/packaging 5fa8506 is described below commit 5fa850696dea206f4d2c0a93dca7bfb3d8cae9ba Author: wxf <xiaofeng.w...@bqvision.com> AuthorDate: Sat Nov 21 16:53:30 2020 +0800 Add rpm packaging spec --- package/rpm/brpc.spec | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/package/rpm/brpc.spec b/package/rpm/brpc.spec new file mode 100644 index 0000000..002b0ab --- /dev/null +++ b/package/rpm/brpc.spec @@ -0,0 +1,87 @@ +Name: brpc +Version: 0.9.7 +Release: 1%{?dist} +Summary: An industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances(not counting clients) and thousands kinds of services. + +Group: Development +License: Apache2 +URL: https://github.com/apache/incubator-brpc +Source0: incubator-brpc-%{name}.tar.gz + +%global __filter_GLIBC_PRIVATE 1 + +%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7 +%global use_devtoolset 0 +%else +%global use_devtoolset 1 +%endif + +%if 0%{?use_devtoolset} +BuildRequires: devtoolset-8-gcc-c++ +%endif + +BuildRequires: gflags-devel +BuildRequires: protobuf-devel +BuildRequires: leveldb-devel +BuildRequires: openssl-devel +Requires: gflags +Requires: protobuf +Requires: leveldb +Requires: openssl-libs + +%description +An industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances(not counting clients) and thousands kinds of services. +"brpc" means "better RPC". + +%package devel +Summary: The %{name} headers and shared development libraries +Requires: %{name} = %{version}-%{release} +%description devel +Headers and shared object symbolic links for the %{name} library. + +%package static +Summary: The %{name} static development libraries +Requires: brpc-devel = %{version}-%{release} +%description static +Static %{name} libraries. + +%prep +%setup -n incubator-%{name}-%{version} + + +%build +mkdir -p %{_target_platform} + +pushd %{_target_platform} + +%if 0%{?use_devtoolset} +. /opt/rh/devtoolset-8/enable +%endif + +%{cmake} .. + +make %{?_smp_mflags} +popd + +%install +rm -rf $RPM_BUILD_ROOT + +pushd %{_target_platform} +%make_install +popd + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%{_libdir}/libbrpc.so + +%files devel +%{_includedir}/* +%{_libdir}/pkgconfig/* + +%files static +%{_libdir}/libbrpc.a + +%changelog + --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org