File mcrypt.spec of Package mcrypt

#
# spec file for package mcrypt
#
# Copyright (c) 2015 SUSE LINUX 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:           mcrypt
Version:        2.6.8
Release:        0
Summary:        Replacement for the crypt Command
License:        GPL-3.0+
Group:          Productivity/Security
Url:            http://mcrypt.sourceforge.net/
Source:         http://sourceforge.net/projects/mcrypt/files/MCrypt/%{version}/%{name}-%{version}.tar.gz
Patch1:         %{name}-%{version}-format_strings.patch
Patch2:         %{name}-%{version}-uninitialized.patch
# PATCH-FEATURE-OPENSUSE mcrypt-native-by-default.patch bnc385951 petr.uzel@suse.cz -- make native encryption format default (patch from Fedora)
Patch3:         mcrypt-native-by-default.patch
# PATCH-FIX-OPENSUSE mcrypt-manpage-fix.patch petr.uzel@suse.cz -- fix manpage typos (patch from Debian)
Patch4:         mcrypt-manpage-fix.patch
Patch5:         mcrypt-2.6.8-missing-fclose.patch
# PATCH-FIX-UPSTREAM fix by Fedora ( mcrypt-2.6.8-5.fc17.src.rpm ) mcrypt-2.6.7-gaafix.patch to fix arm build
Patch6:         mcrypt-2.6.7-gaafix.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libmcrypt-devel
BuildRequires:  libtool
BuildRequires:  mhash-devel
BuildRequires:  zlib-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A replacement for the old unix crypt(1) command. Mcrypt uses the
following encryption (block) algorithms: BLOWFISH, DES, TripleDES,
3-WAY, SAFER-SK64, SAFER-SK128, CAST-128, RC2 TEA (extended), TWOFISH,
RC6, IDEA, and GOST. The Unix crypt algorithm is also included to allow
compatibility with the crypt(1) command. CBC, ECB, OFB, and CFB modes
of encryption are supported.

%prep
%setup -q
%patch1
%patch2
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1

%build
gettextize -f
autoreconf -fiv
%configure
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
%find_lang %{name}

%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS ChangeLog NEWS README THANKS TODO
%doc doc/FORMAT doc/magic doc/sample.mcryptrc
%{_bindir}/*
%{_mandir}/man1/*

%changelog
openSUSE Build Service is sponsored by