Name: serf Version: 1.3.10 Release: 14%{?dist}3a Summary: High-Performance Asynchronous HTTP Client Library License: ASL 2.0 URL: http://serf.apache.org/ Source0: https://archive.apache.org/dist/serf/serf-%{version}.tar.bz2 BuildRequires: apr-devel, apr-util-devel, openssl-devel BuildArch: fat %description The serf library is a C-based HTTP client library built upon the Apache Portable Runtime (APR) library. It multiplexes connections, running the read/write communication asynchronously. Memory copies and transformations are kept to a minimum to provide high performance operation. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: apr-devel%{?_isa} %description devel This package contains libraries and header files for developing applications that use %{name}. %prep %setup -q -c %{name}-%{version} mv %{name}-%{version} ARM64 pushd ARM64 pushd build mv check.py check.py.orig sed -e 's;python;python3;g' check.py.orig > check.py mv gen_def.py gen_def.py.orig sed -e 's;python;python3;g' gen_def.py.orig > gen_def.py rm -f *.orig chmod 755 check.py gen_def.py popd popd cp -a ARM64 X86_64 %build pushd ARM64 export TARGET_ARCH=arm64 scons \ PYTHON=python3 \ CC=clang \ CFLAGS='-arch arm64' \ CPPFLAGS='-arch arm64' \ LINKFLAGS='-arch arm64' \ APR=%{_prefix} \ APU=%{_prefix} \ OPENSSL=%{_prefix} \ PREFIX=%{_prefix} \ LIBDIR=%{_libdir} \ %{?_smp_mflags} popd pushd X86_64 export TARGET_ARCH=x86_64 scons \ PYTHON=python3 \ CC=clang \ CFLAGS='-arch x86_64' \ CPPFLAGS='-arch x86_64' \ LINKFLAGS='-arch x86_64' \ APR=%{_prefix} \ APU=%{_prefix} \ OPENSSL=%{_prefix} \ PREFIX=%{_prefix} \ LIBDIR=%{_libdir} \ %{?_smp_mflags} popd %install rm -rf $RPM_BUILD_ROOT PWD=`pwd` pushd ARM64 rm -rf ${PWD}-root mkdir -p ${PWD}-root export TARGET_ARCH=arm64 scons \ CC=clang \ CFLAGS='-arch arm64' \ CPPFLAGS='-arch arm64' \ LINKFLAGS='-arch arm64' \ PREFIX=%{_prefix} \ install --install-sandbox=${PWD}-root cp -a CHANGES NOTICE README* LICENSE design-guide.txt .. find ${PWD}-root -type f -name '*.*a' -delete -print popd pushd X86_64 rm -rf ${PWD}-root mkdir -p ${PWD}-root export TARGET_ARCH=x86_64 scons \ CC=clang \ CFLAGS='-arch x86_64' \ CPPFLAGS='-arch x86_64' \ LINKFLAGS='-arch x86_64' \ PREFIX=%{_prefix} \ install --install-sandbox=${PWD}-root find ${PWD}-root -type f -name '*.*a' -delete -print 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 # install mkdir -p %{buildroot} tar cf - -C ARM64-root . | tar xpf - -C %{buildroot} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,wheel,-) %doc CHANGES %license LICENSE NOTICE %{_libdir}/*.dylib %exclude %{_libdir}/libserf-1.dylib %files devel %doc CHANGES README design-guide.txt %dir %{_includedir}/serf-1 %{_includedir}/serf-1/* %{_libdir}/libserf-1.dylib %{_libdir}/pkgconfig/serf*.pc %changelog * Wed Dec 25 2024 Keisuke Fujii 1.3.10-14hepx3a - 1st release on MacOS 14 - built with OSXWS 14 and clang * Wed Nov 8 2023 Keisuke Fujii 1.3.10-13hepx3a - 1st release on MacOS 13 - now uses python3 - built with OSXWS 13 and clang * Thu Jun 9 2022 Keisuke Fujii 1.3.9-12hepx2a - 2nd release on MacOS 12 for M1 and Intel Macs (fat). - built with OSXWS 12beta and clang * Mon Jun 6 2022 Keisuke Fujii 1.3.9-12hepx1a - 1st release on MacOS 12 for M1 Macs. - built with OSXWS 12beta and clang