[netsniff-ng] Added conditional nacl support

Jaroslav Škarvada jskarvad at fedoraproject.org
Mon Jul 2 15:17:53 UTC 2012


commit 506a7c03135423b3ca4ee59917e38456f4dc167f
Author: Jaroslav Škarvada <jskarvad at redhat.com>
Date:   Mon Jul 2 17:17:19 2012 +0200

    Added conditional nacl support

 netsniff-ng.spec |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/netsniff-ng.spec b/netsniff-ng.spec
index 48d2ea7..0dbabe0 100644
--- a/netsniff-ng.spec
+++ b/netsniff-ng.spec
@@ -1,3 +1,5 @@
+%global with_nacl no
+
 Name:		netsniff-ng
 Version:	0.5.7
 Release:	1%{?dist}
@@ -11,6 +13,9 @@ Patch0:	netsniff-ng-0.5.7-libcli-include-fix.patch
 BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 BuildRequires:	cmake ncurses-devel GeoIP-devel libnetfilter_conntrack-devel
 BuildRequires:	userspace-rcu-devel libnl-devel libcli-devel flex bison
+%if "%{with_nacl}" == "yes"
+BuildRequires:	nacl-devel
+%endif
 Requires(post): chkconfig
 Requires(preun): chkconfig
 Requires(preun): initscripts
@@ -36,6 +41,14 @@ fi
 %setup -q
 %patch0 -p1 -b .libcli-include-fix
 
+%if "%{with_nacl}" == "yes"
+[ -r src/curvetun/nacl_path.cmake ] || \
+cat > src/curvetun/nacl_path.cmake <<":eof"
+SET(NACL_INCLUDE_DIR %{_includedir}/nacl)
+SET(NACL_LIB_DIR %{_libdir})
+:eof
+%endif
+
 %build
 cd src
 mkdir build


More information about the scm-commits mailing list