%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} Name: clustershell Version: 1.7 Release: 1 Summary: Python framework for efficient cluster administration Group: System Environment/Base License: CeCILL-C URL: http://cea-hpc.github.io/clustershell/ Source0: https://github.com/cea-hpc/%{name}/archive/v%{version}.tar.gz#/%{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}/*.conf # man pages mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1 cp doc/man/man1/clubak.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/ cp doc/man/man1/clush.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/ cp 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 ${RPM_BUILD_ROOT}%{_mandir}/man5/ cp 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 ${RPM_BUILD_ROOT}%{vimdatadir}/syntax/ cp 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.md ChangeLog Licence_CeCILL-C_V1-en.txt Licence_CeCILL-C_V1-fr.txt %doc doc/examples %doc doc/sphinx %dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{name}/groups.d %dir %{_sysconfdir}/%{name}/groups.conf.d %config(noreplace) %{_sysconfdir}/clustershell/clush.conf %config(noreplace) %{_sysconfdir}/clustershell/groups.conf %config(noreplace) %{_sysconfdir}/clustershell/groups.d/local.cfg %{_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 May 02 2016 Michael Perzl - 1.7-1 - updated to version 1.7 * Sat Apr 14 2012 Michael Perzl - 1.6-1 - updated to version 1.6 * Tue Jun 21 2011 Michael Perzl - 1.5.1-1 - updated to version 1.5.1 * Mon Mar 21 2011 Michael Perzl - 1.4.3-1 - updated to version 1.4.3 * Mon Feb 14 2011 Michael Perzl - 1.4.1-1 - updated to version 1.4.1 * Mon Jan 17 2011 Michael Perzl - 1.4-1 - first version for AIX V5.1 and higher