# don't want auto deps... %define __perl_requires %{nil} %define __perl_provides %{nil} Name: maxdb-buildtools Version: 562049 Release: 1%{?dist} Summary: Build tools needed to build maxdb Group: Development/Tools License: GPL URL: http://dev.mysql.com/downloads/maxdb/7.6.00.html Source0: http://sunsite.informatik.rwth-aachen.de/mysql/Downloads/MaxDB/7.6.00/maxdb-buildtools-source-562049.tgz # this is a patch put together from the debian patches thanks folks :) Patch0: maxdb-buildtools.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: vim-minimal bison flex python autoconf perl-libxml-perl gawk Requires: vim-minimal bison flex python perl-libxml-perl %description %{summary} %prep %setup -q -n TOOLSRC %patch0 autoconf %build %configure NOREG=1 make %install rm -rf ${RPM_BUILD_ROOT} NOREG=1 make install INSTDIR=${RPM_BUILD_ROOT}/%{_prefix}/%{name} cp ${RPM_BUILD_ROOT}/%{_prefix}/%{name}/data/distribTools/iprofile \ ${RPM_BUILD_ROOT}/%{_prefix}/%{name}/iprofile.tmp # add symlinks ln -s %{_bindir} \ ${RPM_BUILD_ROOT}/%{_prefix}/%{name}/Posix ln -fs %{_bindir}/flex \ ${RPM_BUILD_ROOT}/%{_prefix}/%{name}/gnu/bin/flex rm -fr \ ${RPM_BUILD_ROOT}/%{_prefix}/%{name}/lib/Python/{xml,distribTools,perforce} # set exec files right find ${RPM_BUILD_ROOT}/%{_prefix}/%{name}/ -exec file {} \; |\ grep executable | cut -d':' -f1 | xargs chmod a+x file ${RPM_BUILD_ROOT}/%{_prefix}/%{name}/bin/* |\ awk -F: '!/(executable|link|directory)/ { print $$1 }' | cut -d':' -f1 |\ xargs chmod a-x # this is in debian but running locally does not apply to any files... #(find ${RPM_BUILD_ROOT}/%{_prefix}/%{name}/lib -perm +1 -exec file -F' ' {} \; | awk '!/(executable|link|directory|ELF)/ { print $$1 }' | xargs chmod a-x) # fix vmake for f in `find ${RPM_BUILD_ROOT}/%{_prefix}/%{name} -name '*.f'`; do \ if [ `stat -c '%h' $f` -gt "1" ]; then \ rm -f $f; \ fi \ done # fix perl and python # and make them executable for i in `find ${RPM_BUILD_ROOT} -type f`; do \ sed '1s,#!.*python[^ ]*\(.*\),#!/usr/bin/python\1,' \ $i > $i.temp; \ if cmp --quiet $i $i.temp; then \ rm -f $i.temp; \ else \ mv -f $i.temp $i; \ chmod 755 $i; \ echo "fixed interpreter: $i"; \ fi; \ done for i in `find ${RPM_BUILD_ROOT} -type f`; do \ sed '1s,#!.*perl[^ ]*\(.*\),#!/usr/bin/perl\1,' \ $i > $i.temp; \ if cmp --quiet $i $i.temp; then \ rm -f $i.temp; \ else \ mv -f $i.temp $i; \ chmod 755 $i; \ echo "fixed interpreter: $i"; \ fi; \ done chmod a-x ${RPM_BUILD_ROOT}/%{_prefix}/%{name}/iprofile.tmp chmod a-x ${RPM_BUILD_ROOT}/%{_prefix}/%{name}/data/distribTools/iprofile %clean rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,root,-) %{_prefix}/%{name} %changelog * Fri Feb 03 2006 Andreas Bierfert 562049-1 - Initial Release