libnettle/libnettle.spec

158 lines
4.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package libnettle
#
# Copyright (c) 2011 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/
#
# norootforbuild
Name: libnettle
Version: 2.4
Release: 3
%define soname 4
%define hogweed_soname 2
Summary: Cryptographic Library
Source0: ftp://ftp.lysator.liu.se/pub/security/lsh/nettle-%{version}.tar.gz
Source1: baselibs.conf
Group: System/Libraries
License: LGPL-2.1+ and GPL-2.0+
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gmp-devel
PreReq: %install_info_prereq
%description
Nettle is a cryptographic library that is designed to fit easily in more or
less any context: In crypto toolkits for object-oriented languages (C++,
Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space.
%package -n libnettle%{soname}
Summary: Cryptographic Library
Group: System/Libraries
License: LGPL-2.1+
%description -n libnettle%{soname}
Nettle is a cryptographic library that is designed to fit easily in more or
less any context: In crypto toolkits for object-oriented languages (C++,
Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space.
%package -n libhogweed%{hogweed_soname}
Summary: Cryptographic Library for Public Key Algorithms
Group: System/Libraries
License: LGPL-2.1+
%description -n libhogweed%{hogweed_soname}
Nettle is a cryptographic library that is designed to fit easily in more or
less any context: In crypto toolkits for object-oriented languages (C++,
Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space.
The libhogweed library contains public key algorithms to use with libnettie.
%package -n libnettle-devel
Summary: Cryptographic Library
Group: Development/Libraries/C and C++
Requires: libnettle%{soname} = %{version}
Requires: libhogweed%{hogweed_soname} = %{version}
Requires: gmp-devel glibc-devel
License: LGPL-2.1+
%description -n libnettle-devel
Nettle is a cryptographic library that is designed to fit easily in more or
less any context: In crypto toolkits for object-oriented languages (C++,
Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space.
%package -n nettle
Summary: Cryptographic Tools
Group: Productivity/Security
%description -n nettle
Nettle is a cryptographic library that is designed to fit easily in more or
less any context: In crypto toolkits for object-oriented languages (C++,
Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space.
This package contains a few command-line tools to perform cryptographic
operations using the nettle library.
%prep
%setup -q -n "nettle-%{version}"
%build
%configure --disable-static \
--enable-shared
%__make %{?jobs:-j%{jobs}}
%install
%makeinstall
rm -f %{buildroot}%{_libdir}/*.a
%post -n libnettle%{soname} -p /sbin/ldconfig
%postun -n libnettle%{soname} -p /sbin/ldconfig
%post -n libhogweed%{hogweed_soname} -p /sbin/ldconfig
%postun -n libhogweed%{hogweed_soname} -p /sbin/ldconfig
%post -n libnettle-devel
%install_info --info-dir="%{_infodir}" "%{_infodir}"/nettle.info%{ext_info}
%postun -n libnettle-devel
%install_info_delete --info-dir="%{_infodir}" "%{_infodir}"/nettle.info%{ext_info}
%clean
%__rm -rf "%{buildroot}"
%check
make check
%files -n libnettle%{soname}
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING* NEWS README TODO
%{_libdir}/libnettle.so.%{soname}
%{_libdir}/libnettle.so.%{soname}.*
%files -n libhogweed%{hogweed_soname}
%defattr(-,root,root)
%{_libdir}/libhogweed.so.%{hogweed_soname}
%{_libdir}/libhogweed.so.%{hogweed_soname}.*
%files -n libnettle-devel
%defattr(-,root,root)
%{_includedir}/nettle
%{_libdir}/libnettle.so
%{_libdir}/libhogweed.so
%{_infodir}/nettle.info%{ext_info}
%{_libdir}/pkgconfig/hogweed.pc
%{_libdir}/pkgconfig/nettle.pc
%files -n nettle
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING* NEWS README TODO
%{_bindir}/nettle-lfib-stream
%{_bindir}/pkcs1-conv
%{_bindir}/sexp-conv
%{_bindir}/nettle-hash
# vim: set sw=3 ts=3 noet:
# Local Variables:
# mode: rpm-spec
# tab-width: 3
# End:
%changelog