socket_wrapper/socket_wrapper.spec

104 lines
3.0 KiB
RPMSpec
Raw Permalink Normal View History

2019-11-29 09:31:23 +08:00
Name: socket_wrapper
2022-11-05 10:00:23 +00:00
Version: 1.4.0
Release: 1
2019-11-29 09:31:23 +08:00
Summary: A library passing all socket communications through unix sockets.
2022-11-05 10:00:23 +00:00
License: BSD-3-Clause
2019-11-29 09:31:23 +08:00
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
2019-11-29 09:31:23 +08:00
2022-11-05 10:00:23 +00:00
Patch0: socket_wrapper-fix-cmocka-1.1.6+-support.patch
2019-11-29 09:31:23 +08:00
BuildRequires: cmake gcc libcmocka-devel >= 1.1.0
BuildRequires: gnupg2
2019-11-29 09:31:23 +08:00
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().
2019-11-29 09:31:23 +08:00
%prep
gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
2019-11-29 09:31:23 +08:00
%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
2019-11-29 09:31:23 +08:00
%check
cd build
ctest -V
LD_PRELOAD=src/libsocket_wrapper.so bash -c '>/dev/null'
%files
%doc AUTHORS
%license LICENSE
2019-11-29 09:31:23 +08:00
%{_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
2019-11-29 09:31:23 +08:00
%{_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
2019-11-29 09:31:23 +08:00
%changelog
2022-11-05 10:00:23 +00:00
* 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
2019-11-29 09:31:23 +08:00
* Wed Nov 27 2019 zhouyihang <zhouyihang1@huawei.com> - 1.1.9-4
- Package init