From 0c3b163ce2fff8cda8aa31da2e58eaebe49c2100 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Thu, 8 Aug 2013 16:31:19 +0200 Subject: [PATCH] Various fixes - Make doc package noarch. - Remove executable bits from LICENSE file and source files. - Require isaed library for devel subpackage. - Require CVE fixed libtommath library. --- libtomcrypt.spec | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/libtomcrypt.spec b/libtomcrypt.spec index e12b52e..d551d5f 100644 --- a/libtomcrypt.spec +++ b/libtomcrypt.spec @@ -1,6 +1,6 @@ Name: libtomcrypt Version: 1.17 -Release: 18%{?dist} +Release: 19%{?dist} Summary: A comprehensive, portable cryptographic toolkit License: Public Domain @@ -10,9 +10,10 @@ Patch0: %{name}-makefile.patch Patch1: %{name}-pkgconfig.patch BuildRequires: ghostscript -BuildRequires: libtommath-devel >= 0.41 +BuildRequires: libtommath-devel >= 0.42.0 BuildRequires: libtool -%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7 + +%if 0%{?fedora} || 0%{?rhel} >= 7 BuildRequires: tex(dvips) BuildRequires: tex(latex) %else @@ -20,7 +21,7 @@ BuildRequires: tetex-dvips BuildRequires: tetex-latex %endif -Requires: libtommath >= 0.41 +Requires: libtommath >= 0.42.0 %description A comprehensive, modular and portable cryptographic toolkit that provides @@ -35,7 +36,7 @@ and a complete user manual which has many source snippet examples. %package devel Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for @@ -43,7 +44,9 @@ developing applications that use %{name}. %package doc Summary: Documentation files for %{name} -Requires: %{name} = %{version}-%{release} +BuildArch: noarch +Provides: %{name}-doc = %{version}-%{release} +Obsoletes: %{name}-doc < 1.17-19 %description doc @@ -69,20 +72,21 @@ make %{?_smp_mflags} LIBPATH=%{_libdir} EXTRALIBS="-ltommath" test %install # There is no configure script that ships with libtomcrypt but it does -# have understand DESTDIR and its installs via that and the -# INSTALL_USER and INSTALL_GROUP environment variables. -rm -rf %{buildroot} +# understand DESTDIR and its installs via that and the INSTALL_USER and +# INSTALL_GROUP environment variables. export INSTALL_USER=$(id -un) export INSTALL_GROUP=$(id -gn) export CFLAGS="$RPM_OPT_FLAGS -DLTM_DESC -DUSE_LTM" make install INCPATH=%{_includedir}/tomcrypt DESTDIR=%{buildroot} LIBPATH=%{_libdir} EXTRALIBS="-ltommath" -f makefile.shared find %{buildroot} -name '*.h' -exec chmod 644 {} ';' +find %{buildroot} -name '*.c' -exec chmod 644 {} '; +chmod 644 LICENSE # remove unneeded files -find %{buildroot} -name '*.la' -exec rm -f {} ';' -find %{buildroot} -name '*.a' -exec rm -f {} ';' -find %{buildroot} -name 'libtomcrypt_prof*' -exec rm -f {} ';' +find %{buildroot} -name '*.la' -delete +find %{buildroot} -name '*.a' -delete +find %{buildroot} -name 'libtomcrypt_prof*' -delete %post -p /sbin/ldconfig @@ -102,6 +106,11 @@ find %{buildroot} -name 'libtomcrypt_prof*' -exec rm -f {} ';' %doc LICENSE doc/crypt.pdf %changelog +* Thu Aug 08 2013 Simone Caronni - 1.17-19 +- Make doc package noarch. +- Remove executable bits from LICENSE file and source files. +- Require isaed library for devel subpackage. + * Thu Jun 06 2013 Simone Caronni - 1.17-18 - Fix build requirements for RHEL 6 and Fedora 17.