# # spec file for package multiarch-wrapper # source from CLFS # %define binfiles multiarch-wrapper Name: multiarch-wrapper Version: 2017.10.07 Release: 2.22 Summary: Multiarch Wrapper License: ? GPL-2.0+ and LGPL-2.1+ Url: http://www.clfs.org/view/CLFS-3.0.0-SYSVINIT/x86_64/final-system/multiarch_wrapper.html Source: multiarch-wrapper-%{version}.tar.xz Patch: multiarch-wrapper-32.patch Provides: /usr/bin/mulriarch-wrapper BuildRoot: %{_tmppath}/%{name}-%{version}-build %description The Multiarch Wrapper is used to wrap certain binaries that have hardcoded paths to libraries or are architecture specific. %prep # get source from subversion repo #pushd %__repodir #for i in %{binfiles} #do # rm -rf $i # rm -f %_sourcedir/$i.tar.xz # svn up $i # tar cfJ %_sourcedir/$i.tar.xz $i #done # #popd %setup -q %ifarch %ix86 %patch %endif %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" gcc multiarch_wrapper.c -o multiarch_wrapper %install mkdir -p $RPM_BUILD_ROOT%{_bindir} install -m 0755 multiarch_wrapper $RPM_BUILD_ROOT%{_bindir} # strip files/binarys for filename in $(find $RPM_BUILD_ROOT%{_bindir}* -type f) do %{__strip} -R .note -R .comment "$filename" done %check echo 'echo "32bit Version"' > test-32 echo 'echo "64bit Version"' > test-64 chmod -v 755 test-32 test-64 ln -sfv multiarch_wrapper test ./test %files %defattr(-,root,root) %{_bindir} %changelog * Sat Oct 07 2017 holgerbruenjes@gmx.net - first Version