Blob Blame History Raw
%{?mingw_package_header}

Name:           mingw-nettle
Version:        2.4
Release:        2%{?dist}

Summary: MinGW package for nettle cryptographic library
License: LGPLv2+
Group:   Development/Libraries
URL:    http://www.lysator.liu.se/~nisse/nettle/
Source: http://www.lysator.liu.se/~nisse/archive/nettle-%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  mingw32-filesystem >= 95
BuildRequires:  mingw64-filesystem >= 95
BuildRequires:  mingw32-gcc
BuildRequires:  mingw64-gcc
BuildRequires:  mingw32-binutils
BuildRequires:  mingw64-binutils
BuildRequires:  mingw32-gmp
BuildRequires:  mingw64-gmp
BuildRequires:  mingw32-openssl
BuildRequires:  mingw64-openssl

BuildRequires:  m4


%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.


# Mingw32
%package -n mingw32-nettle
Summary: MinGW package for nettle cryptographic library


%description -n mingw32-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.


# Mingw64
%package -n mingw64-nettle
Summary: MinGW package for nettle cryptographic library


%description -n mingw64-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.


%?mingw_debug_package


%prep
%setup -q -n nettle-%{version}


%build
%mingw_configure --enable-shared
%mingw_make %{?_smp_mflags}


%install
%mingw_make install DESTDIR=$RPM_BUILD_ROOT

# make install misses DLLs
cp -p build_win32/libhogweed-2-1.dll \
      build_win32/libnettle-4-3.dll \
      $RPM_BUILD_ROOT%{mingw32_bindir}
cp -p build_win64/libhogweed-2-1.dll \
      build_win64/libnettle-4-3.dll \
      $RPM_BUILD_ROOT%{mingw64_bindir}

# Clean out files that should not be part of the rpm.
rm -f $RPM_BUILD_ROOT%{mingw32_libdir}/libnettle.a
rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/libnettle.a
rm -f $RPM_BUILD_ROOT%{mingw32_libdir}/libhogweed.a
rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/libhogweed.a

# Remove documentation which duplicates that found in the native package.
rm -r $RPM_BUILD_ROOT/%{mingw32_prefix}/share
rm -r $RPM_BUILD_ROOT/%{mingw64_prefix}/share


# Win32
%files -n mingw32-nettle
%doc README COPYING.LIB
%{mingw32_bindir}/nettle-hash.exe
%{mingw32_bindir}/nettle-lfib-stream.exe
%{mingw32_bindir}/pkcs1-conv.exe
%{mingw32_bindir}/sexp-conv.exe
%{mingw32_bindir}/libnettle-4-3.dll
%{mingw32_bindir}/libhogweed-2-1.dll
%{mingw32_libdir}/libnettle.dll.a
%{mingw32_libdir}/libhogweed.dll.a
%{mingw32_libdir}/pkgconfig/nettle.pc
%{mingw32_libdir}/pkgconfig/hogweed.pc
%dir %{mingw32_includedir}/nettle
%{mingw32_includedir}/nettle/*.h


# Win64
%files -n mingw64-nettle
%doc README COPYING.LIB
%{mingw64_bindir}/nettle-hash.exe
%{mingw64_bindir}/nettle-lfib-stream.exe
%{mingw64_bindir}/pkcs1-conv.exe
%{mingw64_bindir}/sexp-conv.exe
%{mingw64_bindir}/libnettle-4-3.dll
%{mingw64_bindir}/libhogweed-2-1.dll
%{mingw64_libdir}/libnettle.dll.a
%{mingw64_libdir}/libhogweed.dll.a
%{mingw64_libdir}/pkgconfig/nettle.pc
%{mingw64_libdir}/pkgconfig/hogweed.pc
%dir %{mingw64_includedir}/nettle
%{mingw64_includedir}/nettle/*.h


%changelog
* Wed Aug 29 2012 Michael Cronenworth <mike@cchtml.com> - 2.4-2
- Missing BR m4

* Tue Jul 10 2012 Michael Cronenworth <mike@cchtml.com> - 2.4-1
- Initial RPM package