Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# forked from https://build.opensuse.org/package/view_file/openSUSE:Factory/gnome-passwordsafe/gnome-passwordsafe.spec
# spec file for package gnome-passwordsafe
#
# 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.
%define appname PasswordSafe
%define appid org.gnome.PasswordSafe
Name: gnome-passwordsafe
Version: 3.32.0
Release: 1%{?dist}
Summary: A password manager for GNOME
License: GPLv3+
URL: https://gitlab.gnome.org/World/%{appname}
Source: %{url}/-/archive/%{version}/%{appname}-%{version}.tar.bz2
BuildRequires: meson
BuildRequires: pkgconfig
BuildRequires: desktop-file-utils libappstream-glib
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(libhandy-0.0)
BuildRequires: pkgconfig(pwquality)
BuildRequires: python3 python3-devel python3-pip
BuildRequires: python3-dateutil
BuildRequires: python3dist(pycparser)
BuildRequires: python3dist(lxml)
BuildRequires: python3dist(cffi)
BuildRequires: python3dist(future)
BuildRequires: python3dist(pycryptodome)
BuildRequires: python3dist(pykeepass)
BuildRequires: python3dist(construct)
Requires: python3dist(pykeepass)
Requires: python3dist(construct)
Requires: python3dist(pycryptodome)
Requires: python3dist(lxml)
Requires: python3dist(pwquality)
Requires: python3dist(argon2-cffi)
BuildArch: noarch
%description
Password Safe is a password manager which makes use of the Keepass v.4 format.
It integrates with the GNOME desktop and provides an interface for the
management of password databases.
%prep
%setup -q -n %{appname}-%{version}
%build
%meson
%meson_build
%install
%meson_install
%find_lang passwordsafe
%check
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{appid}.appdata.xml
desktop-file-validate %{buildroot}%{_datadir}/applications/%{appid}.desktop
%files -f passwordsafe.lang
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{python3_sitelib}/passwordsafe/
%{_datadir}/applications/%{appid}.desktop
%{_datadir}/passwordsafe/
%{_datadir}/glib-2.0/schemas/%{appid}.gschema.xml
%{_datadir}/icons/hicolor/symbolic/apps/%{appid}-symbolic.svg
%{_datadir}/icons/hicolor/scalable/apps/%{appid}.svg
%{_datadir}/metainfo/%{appid}.appdata.xml
%changelog
* Fri Jun 14 2019 Pavlo Rudyi <paulcarroty@fedoraproject.org> - 3.32-1
- initial build
%global pypi_name argon2-cffi
Name: python-%{pypi_name}
Version: 19.1.0
Release: 1%{?dist}
Summary: The secure Argon2 password hashing algorithm
License: MIT
URL: https://argon2-cffi.readthedocs.io/
Source0: https://files.pythonhosted.org/packages/aa/bb/d620acb83d6e7d0a1f896557524b85e058500bd858ee814d467428718811/argon2_cffi-19.1.0.tar.gz
# %{pypi_source}
BuildRequires: python3-devel
BuildRequires: gcc
BuildRequires: pkgconfig(libargon2)
BuildRequires: python3dist(cffi)
BuildRequires: python3dist(hypothesis)
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(setuptools)
BuildRequires: python3dist(six)
BuildRequires: python3dist(wheel)
BuildRequires: python3dist(sphinx)
%description
CFFI-based Argon2 Bindings for Python
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
Requires: python3dist(cffi) >= 1.0.0
Requires: python3dist(hypothesis)
Requires: python3dist(pytest)
Requires: python3dist(six)
%description -n python3-%{pypi_name}
CFFI-based Argon2 Bindings for Python
%package -n python-%{pypi_name}-doc
Summary: Documentation for argon2-cffi
%description -n python-%{pypi_name}-doc
Documentation for argon2-cffi
%prep
%autosetup -n argon2_cffi-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
# using system libargon
rm -rf extras/libargon2/LICENSE docs/license.rst
rm -rf extras/libargon2/README.md
%build
export ARGON2_CFFI_USE_SYSTEM=1
%py3_build
# generate html docs
PYTHONPATH=${PWD} sphinx-build-3 docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%install
%py3_install
%check
export k='not test_argument_ranges'
%{__python3} setup.py test
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%{python3_sitearch}/argon2
%{python3_sitearch}/argon2_cffi-%{version}-py?.?.egg-info
%files -n python-%{pypi_name}-doc
%doc html
%license LICENSE
%changelog
* Fri Jun 14 2019 Pavlo Rudyi <paulcarroty@fedoraproject.org> - 19.1.0-1
- initial build
%global pypi_name pycryptodome
Name: python-%{pypi_name}
Version: 3.8.2
Release: 1%{?dist}
Summary: Cryptographic library for Python
# The source code in PyCryptodome is partially in the public domain
# and partially released under the BSD 2-Clause license.
# In either case, there are minimal if no restrictions on the redistribution,
# modification and usage of the software.
License: BSD and Public Domain and ASL 2.0
URL: https://www.pycryptodome.org
Source0: %{pypi_source}
Patch0: https://src.fedoraproject.org/rpms/python-pycryptodomex/raw/master/f/python-pycryptodomex-3.7.3-use_external_libtomcrypt.patch
BuildRequires: python3-devel
BuildRequires: gcc
BuildRequires: python3dist(setuptools)
BuildRequires: libtomcrypt-devel
%description
PyCryptodome is a self-contained Python package of low-level
cryptographic primitives.
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
# GMP library is dl-opened
Requires: gmp%{?_isa}
%description -n python3-%{pypi_name}
PyCryptodome PyCryptodome is a self-contained Python package of low-level
cryptographic primitives.It supports Python 2.6 and 2.7, Python 3.4 and newer,
and PyPy.
%prep
%autosetup -n %{pypi_name}-%{version} -p0
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
# Drop bundled libraries
rm -r src/libtom/
# Remove shebang
sed '1{\@^#! /usr/bin/env python@d}' lib/Crypto/SelfTest/__main__.py >lib/Crypto/SelfTest/__main__.py.new && \
touch -r lib/Crypto/SelfTest/__main__.py lib/Crypto/SelfTest/__main__.py.new && \
mv lib/Crypto/SelfTest/__main__.py.new lib/Crypto/SelfTest/__main__.py
%build
# Use -fno-strict-aliasing in order to bypass:
# https://github.com/Legrandin/pycryptodome/issues/291
export CFLAGS="%{optflags} -fno-strict-aliasing"
%py3_build
%install
%py3_install
%check
%{__python3} setup.py test
%files -n python3-%{pypi_name}
%doc AUTHORS.rst Changelog.rst README.rst
%license LICENSE.rst
%{python3_sitearch}/Crypto
%{python3_sitearch}/%{pypi_name}-%{version}-py?.?.egg-info
%changelog
* Fri Jun 14 2019 Pavlo Rudyi <paulcarroty@fedoraproject.org> - 3.8.2-1
- initial build
%global pypi_name pykeepass
Name: python-%{pypi_name}
Version: 3.0.3
Release: 1%{?dist}
Summary: Python library to interact with keepass databases (supports KDBX3 and KDBX4)
License: GPLv3
URL: https://github.com/pschmitt/pykeepass
Source0: %{pypi_source}
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
%description
pykeepass library allows you to write entries to a KeePass database.
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
Requires: python3dist(argon2-cffi)
Requires: python3dist(construct)
Requires: python3dist(future)
Requires: python3dist(lxml)
Requires: python3dist(pycryptodome)
Requires: python3dist(python-dateutil)
%description -n python3-%{pypi_name}
pykeepass library allows you to write entries to a KeePass database.
%prep
%autosetup -n %{pypi_name}-%{version}
sed -i '1{/^#!.*env python/d}' pykeepass/pykeepass.py pykeepass/kdbx_parsing/kdbx*.py
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%py3_build
%install
%py3_install
rm -rf %{buildroot}%{$python_sitelib}/tests
%files -n python3-%{pypi_name}
%license LICENSE
%doc README.rst
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%changelog
* Fri Jun 14 2019 Pavlo Rudyi <paulcarroty@fedoraproject.org> - 3.0.3-1
- initial build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.