%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} Name: clustershell Version: 1.4 Release: 1 Summary: Python framework for efficient cluster administration Group: System Environment/Base License: CeCILL-C URL: http://clustershell.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: python-devel >= 2.6.2 Requires: python >= 2.6.2 %description Tools and event-based Python library to execute commands on cluster nodes in parallel depending on selected engine and worker mechanisms. The library provides also advanced NodeSet and NodeGroups handling methods to ease and improve administration of large compute clusters or server farms. Three convenient command line utilities, clush, clubak and nodeset, allow traditional shell scripts to benefit some useful features offered by the library. %package -n vim-%{name} Summary: VIM files for ClusterShell Group: System Environment/Base Requires: %{name} = %{version}-%{release}, vim-common %description -n vim-%{name} Syntax highlighting in the VIM editor for ClusterShell configuration files. %prep %setup -q %build python setup.py build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} python setup.py install -O1 --skip-build --root ${RPM_BUILD_ROOT} # config files mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/%{name} cp conf/*.conf ${RPM_BUILD_ROOT}/%{_sysconfdir}/%{name}/ chmod 0644 ${RPM_BUILD_ROOT}/%{_sysconfdir}/%{name}/* # man pages mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1 cp doc/man/man1/clubak.1 doc/man/man1/clush.1 doc/man/man1/nodeset.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/ chmod 0644 ${RPM_BUILD_ROOT}%{_mandir}/man1/* mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man5 cp doc/man/man5/clush.conf.5 doc/man/man5/groups.conf.5 ${RPM_BUILD_ROOT}%{_mandir}/man5/ chmod 0644 ${RPM_BUILD_ROOT}%{_mandir}/man5/* # vim addons %define vimdatadir %{_datadir}/vim/vimfiles mkdir -p ${RPM_BUILD_ROOT}%{vimdatadir}/ftdetect cp doc/extras/vim/ftdetect/clustershell.vim ${RPM_BUILD_ROOT}%{vimdatadir}/ftdetect/ chmod 0644 ${RPM_BUILD_ROOT}%{vimdatadir}/ftdetect/* mkdir -p ${RPM_BUILD_ROOT}%{vimdatadir}/syntax cp doc/extras/vim/syntax/clushconf.vim doc/extras/vim/syntax/groupsconf.vim ${RPM_BUILD_ROOT}%{vimdatadir}/syntax/ chmod 0644 ${RPM_BUILD_ROOT}%{vimdatadir}/syntax/* cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc README ChangeLog Licence_CeCILL-C_V1-en.txt Licence_CeCILL-C_V1-fr.txt %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/clustershell/clush.conf %config(noreplace) %{_sysconfdir}/clustershell/groups.conf %{_bindir}/* %{_mandir}/man?/* %{python_sitelib}/* /usr/bin/* %files -n vim-%{name} %defattr(-,root,system,-) %{vimdatadir}/ftdetect/clustershell.vim %{vimdatadir}/syntax/clushconf.vim %{vimdatadir}/syntax/groupsconf.vim %changelog * Mon Jan 17 2011 Michael Perzl - 1.4-1 - first version for AIX V5.1 and higher