Import fixes from bug 970002

epel9
David Woodhouse 12 years ago
parent 04155bd527
commit 19d02a8b00

@ -0,0 +1,34 @@
--- libtomcrypt-1.17.orig/makefile.shared
+++ libtomcrypt-1.17/makefile.shared
@@ -248,15 +248,16 @@
objs: $(OBJECTS)
-$(LIBNAME): $(OBJECTS) testprof/$(LIBTEST)
+$(LIBNAME): $(OBJECTS)
libtool --silent --mode=link gcc $(CFLAGS) `find . -type f | grep "[.]lo" | grep "src/" | xargs` $(EXTRALIBS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
install: $(LIBNAME)
install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
- cd testprof ; CFLAGS="$(CFLAGS)" GROUP=$(GROUP) USER=$(USER) VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) DESTDIR=$(DESTDIR) make -f makefile.shared install
libtool --silent --mode=install install -c libtomcrypt.la $(DESTDIR)$(LIBPATH)/libtomcrypt.la
install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
+ install -d $(DESTDIR)$(LIBPATH)/pkgconfig
+ install -m 0644 -g $(GROUP) -o $(USER) libtomcrypt.pc $(DESTDIR)$(LIBPATH)/pkgconfig/libtomcrypt.pc
#This rule makes the hash program included with libtomcrypt
hashsum: library
--- libtomcrypt-1.17.orig/libtomcrypt.pc
+++ libtomcrypt-1.17/libtomcrypt.pc
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include/tomcrypt
+
+Name: LibTomCrypt
+Description: public domain open source cryptographic toolkit
+Version: 1.17
+Libs: -L${libdir} -ltomcrypt
+Cflags: -I${includedir}

@ -1,32 +1,31 @@
Name: libtomcrypt Name: libtomcrypt
Version: 1.17 Version: 1.17
Release: 15%{?dist} Release: 16%{?dist}
Summary: A comprehensive, portable cryptographic toolkit Summary: A comprehensive, portable cryptographic toolkit
Group: System Environment/Libraries
License: Public Domain License: Public Domain
URL: http://www.libtom.org/?page=features&newsitems=5&whatfile=crypt URL: http://www.libtom.org/?page=features&newsitems=5&whatfile=crypt
Source0: http://www.libtom.org/files/crypt-%{version}.tar.bz2 Source0: http://www.libtom.org/files/crypt-%{version}.tar.bz2
Requires: libtommath >= 0.41 Patch0: %{name}-makefile.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Patch1: %{name}-pkgconfig.patch
BuildRequires: libtommath-devel >= 0.41, libtool
Patch0: libtomcrypt-makefile.patch Requires: libtommath >= 0.41
BuildRequires: libtommath-devel >= 0.41
BuildRequires: libtool
%description %description
A comprehensive, modular and portable cryptographic toolkit that A comprehensive, modular and portable cryptographic toolkit that provides
provides developers with a vast array of well known published block developers with a vast array of well known published block ciphers, one-way hash
ciphers, one-way hash functions, chaining modes, pseudo-random number functions, chaining modes, pseudo-random number generators, public key
generators, public key cryptography and a plethora of other routines. cryptography and a plethora of other routines.
Designed from the ground up to be very simple to use. It has a modular Designed from the ground up to be very simple to use. It has a modular and
and standard API that allows new ciphers, hashes and PRNGs to be added standard API that allows new ciphers, hashes and PRNGs to be added or removed
or removed without change to the overall end application. It features without change to the overall end application. It features easy to use functions
easy to use functions and a complete user manual which has many source and a complete user manual which has many source snippet examples.
snippet examples.
%package devel %package devel
Summary: Development files for %{name} Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%description devel %description devel
@ -35,9 +34,19 @@ developing applications that use %{name}.
%package doc %package doc
Summary: Documentation files for %{name} Summary: Documentation files for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
BuildRequires: tetex-latex, tetex-dvips, ghostscript
BuildRequires: ghostscript
BuildRequires: tetex-dvips
BuildRequires: tetex-latex
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
BuildRequires: texlive-cm
BuildRequires: texlive-fancyhdr
BuildRequires: texlive-latex-bin-bin
BuildRequires: texlive-makeindex-bin
BuildRequires: texlive-metafont-bin
BuildRequires: texlive-texconfig
%endif
%description doc %description doc
The %{name}-doc package contains documentation for use with %{name}. The %{name}-doc package contains documentation for use with %{name}.
@ -45,20 +54,16 @@ The %{name}-doc package contains documentation for use with %{name}.
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .makefile %patch0 -p1 -b .makefile
%patch1 -p1 -b .pkgconfig
%build %build
# no configure script ships with libtomcrypt. Its only requirement is # no configure script ships with libtomcrypt. Its only requirement is
# ANSI C. And libtommath. Explicitly force it to be built against libtommath # ANSI C. And libtommath. Explicitly force it to be built against libtommath
export CFLAGS="$RPM_OPT_FLAGS -DLTM_DESC -I%{_includedir}/tommath" export CFLAGS="$RPM_OPT_FLAGS -DLTM_DESC -I%{_includedir}/tommath"
# work around bug #239003
%ifarch ppc64
export CFLAGS="$CFLAGS -O0"
%endif
make %{?_smp_mflags} LIBPATH=%{_libdir} EXTRALIBS="-ltommath" -f makefile.shared make %{?_smp_mflags} LIBPATH=%{_libdir} EXTRALIBS="-ltommath" -f makefile.shared
make %{?_smp_mflags} LIBPATH=%{_libdir} -f makefile docs make %{?_smp_mflags} LIBPATH=%{_libdir} -f makefile docs
%check %check
export CFLAGS="$RPM_OPT_FLAGS -DLTM_DESC -DUSE_LTM -I%{_includedir}/tommath" export CFLAGS="$RPM_OPT_FLAGS -DLTM_DESC -DUSE_LTM -I%{_includedir}/tommath"
make %{?_smp_mflags} LIBPATH=%{_libdir} EXTRALIBS="-ltommath" test make %{?_smp_mflags} LIBPATH=%{_libdir} EXTRALIBS="-ltommath" test
@ -68,45 +73,42 @@ make %{?_smp_mflags} LIBPATH=%{_libdir} EXTRALIBS="-ltommath" test
# There is no configure script that ships with libtomcrypt but it does # There is no configure script that ships with libtomcrypt but it does
# have understand DESTDIR and its installs via that and the # have understand DESTDIR and its installs via that and the
# INSTALL_USER and INSTALL_GROUP environment variables. # INSTALL_USER and INSTALL_GROUP environment variables.
rm -rf $RPM_BUILD_ROOT rm -rf %{buildroot}
export INSTALL_USER=$(id -un) export INSTALL_USER=$(id -un)
export INSTALL_GROUP=$(id -gn) export INSTALL_GROUP=$(id -gn)
export CFLAGS="$RPM_OPT_FLAGS -DLTM_DESC -DUSE_LTM" export CFLAGS="$RPM_OPT_FLAGS -DLTM_DESC -DUSE_LTM"
make install INCPATH=%{_includedir}/tomcrypt DESTDIR=$RPM_BUILD_ROOT LIBPATH=%{_libdir} EXTRALIBS="-ltommath" -f makefile.shared make install INCPATH=%{_includedir}/tomcrypt DESTDIR=%{buildroot} LIBPATH=%{_libdir} EXTRALIBS="-ltommath" -f makefile.shared
find $RPM_BUILD_ROOT -name '*.h' -exec chmod 644 {} ';' find %{buildroot} -name '*.h' -exec chmod 644 {} ';'
# remove unneeded files # remove unneeded files
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' find %{buildroot} -name '*.la' -exec rm -f {} ';'
find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';' find %{buildroot} -name '*.a' -exec rm -f {} ';'
find $RPM_BUILD_ROOT -name 'libtomcrypt_prof*' -exec rm -f {} ';' find %{buildroot} -name 'libtomcrypt_prof*' -exec rm -f {} ';'
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%files %files
%defattr(-,root,root,-)
%doc LICENSE %doc LICENSE
%{_libdir}/*.so.* %{_libdir}/*.so.*
%files devel %files devel
%defattr(-,root,root,-)
%doc LICENSE %doc LICENSE
%{_includedir}/tomcrypt %{_includedir}/tomcrypt
%{_libdir}/*.so %{_libdir}/*.so
%{_libdir}/pkgconfig/libtomcrypt.pc
%files doc %files doc
%defattr(-,root,root,-)
%doc LICENSE doc/crypt.pdf %doc LICENSE doc/crypt.pdf
%changelog %changelog
* Mon Jun 03 2013 Simone Caronni <negativo17@gmail.com> - 1.17-16
- Update SPEC, remove obsolete tags, fix formatting.
- Add patch for pkg config (libtomcrypt.pc).
- Add correct build requirements for Fedora 19+ and RHEL 7+.
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.17-15 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.17-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

Loading…
Cancel
Save