LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File drobo-utils.spec of Package drobo-utils (Project home:etrash)

# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name:           drobo-utils
Version:        0.6.2.2
Release:        1
Summary:        Manage data robotics storage units (drobos)

Group:          Applications/System
License:        GPLv3+
URL:            http://drobo-utils.sourceforge.net/
Source0:        http://downloads.sourceforge.net/project/drobo-utils/drobo-utils/r0_6_2/%{name}-%{version}.tgz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  python-devel, desktop-file-utils
Requires:       parted, python-ctypes

%description
 Provides utilities for managing Data Robotics storage units, also known as
 "Drobos".  Drobos are external hard drive enclosures that connect to your PC
 via USB or Firewire and provide RAID-like features.  Drobos provide automatic
 data redundancy, hotswappable drive bays, and the size of the RAID can be
 easily expanded.  Different sized hard drives can be mixed on the same Drobo.
 See http://drobo.com for more information.
 
 This package provides a command line interface for managing a Drobo, as well
 as a graphical dashboard interface.  To enable the graphical interface, please
 be sure to install the suggested python-qt4 package, as well as gparted.

%package gui
Summary:        Manage data robotics storage units (drobos) - GUI utils
Group:          Applications/System

Requires:       gparted, PyQt4, drobo-utils

%description gui
GUI util for drobo-utils

%prep
%setup -q


%build
# Remove CFLAGS=... for noarch packages (unneeded)
CFLAGS="%{optflags}" %{__python} setup.py build

sed -i -e "s/\#\!\/.*//g" DroboGUI.py

%install
rm -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}

# this is not the right place:
rm -rf  %{buildroot}/usr/share/drobo-utils-doc/
 
#Menu entry
install -d -m755 %{buildroot}%{_datadir}/applications

cat > %{buildroot}%{_datadir}/applications/%{name}.desktop <<EOF
[Desktop Entry]
Encoding=UTF-8
Name=%name
Exec=droboview
Comment=Manage data robotics storage units (drobos)
Terminal=false
Type=Application
Categories=Settings;System;
X-AppInstall-Package=%{name}
EOF

desktop-file-install  --dir=%{buildroot}%{_datadir}/applications/ %{buildroot}%{_datadir}/applications/%{name}.desktop 

# manpage:
install -d -m755 %{buildroot}%{_mandir}/man8/
install -m 644 drobom.8 %{buildroot}%{_mandir}/man8/
install -m 644 droboview.8 %{buildroot}%{_mandir}/man8/


%clean
rm -rf %{buildroot}

%post gui
update-desktop-database %{_datadir}/applications

%postun gui
update-desktop-database %{_datadir}/applications


%files
%defattr(-,root,root,-)
%doc CHANGES.html DEVELOPERS.html drobom.html  index.html README.html QA.txt COPYING
# For noarch packages: sitelib
%{python_sitelib}/*
/usr/bin/drobom
%{_mandir}/man8/drobom.8.gz

%files gui
%doc droboview.html
/usr/bin/droboview
%{_datadir}/applications/drobo-utils.desktop
%{_datadir}/pixmaps/Drobo-Front-0000.gif
%{_mandir}/man8/droboview.8.gz

%changelog