File gkeyring.spec of Package gkeyring

#
# spec file for package gkeyring
#
# Copyright (c) 2017 SUSE LINUX Products 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:           gkeyring
Version:        0.4
Release:        0
License:        AGPL-3.0
Summary:        Command line tool to access GNOME keyring
Url:            https://github.com/kparal/gkeyring
Group:          Productivity/Other
Source0:        https://github.com/kparal/gkeyring/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        https://github.com/kparal/gkeyring/blob/master/LICENSE
BuildRequires:  help2man
BuildRequires:  python
BuildRequires:  python-base
BuildRequires:  python-devel
BuildRequires:  python-gnomekeyring
BuildRequires:  python-setuptools
Requires:       python
Requires:       python-base
Requires:       python-gnomekeyring
BuildRequires:  python-gobject2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
A small Python tool for shell access to GNOME keyring. It provides
simple querying for and creating of keyring items.

%prep
%setup -q
cp %{S:1} ${PWD}/

%build
help2man --no-info --section=1 ./%{name}.py > %{name}.1
sed -ri '\@#!.*python@d' %{name}.py
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
mkdir -p %{buildroot}%{_mandir}/man1
install -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1/

%files
%defattr(-,root,root)
%doc LICENSE README.rst
%{_bindir}/%{name}
%dir %{python_sitelib}/%{name}-%{version}*/
%{python_sitelib}/%{name}-%{version}*/*
%{python_sitelib}/%{name}.py*
%{_mandir}/man1/%{name}.1*

%changelog
openSUSE Build Service is sponsored by