a917aa3192
* New command 'system': provides general information about
running system.
* More user friendly library interface
* Errors are handled more gracefully, they are well readable and
colorized.
* Interactive mode won't be ended by error so easily, it adds
few built-in commands and allows for changing to subcommand
namespaces. Tab completion has been also improved a lot.
* Help command is now more helpful. There are many ways to get
help.
* Added formatting properties to commands.
* Fixed --log-file option which did not work at all.
OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:wbem/openlmi-scripts?expand=0&rev=8
217 lines
6.6 KiB
RPMSpec
217 lines
6.6 KiB
RPMSpec
%global commit bd21016ba88ba9f856e3e4bbb9b02b72fd96af3b
|
|
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
|
%global openlmi_scripts_version 0.2.7
|
|
%global commands logicalfile service software storage hardware
|
|
|
|
Name: openlmi-scripts
|
|
Version: %{openlmi_scripts_version}
|
|
Release: 1%{?dist}
|
|
Summary: Client-side python modules and command line utilities
|
|
|
|
License: BSD-2-Clause
|
|
URL: http://fedorahosted.org/openlmi
|
|
Group: System/Management
|
|
# Source0: https://github.com/openlmi/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
%if 0%{?suse_version} > 1110
|
|
BuildArch: noarch
|
|
%endif
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%if 0%{?suse_version}
|
|
BuildRequires: python-devel
|
|
BuildRequires: python-setuptools
|
|
BuildRequires: openlmi-tools
|
|
BuildRequires: python-docopt >= 0.6.1
|
|
BuildRequires: openlmi
|
|
BuildRequires: python-sphinx-theme-openlmi
|
|
Requires: python
|
|
%if 0%{?suse_version} > 1010
|
|
BuildRequires: fdupes
|
|
%endif
|
|
%else
|
|
BuildRequires: python2-devel
|
|
Requires: python2
|
|
%endif
|
|
Requires: openlmi-python-base >= 0.3.0
|
|
Requires: python-docopt >= 0.6.1
|
|
|
|
%description
|
|
Client-side python modules and command line utilities.
|
|
|
|
%package doc
|
|
Summary: OpenLMI scripts documentation
|
|
Group: Documentation
|
|
|
|
%description doc
|
|
This package contains the documents for OpenLMI Scripts.
|
|
|
|
%package logicalfile
|
|
Summary: Client scripts for OpenLMI Logical File provider
|
|
Version: 0.0.2
|
|
Requires: %{name} = %{openlmi_scripts_version}-%{release}
|
|
|
|
%description logicalfile
|
|
This packages contains client side python library for OpenLMI Logical File
|
|
provider and command line wrapper.
|
|
|
|
%package service
|
|
Summary: Client scripts for OpenLMI Service provider
|
|
Version: 0.1.1
|
|
Requires: %{name} = %{openlmi_scripts_version}-%{release}
|
|
|
|
%description service
|
|
This packages contains client side python library for OpenLMI Service
|
|
provider and command line wrapper.
|
|
|
|
%package hardware
|
|
Summary: Client scripts for OpenLMI Hardware provider
|
|
Version: 0.2.4
|
|
Requires: %{name} = %{openlmi_scripts_version}-%{release}
|
|
|
|
%description hardware
|
|
This packages contains client side python library for OpenLMI Hardware
|
|
provider and command line wrapper.
|
|
|
|
%package software
|
|
Summary: Client scripts for OpenLMI Software provider
|
|
Version: 0.2.4
|
|
Requires: %{name} = %{openlmi_scripts_version}-%{release}
|
|
|
|
%description software
|
|
This packages contains client side python library for OpenLMI Software
|
|
provider and command line wrapper.
|
|
|
|
%package storage
|
|
Summary: Client scripts for OpenLMI Storage provider
|
|
Version: 0.0.2
|
|
Requires: %{name} = %{openlmi_scripts_version}-%{release}
|
|
|
|
%description storage
|
|
This packages contains client side python library for OpenLMI Storage
|
|
provider and command line wrapper.
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
%{__python} setup.py build
|
|
for cmd in %{commands}; do
|
|
pushd commands/$cmd
|
|
%{__python} setup.py build
|
|
popd
|
|
done
|
|
make -C man
|
|
INCLUDE_COMMANDS=1 COMMANDS="%{commands}" make -C doc html
|
|
|
|
%install
|
|
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT --prefix=%{_prefix}
|
|
for cmd in %{commands}; do
|
|
pushd commands/$cmd
|
|
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT --prefix=%{_prefix}
|
|
popd
|
|
done
|
|
# copy init module for namespace package
|
|
# without it the imports from eggs installed to user directory would not work
|
|
cp -p lmi/scripts/__init__.* $RPM_BUILD_ROOT%{python_sitelib}/lmi/scripts
|
|
|
|
# install config file
|
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/openlmi/scripts
|
|
install -m 0644 config/lmi.conf $RPM_BUILD_ROOT%{_sysconfdir}/openlmi/scripts
|
|
|
|
# install man page
|
|
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
|
|
install -m 0644 man/lmi.1.gz $RPM_BUILD_ROOT%{_mandir}/man1
|
|
|
|
# install bash completion
|
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
|
|
install -m 0644 completion/lmi.bash $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
|
|
%if 0%{?suse_version}
|
|
install -m 0755 completion/lmi-bash-completion/print_possible_commands.sh \
|
|
$RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/lmi_print_possible_commands.sh
|
|
cp -pr completion/lmi-bash-completion/commands \
|
|
$RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
|
|
%else
|
|
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/lmi-bash-completion
|
|
install -m 0755 completion/lmi-bash-completion/print_possible_commands.sh \
|
|
$RPM_BUILD_ROOT%{_libexecdir}/lmi-bash-completion
|
|
cp -pr completion/lmi-bash-completion/commands \
|
|
$RPM_BUILD_ROOT%{_libexecdir}/lmi-bash-completion
|
|
%endif
|
|
|
|
# install documentation
|
|
install -m 755 -d $RPM_BUILD_ROOT%{_docdir}/%{name}/html
|
|
cp -pr doc/_build/html/* $RPM_BUILD_ROOT%{_docdir}/%{name}/html
|
|
install -m 644 README.md COPYING Changelog $RPM_BUILD_ROOT/%{_docdir}/%{name}
|
|
|
|
%if 0%{?suse_version} > 1010
|
|
%fdupes -s $RPM_BUILD_ROOT
|
|
%endif
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc README.md COPYING Changelog
|
|
%{_bindir}/lmi
|
|
%if 0%{?suse_version}
|
|
%dir %{_sysconfdir}/openlmi
|
|
%endif
|
|
%dir %{_sysconfdir}/openlmi/scripts
|
|
%config(noreplace) %{_sysconfdir}/openlmi/scripts/lmi.conf
|
|
%{_sysconfdir}/bash_completion.d/lmi.bash
|
|
%if 0%{?suse_version}
|
|
%dir %{python_sitelib}/lmi
|
|
%{_sysconfdir}/bash_completion.d/lmi_print_possible_commands.sh
|
|
%dir %{_sysconfdir}/bash_completion.d/commands
|
|
%{_sysconfdir}/bash_completion.d/commands/_help
|
|
%endif
|
|
%dir %{python_sitelib}/lmi/scripts
|
|
%{python_sitelib}/lmi/scripts/__init__.py*
|
|
%{python_sitelib}/lmi/scripts/common
|
|
%{python_sitelib}/lmi/scripts/_metacommand
|
|
%{python_sitelib}/openlmi_scripts-*
|
|
%{_mandir}/man1/lmi.1.gz
|
|
%exclude %{_docdir}/%{name}/html
|
|
|
|
%files doc
|
|
%defattr(-,root,root)
|
|
%{_docdir}/%{name}/html
|
|
|
|
%files logicalfile
|
|
%defattr(-,root,root)
|
|
%doc commands/logicalfile/README.md COPYING
|
|
%{python_sitelib}/lmi/scripts/logicalfile/
|
|
%{python_sitelib}/openlmi_scripts_logicalfile-*
|
|
|
|
%files service
|
|
%defattr(-,root,root)
|
|
%doc commands/service/README.md COPYING
|
|
%{python_sitelib}/lmi/scripts/service/
|
|
%{python_sitelib}/openlmi_scripts_service-*
|
|
|
|
%files software
|
|
%defattr(-,root,root)
|
|
%doc commands/software/README.md COPYING
|
|
%{python_sitelib}/lmi/scripts/software/
|
|
%{python_sitelib}/openlmi_scripts_software-*
|
|
|
|
%files storage
|
|
%defattr(-,root,root)
|
|
%doc commands/storage/README.md COPYING
|
|
%{python_sitelib}/lmi/scripts/storage/
|
|
%{python_sitelib}/openlmi_scripts_storage-*
|
|
|
|
%files hardware
|
|
%defattr(-,root,root)
|
|
%doc commands/storage/README.md COPYING
|
|
%{python_sitelib}/lmi/scripts/hardware/
|
|
%{python_sitelib}/openlmi_hardware-*
|
|
|
|
%changelog
|
|
* Fri Aug 09 2013 Michal Minar <miminar@redhat.com> 0.1.1-1
|
|
- Rebased to 0.1.1
|
|
|
|
* Thu Aug 08 2013 Michal Minar <miminar@redhat.com> 0.1.0-1
|
|
- Initial version.
|
|
|