File udiskie.spec of Package udiskie

#
# spec file for package udiskie
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           udiskie
Version:        1.7.5
Release:        0
Summary:        Removable disk automounter for udisks
License:        MIT
Group:          System/GUI/Other
URL:            https://github.com/coldfix/udiskie
Source:         https://files.pythonhosted.org/packages/source/u/%{name}/%{name}-%{version}.tar.gz
BuildRequires:  asciidoc
BuildRequires:  fdupes
# Needed for typelib() - Requires.
BuildRequires:  gobject-introspection
BuildRequires:  hicolor-icon-theme
BuildRequires:  libxslt-tools
# Runtime dependencies:
BuildRequires:  python3-gobject
BuildRequires:  python3-setuptools
BuildRequires:  typelib(Gtk) = 3.0
BuildRequires:  typelib(Notify)
Requires:       gdk-pixbuf-loader-rsvg
Requires:       python3-PyYAML
Requires:       python3-docopt
Requires:       python3-gobject
Requires:       python3-setuptools
Requires:       python3-xml
Requires:       typelib(Gtk) = 3.0
Requires:       udisks2
Recommends:     %{name}-lang
Recommends:     python3-keyutils
BuildArch:      noarch

%description
udiskie is a UDisks front-end that allows to manage removeable media such as CDs
or flash drives from userspace. Its features include:

- automount removable media when inserted
- notifications (on insertion, mount, unmount, …)
- GTK tray icon to manage all available devices
- command line tools for manual un-/mounting
- support for LUKS encrypted devices
- password caching
- works with either udisks1 or udisks2
- an extensible code base (python)
- a maintainer who is open for suggestions;)

%lang_package

%prep
%setup -q

%build
python3 ./setup.py build

%install
python3 ./setup.py install -O1 \
    --prefix=%{_prefix} \
    --root %{buildroot} \
    --record-rpm=files.lst

make %{?_smp_mflags} -C doc
install -Dm 0644 doc/%{name}.8 %{buildroot}%{_mandir}/man8/%{name}.8
# Create man pages for other binaries
for other in %{name}-mount %{name}-umount %{name}-info; do
  echo ".so man8/%{name}.8" > %{buildroot}%{_mandir}/man8/"${other}.8"
done

%fdupes %{buildroot}%{python3_sitelib}/%{name}/
%fdupes %{buildroot}%{_mandir}/man8/

%find_lang %{name}


%files
%doc CHANGES.rst CONTRIBUTORS README.rst
%license COPYING
%{_bindir}/%{name}*
%{_datadir}/icons/hicolor/*/actions/%{name}-*.??g
%{python3_sitelib}/%{name}
%{python3_sitelib}/%{name}-*-py%{py3_ver}.egg-info
%{_mandir}/man?/%{name}*.?%{ext_man}
%{_datadir}/zsh/site-functions/_udiskie*

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by