socket_wrapper/socket_wrapper.spec
openeuler-ci-bot 11a9d5f7e9 update to 1.4.0
2023-06-15 16:47:04 +08:00

104 lines
3.0 KiB
RPMSpec

Name: socket_wrapper
Version: 1.4.0
Release: 1
Summary: A library passing all socket communications through unix sockets.
License: BSD-3-Clause
URL: http://cwrap.org/
Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz
Source1: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz.asc
Source2: socket_wrapper.keyring
Patch0: socket_wrapper-fix-cmocka-1.1.6+-support.patch
BuildRequires: cmake gcc libcmocka-devel >= 1.1.0
BuildRequires: gnupg2
Recommends: cmake pkgconfig
%description
socket_wrapper aims to help client/server software development teams
willing to gain full functional test coverage. It makes possible to
run several instances of the full software stack on the same machine
and perform locally functional testing of complex network configurations.
It provides featrues as follow:
1)Redirects all network communication to happen over unix sockets.
2)Support for IPv4 and IPv6 socket and addressing emulation.
3)Ablility to capture network traffic in pcap format.
%package help
Summary: Documents for socket_wrapper
Buildarch: noarch
%description help
Man pages and other related documents.
%package -n libsocket_wrapper_noop
Summary:A library providing dummies for socket_wrapper
%description -n libsocket_wrapper_noop
Applications with the need to call socket_wrapper_enabled() should link against-lsocket_wrapper_noop in order to resolve the symbol at link time.
%package -n libsocket_wrapper_noop-devel
Summary:Development headers for libsocket_wrapper_noop
Requires:libsocket_wrapper_noop = %{version}-%{release}
%description -n libsocket_wrapper_noop-devel
Development headers for applications with the need to call socket_wrapper_enabled().
%prep
gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
%autosetup -n %{name}-%{version} -p1
%build
mkdir build
cd build
%cmake -DUNIT_TESTING=ON %{_builddir}/%{name}-%{version}
%make_build VERBOSE=1
%install
cd build
%make_install
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%ldconfig_scriptlets
%ldconfig_scriptlets -n libsocket_wrapper_noop
%check
cd build
ctest -V
LD_PRELOAD=src/libsocket_wrapper.so bash -c '>/dev/null'
%files
%doc AUTHORS
%license LICENSE
%{_libdir}/libsocket_wrapper.so*
%dir %{_libdir}/cmake/socket_wrapper
%{_libdir}/cmake/socket_wrapper/socket_wrapper-config*.cmake
%{_libdir}/pkgconfig/socket_wrapper.pc
%files help
%doc CHANGELOG README.md
%{_mandir}/man1/socket_wrapper.1*
%files -n libsocket_wrapper_noop
%{_libdir}/libsocket_wrapper_noop.so.*
%files -n libsocket_wrapper_noop-devel
%{_includedir}/socket_wrapper.h
%{_libdir}/libsocket_wrapper_noop.so
%{_libdir}/cmake/socket_wrapper/socket_wrapper_noop-config*.cmake
%{_libdir}/pkgconfig/socket_wrapper_noop.pc
%changelog
* Thu Jun 15 2023 liyanan <thistleslyn@163.com> - 1.4.0-1
- Update to 1.4.0
* Fri Nov 04 2022 yaoxin <yaoxin30@h-partners.com> - 1.3.4-1
- Update to 1.3.4 for fix build error
* Wed Nov 27 2019 zhouyihang <zhouyihang1@huawei.com> - 1.1.9-4
- Package init