Summary: A cryptographic library based on the code from GnuPG. Name: libgcrypt Version: 1.10.2 Release: 13%{?dist}2a URL: http://directory.fsf.org/wiki/Libgcrypt Source0: ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.bz2 Source1: ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.bz2.sig Patch0: localhost:/libgcrypt-1.9.4-arm64.patch License: GPLv2+ Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: libgpg-error-devel >= 0.5 Requires: libgpg-error Requires(post,preun): info BuildArch: fat Vendor: MacOS X WorkShop Distribution: MacOS X WorkShop %description This is a general purpose cryptographic library based on the code from GnuPG. It provides functions for all cryptograhic building blocks: symmetric ciphers (AES, DES, Blowfish, CAST5, Twofish, Arcfour), hash algorithms (MD4, MD5, RIPE-MD160, SHA-1, TIGER-192), MACs (HMAC for all hash algorithms), public key algorithms (RSA, ElGamal, DSA), large integer functions, random numbers and a lot of supporting functions. %package devel Summary: Development files for libgcrypt Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: libgpg-error-devel %description devel Static libraries and header files from libgcrypt. %prep %setup -q -c %{name}-%{version} mv %{name}-%{version} ARM64 pushd ARM64 %patch0 -p1 -b .arm64 cp -f AUTHORS README* LICENSES INSTALL NEWS ChangeLog .. cp -f COPYING COPYING.LIB .. popd cp -a ARM64 X86_64 %build pushd ARM64 export CFLAGS="-O3 -arch arm64 -I%{_includedir}" export CPPFLAGS="-arch arm64 -I%{_includedir}" export CXXFLAGS="$CFLAGS" export FFLAGS="$CFLAGS" export FCFLAGS="$CFLAGS" export LDFLAGS="-arch arm64 -L%{_libdir}" export CC=clang export CC_FOR_BUILD=clang export CXX=clang++ %configure \ --host=%{_rpm_platform_arm64} \ --build=%{_rpm_platform_arm64} \ --target=%{_rpm_platform_arm64} \ --enable-random=linux \ --disable-static make %{?_smp_mflags} popd pushd X86_64 export CFLAGS="-O3 -arch x86_64 -I%{_includedir}" export CPPFLAGS="-arch x86_64 -I%{_includedir}" export CXXFLAGS="$CFLAGS" export FFLAGS="$CFLAGS" export FCFLAGS="$CFLAGS" export LDFLAGS="-arch x86_64 -L%{_libdir}" export CC=clang export CC_FOR_BUILD=clang export CXX=clang++ %configure \ --host=%{_rpm_platform_x86_64} \ --build=%{_rpm_platform_arm64} \ --target=%{_rpm_platform_x86_64} \ --enable-random=linux \ --disable-static make %{?_smp_mflags} popd %install [ "%{buildroot}" != / ] && rm -rf %{buildroot} PWD=`pwd` pushd ARM64 rm -rf ${PWD}-root mkdir -p ${PWD}-root make install DESTDIR=${PWD}-root popd pushd X86_64 rm -rf ${PWD}-root mkdir -p ${PWD}-root make install DESTDIR=${PWD}-root popd ## Make Universal Binaries filelist=$(find ./ARM64-root -type f | xargs file | sed -e 's,^\./ARM64-root/,,g' | \ grep -E \(Mach-O\)\|\(ar\ archive\) |sed -e 's,:.*,,g' -e '/\for\ architecture/d') for i in $filelist do /usr/bin/lipo -create ARM64-root/$i X86_64-root/$i -output `basename $i` && \ (cp -f `basename $i` ARM64-root/$i) || : done # check header files for i in `find ARM64-root -name "*.h" -type f` do TARGET=`echo $i | sed -e "s,.*ARM64-root,,"` TEMP=`diff -u ARM64-root/$TARGET X86_64-root/$TARGET > /dev/null || echo different` if [ -n "$TEMP" ]; then mv X86_64-root/$TARGET ARM64-root/${TARGET%.*}-x86_64.h mv ARM64-root/$TARGET ARM64-root/${TARGET%.*}-arm64.h FILE=${TARGET##*/} FILE=${FILE%.*} cat < ARM64-root/$TARGET #if defined (__arm64__) #include "${FILE}-arm64.h" #elif defined( __x86_64__ ) #include "${FILE}-x86_64.h" #endif EOF fi done # fix libgcrypt-config pushd ARM64-root/opt/osxws/bin mv libgcrypt-config libgcrypt-config.orig sed -e 's;aarch64;$(uname -m);g' libgcrypt-config.orig > libgcrypt-config chmod 755 libgcrypt-config rm -f libgcrypt-config.orig popd # install mkdir -p %{buildroot} tar cf - -C ARM64-root . | tar xpf - -C %{buildroot} ## remove unuse files rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la rm -rf $RPM_BUILD_ROOT%{_datadir}/common-lisp rm -f $RPM_BUILD_ROOT%{_infodir}/dir %clean [ "%{buildroot}" != / ] && rm -rf %{buildroot} %ifnos darwin %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %endif %post devel install-info --info-dir=%{_infodir} %{_infodir}/gcrypt.info.gz ||: %preun devel if [ $1 = 0 ]; then install-info --delete %{_infodir}/gcrypt.info.gz %{_infodir}/dir ||: fi %files %defattr(-,root,wheel) %license LICENSES COPYING COPYING.LIB %doc AUTHORS README* INSTALL NEWS ChangeLog %{_bindir}/dumpsexp %{_bindir}/hmac256 %{_bindir}/mpicalc %{_libdir}/libgcrypt.*.dylib %files devel %defattr(-,root,wheel) %{_bindir}/libgcrypt-config %{_includedir}/* %{_libdir}/libgcrypt.dylib %{_libdir}/pkgconfig/libgcrypt.pc %{_datadir}/aclocal/libgcrypt.m4 %{_infodir}/* %{_mandir}/man1/hmac256.1.gz %changelog * Fri Oct 27 2023 Keisuke Fujii 1.10.2-13hepx2a - 2nd release for MacOS 13 - now it's fat * Fri Oct 27 2023 Keisuke Fujii 1.10.2-13hepx1a - 1st release for MacOS 13 * Sat Feb 26 2022 Keisuke Fujii 1.9.4-12.1hepx1b - 2nd release on MacOSX 12 - built with OSXWS 12 * Thu Jan 27 2022 Keisuke Fujii 1.9.4-12.1hepx1a - 1st release on MacOSX 12.1 - added patch0 for arm64 - built with OSXWS 11 * Wed Jan 22 2020 Keisuke Fujii 1.8.5-10.15hepx1a - 1st release on MacOSX 10.15. - built with OSXWS 10.15. * Sat Dec 28 2019 Keisuke Fujii 1.8.5-10.14hepx1a - 1st release on MacOSX 10.14. - built with OSXWS 10.14. * Thu Dec 19 2019 Keisuke Fujii 1.8.2-10.14hepx1b - 1st release on MacOSX 10.14. - built with OSXWS 10.14. * Mon Dec 24 2018 Keisuke Fujii 1.8.2-10.14hepx1a - 1st release on MacOSX 10.14. - built with OSXWS 10.13. * Mon Apr 02 2018 Keisuke Fujii 1.8.2-10.13hepx1a - 1st release on MacOSX 10.13. - built with OSXWS 10.13. * Mon Dec 26 2016 Keisuke Fujii 1.6.5-10.12hepx1b - 2nd release on MacOSX 10.12. - built with OSXWS 10.12. * Sun Dec 18 2016 Keisuke Fujii 1.6.5-10.12hepx1a - 1st release on MacOSX 10.12. - built with OSXWS 10.11. * Wed Feb 10 2016 Keisuke Fujii 1.6.5-10.11hepx1a - 1st release on MacOSX 10.11. * Wed May 21 2014 KOBAYASHI taizo 1.6.1-1 - new upstream release * Thu Jan 19 2012 KOBAYASHI taizo 1.5.0-1 - new upstream release - modified for OSXWS 10.7 * Fri Jan 15 2010 KOBAYASHI taizo 1.4.5-1 - new upstream release - modified for OSXWS 10.6 * Sat Jun 27 2009 NAKAMURA Kenta 1.4.3-3 - added compat32 package for x86_64 arch support - added --disable-static %%configure option * Thu Sep 25 2008 Shu KONNO 1.4.3-2 - removed *.la * Tue Sep 23 2008 Daisuke SUZUKI 1.4.3-1 - new upstream release * Tue Mar 18 2008 Ryoichi INAGAKI 1.4.0-1vl5 - new upstream release - used _dist_release macro * Sat Mar 15 2008 Ryoichi INAGAKI 1.4.0-0vl1 - new upstream release * Sun Nov 26 2006 Ryoichi INAGAKI 1.2.3-0vl1 - new upstream release - changed Group to System Environment/Libraries * Fri Dec 30 2005 KAZUKI SHIMURA 1.2.2-0vl1 - new upstream release * Mon Mar 28 2005 KAZUKI SHIMURA 1.2.1-0vl1 - new upstream release - fix dependencies - add BuildRequires: libgpg-error-devel >= 0.5 - add Requires: libgpg-error - add Requires: libgpg-error-devel for devel package * Tue Nov 30 2004 Daisuke SUZUKI 1.2.0-0vl1 - new upstream release * Sun Mar 7 2004 Daisuke SUZUKI 1.1.12-0vl1 - initial build