From dde438d5e3a7a74218705e98e13805d561420cb6 Mon Sep 17 00:00:00 2001 From: Keunsoon Lee Date: Tue, 24 Jul 2012 11:17:16 +0900 Subject: [PATCH] [Title] Add packaging/nettle.spec to build nettle on OBS system [Issue#] N/A [Problem] N/A [Cause] N/A [Solution] N/A Change-Id: Ifc613b4d1c1e53bbd0ea31a3b9ef5c698c732a75 --- packaging/nettle.spec | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 packaging/nettle.spec diff --git a/packaging/nettle.spec b/packaging/nettle.spec new file mode 100644 index 0000000..69b7906 --- /dev/null +++ b/packaging/nettle.spec @@ -0,0 +1,58 @@ +%define nettlemajor 4 +%define hogweedmajor 2 +%define develname nettle-devel + +Name: nettle +Summary: Nettle cryptographic library +Version: 2.1 +Release: 1 +License: LGPLv2+ +Group: System/Libraries +URL: http://www.lysator.liu.se/~nisse/nettle/ +Source: http://www.lysator.liu.se/~nisse/archive/%{name}-%{version}.tar.gz +BuildRequires: autoconf +BuildRequires: openssl-devel +BuildRequires: gmp-devel + +%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 %develname +Group: Development/C++ +Summary: Header files for compiling against Nettle library +Provides: %name-devel = %{version}-%{release} + +%description -n %develname +This is the development package of nettle. + +%prep +%setup -q + +%build +%configure --disable-openssl --enable-shared +make + +%install +make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" +make install-shared DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" +rm -f $RPM_BUILD_ROOT%{_libdir}/*.a + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%{_bindir}/* +%{_infodir}/* +%{_libdir}/libnettle.so.%{nettlemajor}* +%{_libdir}/libhogweed.so.%{hogweedmajor}* + +%files -n %develname +%{_libdir}/libnettle.so +%{_libdir}/libhogweed.so +%{_includedir}/nettle + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig -- 2.7.4