# # spec file for package mysql-utils # %define binfiles lastfile rotation udate2str getfiledate filelist Name: database-utils Version: 2015.12.199 Release: 2.15 Summary: MySQL/Firebird Basic Utilities License: GPL-2.0+ and LGPL-2.1+ Source1: lastfile.tar.xz Source2: rotation.tar.xz Source3: udate2str.tar.xz Source4: filelist.tar.xz Source5: getfiledate.tar.xz Provides: /usr/bin/lastfile Provides: /usr/bin/rotation Provides: /usr/bin/udate2str Provides: /usr/bin/filelist Provides: /usr/bin/getfiledate BuildRoot: %{_tmppath}/%{name}-%{version}-build %description for MySQL/MariaDB/Firebird %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 -cTq -n database-utils -a 1 -a 2 -a 3 -a 4 -a 5 %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" for i in %{binfiles} do pushd $i make popd done %install mkdir -p $RPM_BUILD_ROOT/usr/bin for i in %{binfiles} do pushd $i cp $i $RPM_BUILD_ROOT/usr/bin popd done # strip files/binarys for filename in $(find $RPM_BUILD_ROOT/usr/bin/* -type f) do strip -R .note -R .comment "$filename" done %files %defattr(-,root,root) /usr/bin %changelog * Sat Sep 19 2015 holgerbruenjes@gmx.net - first Version