commit fda002e311f954d16d05e975b00b2dae34b1a04c Author: sherlock2010 <5456720+sherlock2010@user.noreply.gitee.com> Date: Fri Nov 29 09:31:23 2019 +0800 first commit diff --git a/socket_wrapper-1.1.9.tar.gz b/socket_wrapper-1.1.9.tar.gz new file mode 100644 index 0000000..693eb5f Binary files /dev/null and b/socket_wrapper-1.1.9.tar.gz differ diff --git a/socket_wrapper.spec b/socket_wrapper.spec new file mode 100644 index 0000000..fdeeaea --- /dev/null +++ b/socket_wrapper.spec @@ -0,0 +1,65 @@ +Name: socket_wrapper +Version: 1.1.9 +Release: 4 +Summary: A library passing all socket communications through unix sockets. +License: BSD +URL: http://cwrap.org/ +Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz + +BuildRequires: cmake gcc libcmocka-devel >= 1.1.0 + +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. + +%prep +%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 + +%check +cd build +ctest -V +LD_PRELOAD=src/libsocket_wrapper.so bash -c '>/dev/null' + +%files +%doc AUTHORS COPYING +%{_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 +%{_mandir}/man1/socket_wrapper.1* + +%changelog +* Wed Nov 27 2019 zhouyihang - 1.1.9-4 +- Package init