%define svnver 1 Summary: Subversion Name: subversion Version: 1.12.2 Release: 12%{?dist}3a Source0: localhost:/%{name}-%{version}.tar.bz2 URL: https://subversion.apache.org License: License: ASL 2.0 %define __prefix /opt/apache Prefix: %{__prefix} BuildRoot: %{_tmppath}/%{name}-root BuildRequires: apr-devel >= 1.3.0, apr-util-devel >= 1.3.0, serf-devel >= 1.3.0 BuildArch: fat %description Subversion is an open source version control system. Founded in 2000 by CollabNet, Inc., the Subversion project and software have seen incredible success over the past decade. Subversion has enjoyed and continues to enjoy widespread adoption in both the open source arena and the corporate world. Subversion is developed as a project of the Apache Software Foundation, and as such is part of a rich community of developers and users. We're always in need of individuals with a wide range of skills, and we invite you to participate in the development of Apache Subversion. Here's how to get started. %package devel Summary: Subversion development kit Requires: subversion%{?_isa} = %{version}-%{release}, apr-devel%{?_isa}, apr-util-devel%{?_isa}, serf%{?_isa}, pkgconfig %description devel This package provides the support files which can be used to build applications using the subversion library. %prep %setup -q -c %{name}-%{version} mv %{name}-%{version} ARM64 cp -a ARM64 X86_64 %build pushd ARM64 export CC=clang export CXX=clang++ export CFLAGS="-arch arm64 $RPM_OPT_FLAGS -I%{_includedir}" export CPPFLAGS="-arch arm64 -I%{_includedir}" export CXXFLAGS="$CFLAGS" export LDFLAGS="-arch arm64 $RPM_LD_FLAGS" export PREFIX="%{_prefix}" export LIBDIR="%{_libdir}" ./configure --prefix=%{_prefix} \ --with-apr=%{_prefix} \ --with-apr-util=%{_prefix} \ --with-lz4=internal \ --with-utf8proc=internal \ --with-serf=%{_prefix} \ --disable-keychain make %{?_smp_mflags} popd pushd X86_64 export CC=clang export CXX=clang++ export CFLAGS="-arch x86_64 $RPM_OPT_FLAGS -I%{_includedir}" export CPPFLAGS="-arch x86_64 -I%{_includedir}" export CXXFLAGS="$CFLAGS" export LDFLAGS="-arch x86_64 $RPM_LD_FLAGS" ./configure --prefix=%{_prefix} \ --with-apr=%{_prefix} \ --with-apr-util=%{_prefix} \ --with-lz4=internal \ --with-utf8proc=internal \ --with-serf=%{_prefix} \ --disable-keychain make %{?_smp_mflags} popd %install rm -rf $RPM_BUILD_ROOT PWD=`pwd` pushd ARM64 rm -rf ${PWD}-root mkdir -p ${PWD}-root export CFLAGS="-arch arm64 $RPM_OPT_FLAGS -I%{_includedir}" export CPPFLAGS="-arch arm64 -I%{_includedir}" export CXXFLAGS="$CFLAGS" export LDFLAGS="-arch arm64 $RPM_LD_FLAGS" export PREFIX="%{_prefix}" export LIBDIR="%{_libdir}" make install DESTDIR=${PWD}-root find ${PWD}-root -name '*.la' -exec rm -f {} \; cp -a BUGS CHANGES COMMITTERS NOTICE README* LICENSE doc .. popd pushd X86_64 rm -rf ${PWD}-root mkdir -p ${PWD}-root export CFLAGS="-arch x86_64 $RPM_OPT_FLAGS -I%{_includedir}" export CPPFLAGS="-arch x86_64 -I%{_includedir}" export CXXFLAGS="$CFLAGS" export LDFLAGS="-arch x86_64 $RPM_LD_FLAGS" 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 # install mkdir -p %{buildroot} tar cf - -C ARM64-root . | tar xpf - -C %{buildroot} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,wheel) %doc BUGS CHANGES COMMITTERS README* doc %license LICENSE NOTICE %{_bindir}/* %{_libdir}/* %{_datadir}/locale/*/*/*.mo %files devel %defattr(-,root,wheel) %dir %{_includedir}/subversion-%{svnver} %{_includedir}/subversion-%{svnver}/* %{_datadir}/pkgconfig/*.pc %{_mandir}/man*/* %changelog * Thu Jun 9 2022 Keisuke Fujii 1.12.2-12hepx3a - 3rd release on MacOS 12 for M1 and Intel Macs (fat). - built with OSXWS 12beta and clang * Mon Jun 6 2022 Keisuke Fujii 1.12.2-12hepx2a - 3rd release with src files on MacOS 12 for M1 Macs. - built with OSXWS 12beta and clang * Sun Apr 3 2022 Keisuke Fujii 1.12.2-12hepx1b - 2nd binary only release on MacOS 12 for M1 Macs. - built with OSXWS 12beta and clang * Fri Mar 4 2022 Keisuke Fujii 1.12.2-12hepx1a - 1st binary only release on MacOS 12 for M1 Macs. - built with OSXWS 12beta and clang