File nacl.spec of Package nacl

#
# spec file for package nacl
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           nacl
Version:        20110221
Release:        0
Summary:        Development/Libraries/C and C++
License:        SUSE-Public-Domain
Group:          Development/Libraries
Url:            http://nacl.cace-project.eu/
Source0:        http://hyperelliptic.org/nacl/nacl-%{version}.tar.bz2
Source1:        curvecpclient.1
Source2:        curvecpserver.1
Source3:        curvecpmakekey.1
Source4:        curvecpmessage.1
Source5:        curvecpprintkey.1
Source6:        nacl-sha256.1
Source7:        nacl-sha512.1
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch0:         nacl-20110221-dist-flags.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1:         nacl-20110221-build-dir.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch2:         nacl-20110221-noexec-stack.patch
# Fix for secondary arches
Patch3:         nacl-20110221-cpufreq-fallback.patch
BuildRequires:  e2fsprogs
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%package devel
Summary:        Development files
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Provides:       nacl-static = %{version}

%description
NaCl (pronounced "salt") is a new easy-to-use high-speed software library for
network communication, encryption, decryption, signatures, etc. NaCl's goal
is to provide all of the core operations needed to build higher-level
cryptographic tools.

%description devel
Include files and devel library.

%prep
%setup -q
%patch0 -p1 -b .dist-flags
%patch1 -p1 -b .build-dir
%patch2 -p1 -b .noexec-stack
%patch3 -p1 -b .cpufreq-fallback
sed -i 's/\${CFLAGS}/%{optflags}/g' okcompilers/c okcompilers/cpp

%build
./do

%install
mkdir -p %{buildroot}%{_includedir}/%{name}
install -m 0644 -t %{buildroot}%{_includedir}/%{name} build/fedora/include/*/*.h
mkdir -p %{buildroot}%{_libdir}/
install -m 0644 -t %{buildroot}%{_libdir} build/fedora/lib/*/*.a
mkdir -p %{buildroot}%{_mandir}/man1
install -m 0644 -t %{buildroot}%{_mandir}/man1 %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7}
mkdir -p %{buildroot}%{_bindir}
rm -f build/fedora/bin/ok*
install -m 0755 -t %{buildroot}%{_bindir} build/fedora/bin/*

%files
%defattr(-,root,root)
%{_bindir}/*
%{_mandir}/man1/*

%files devel
%defattr(-,root,root)
%{_libdir}/libnacl.a
%{_includedir}/nacl/

%changelog
openSUSE Build Service is sponsored by