qpid-proton/qpid-proton.spec

191 lines
6.5 KiB
RPMSpec
Raw Normal View History

2020-01-09 20:42:21 -05:00
%{?filter_setup:
2020-06-03 10:20:18 +08:00
%filter_provides_in %{_datadir}/proton/examples/
%filter_requires_in %{_datadir}/proton/examples/
2020-01-09 20:42:21 -05:00
%filter_setup
}
2020-06-03 10:20:18 +08:00
%global proton_licensedir %{_licensedir}/proton
2020-01-09 20:42:21 -05:00
%{!?_licensedir:
2020-06-03 10:23:58 +08:00
%global license %doc
2020-06-03 10:20:18 +08:00
%global proton_licensedir %{_datadir}/proton}
2020-01-09 20:42:21 -05:00
2020-06-03 10:20:18 +08:00
Name: qpid-proton
Version: 0.38.0
Release: 1
2020-06-03 10:20:18 +08:00
Summary: A high performance and lightweight library for messaging applications
License: ASL 2.0
URL: http://qpid.apache.org/proton/
Source0: https://github.com/apache/qpid-proton/archive/%{version}.tar.gz
2020-06-03 10:20:18 +08:00
Patch0000: proton.patch
BuildRequires: gcc gcc-c++ cmake swig pkgconfig doxygen libuuid-devel openssl-devel
BuildRequires: python3-devel python3-sphinx glibc-headers cyrus-sasl-devel jsoncpp-devel
2020-01-09 20:42:21 -05:00
%description
2020-06-03 10:20:18 +08:00
Proton is a high performance, lightweight messaging library. It can be used in
the widest range of messaging applications including brokers, client libraries,
routers, bridges, proxies, and more. Proton makes it trivial to integrate with
the AMQP 1.0 ecosystem from any platform, environment, or language.
%package c-cpp
Summary: C/C++ libs for qpid-proton
Requires: cyrus-sasl-lib jsoncpp
Provides: qpid-proton-c = %{version}-%{release} qpid-proton-cpp = %{version}-%{release}
Obsoletes: qpid-proton perl-qpid-proton qpid-proton-c < %{version}-%{release}
Obsoletes: qpid-proton-cpp < %{version}-%{release}
2020-01-09 20:42:21 -05:00
%description c-cpp
This package contains C/C++ libraries for qpid-proton.
%package c-cpp-devel
2020-06-03 10:20:18 +08:00
Summary: Development C/C++ libs for qpid-proton
Requires: qpid-proton-c-cpp = %{version}-%{release}
Provides: qpid-proton-c-devel = %{version}-%{release} qpid-proton-cpp-devel = %{version}-%{release}
Obsoletes: qpid-proton-devel qpid-proton-c-devel < %{version}-%{release}
Obsoletes: qpid-proton-cpp-devel < %{version}-%{release}
2020-01-09 20:42:21 -05:00
%description c-cpp-devel
2020-06-03 10:20:18 +08:00
This package contains C/C++ development libraries for writing messaging apps with qpid-proton.
2020-01-09 20:42:21 -05:00
%package c-help
2020-06-03 10:20:18 +08:00
Summary: Documentation for the C development libs
BuildArch: noarch
Provides: c-docs = %{version}-%{release}
Obsoletes: qpid-proton-c-devel-doc qpid-proton-c-devel-docs c-docs < %{version}-%{release}
2020-01-09 20:42:21 -05:00
%description c-help
This package contains documentation for the C development libraries and examples for qpid-proton.
%package cpp-help
2020-06-03 10:20:18 +08:00
Summary: Documentation for the C++ development libs
BuildArch: noarch
Provides: cpp-docs = %{version}-%{release}
Obsoletes: qpid-proton-cpp-devel-doc qpid-proton-cpp-devel-docs cpp-docs < %{version}-%{release}
2020-01-09 20:42:21 -05:00
%description cpp-help
2020-06-03 10:20:18 +08:00
This package contains documentation for the C++ development libraries and examples for qpid-proton.
2020-01-09 20:42:21 -05:00
%package -n python3-qpid-proton
2020-06-03 10:20:18 +08:00
Summary: Python language bindings for the qpid-proton
2020-01-09 20:42:21 -05:00
%python_provide python3-qpid-proton
2020-06-03 10:20:18 +08:00
Requires: qpid-proton-c = %{version}-%{release} python3
2020-01-09 20:42:21 -05:00
%description -n python3-qpid-proton
This package contains python language bindings for the qpid-proton messaging framework.
%package -n python-qpid-proton-help
2020-06-03 10:20:18 +08:00
Summary: Documentation for the Python language bindings for qpid-proton
BuildArch: noarch
Provides: python-qpid-proton-docs = %{version}-%{release}
Obsoletes: python-qpid-proton-doc python-qpid-proton-docs < %{version}-%{release}
2020-01-09 20:42:21 -05:00
%description -n python-qpid-proton-help
2020-06-03 10:20:18 +08:00
This package contains documentation for the Python language bindings for qpid-proton.
%package tests
Summary: Tests for qpid-proton
BuildArch: noarch
2020-01-09 20:42:21 -05:00
2020-06-03 10:20:18 +08:00
%description tests
This package contains some tests for qpid-proton.
2020-01-09 20:42:21 -05:00
%prep
%autosetup -n %{name}-%{version} -p1
%build
rm -rf buildpython3 && mkdir buildpython3
pushd buildpython3
python_includes=$(ls -d /usr/include/python3*)
%cmake \
2020-06-03 10:20:18 +08:00
-DSYSINSTALL_BINDINGS=ON \
-DCMAKE_SKIP_RPATH:BOOL=OFF \
-DENABLE_FUZZ_TESTING=NO \
"-DCMAKE_C_FLAGS=$CMAKE_C_FLAGS $CFLAGS -Wno-error=format-security" \
"-DCMAKE_CXX_FLAGS=$CMAKE_CXX_FLAGS $CXXFLAGS -Wno-error=format-security" \
2020-01-09 20:42:21 -05:00
..
make all docs -j1
(pushd python/dist; %py3_build)
%install
2020-06-03 10:20:18 +08:00
pushd buildpython3
2020-01-09 20:42:21 -05:00
%make_install
(pushd python/dist; %py3_install)
2020-06-03 10:20:18 +08:00
find %{buildroot}%{_datadir}/proton/examples/python -name "*.py" -exec sed -i 's/!\/usr\/bin\/env python/!\/usr\/bin\/python3/' {} \;
echo '#!/usr/bin/python3' > %{buildroot}%{_datadir}/proton/examples/python/proton_server.py.original
cat %{buildroot}%{_datadir}/proton/examples/python/proton_server.py >> %{buildroot}%{_datadir}/proton/examples/python/proton_server.py.original
mv %{buildroot}%{_datadir}/proton/examples/python/proton_server.py.original %{buildroot}%{_datadir}/proton/examples/python/proton_server.py
2020-01-09 20:42:21 -05:00
chmod +x %{buildroot}%{python3_sitearch}/_cproton.so
2020-06-03 10:20:18 +08:00
rm -fr %{buildroot}%{_datadir}/proton/examples/**/*.cmake
rm -f %{buildroot}%{_datadir}/proton/CMakeLists.txt
rm -fr %{buildroot}%{_datadir}/proton/examples/go
2020-01-09 20:42:21 -05:00
for fpath in %{buildroot}%{_libdir} %{buildroot}%{_datarootdir} \
2020-06-03 10:20:18 +08:00
%{buildroot}%{_datadir}/proton/examples
2020-01-09 20:42:21 -05:00
do
rm -rf ${fpath}/ruby
done
%check
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files c-cpp
2020-06-03 10:20:18 +08:00
%dir %{_datadir}/proton
%license %{_datadir}/proton/LICENSE.txt
%doc %{_datadir}/proton/README*
2020-01-09 20:42:21 -05:00
%{_libdir}/libqpid-proton*
%files c-cpp-devel
%{_includedir}/proton
%{_libdir}/cmake/Proton
%{_libdir}/pkgconfig/*
2020-06-03 10:20:18 +08:00
%{_libdir}/cmake/ProtonCpp
2020-01-09 20:42:21 -05:00
%files c-help
%defattr(-,root,root,-)
2020-06-03 10:20:18 +08:00
%license %{_datadir}/proton/LICENSE.txt
%doc %{_datadir}/proton/examples/README.md
%doc %{_datadir}/proton/docs/api-c
%doc %{_datadir}/proton/examples/c/*
2020-01-09 20:42:21 -05:00
%files cpp-help
%defattr(-,root,root,-)
2020-06-03 10:20:18 +08:00
%license %{_datadir}/proton/LICENSE.txt
%{_datadir}/proton/docs/api-cpp
%doc %{_datadir}/proton/examples/cpp/*
2020-01-09 20:42:21 -05:00
%files -n python3-qpid-proton
%{python3_sitearch}/*
%files -n python-qpid-proton-help
%defattr(-,root,root,-)
2020-06-03 10:20:18 +08:00
%license %{_datadir}/proton/LICENSE.txt
%doc %{_datadir}/proton/docs/api-py
%doc %{_datadir}/proton/examples/python
2020-01-09 20:42:21 -05:00
2020-06-03 10:20:18 +08:00
%files tests
%license %{_datadir}/proton/LICENSE.txt
%doc %{_datadir}/proton/tests
2020-01-09 20:42:21 -05:00
%changelog
* Tue Feb 07 2023 xu_ping <xuping33@h-partners.com> - 0.38.0-1
- Update to 0.38.0
* Tue Jul 13 2021 huangtianhua <huangtianhua@huawei.com> - 0.33.0-1
- Update to 0.33.0
2021-08-10 11:52:21 +08:00
* Tue Aug 10 2021 wangyue <wangyue92@huawei.com> - 0.31.0-2
- Patch for non-constant SIGSTKSZ
2020-06-03 10:20:18 +08:00
* Tue Jun 2 2020 leiju <leiju4@huawei.com> - 0.31.0-1
- Update to 0.31.0
2020-01-09 20:42:21 -05:00
* Wed Jan 8 2020 Senlin Xia<xiasenlin1@huawei.com> - 0.24.0-5
- Package init