]> git.pld-linux.org Git - packages/python-yubico.git/commitdiff
- initial auto/th/python-yubico-1.3.2-1
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 28 Jan 2017 18:07:27 +0000 (19:07 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 28 Jan 2017 18:07:27 +0000 (19:07 +0100)
python-yubico.spec [new file with mode: 0644]

diff --git a/python-yubico.spec b/python-yubico.spec
new file mode 100644 (file)
index 0000000..044972e
--- /dev/null
@@ -0,0 +1,124 @@
+# Conditional build:
+%bcond_with    doc     # don't build doc
+%bcond_with    tests   # do not perform "make test"
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+#
+%define                module          yubico
+%define                egg_name        python_yubico
+%define                pypi_name       yubico
+Summary:       Python code for talking to Yubico's YubiKeys
+Name:          python-%{pypi_name}
+Version:       1.3.2
+Release:       1
+License:       BSD
+Group:         Libraries/Python
+Source0:       https://github.com/Yubico/python-yubico/archive/%{name}-%{version}.tar.gz
+# Source0-md5: 3012d95a043b1da93486e0b555b95234
+URL:           https://github.com/Yubico/python-yubico
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with python2}
+BuildRequires: python-modules
+BuildRequires: python-setuptools
+%endif
+%if %{with python3}
+BuildRequires: python3-modules
+BuildRequires: python3-setuptools
+%endif
+Requires:      python-modules
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Python code for talking to Yubico's YubiKeys.
+
+%package -n python3-%{module}
+Summary:       Python code for talking to Yubico's YubiKeys
+Group:         Libraries/Python
+Requires:      python3-modules
+
+%description -n python3-%{module}
+Python code for talking to Yubico's YubiKeys.
+
+%package apidocs
+Summary:       %{module} API documentation
+Summary(pl.UTF-8):     Dokumentacja API %{module}
+Group:         Documentation
+
+%description apidocs
+API documentation for %{module}.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API %{module}.
+
+%prep
+%setup -q -n %{name}-%{name}-%{version}
+
+%build
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
+
+%if %{with doc}
+cd docs
+%{__make} -j1 html
+rm -rf _build/html/_sources
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+# in case there are examples provided
+%if %{with python2}
+install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
+cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
+find $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} -type f \
+       | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
+%endif
+%if %{with python3}
+install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
+cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
+find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -type f \
+       | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc NEWS README
+%{py_sitescriptdir}/%{module}
+%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%{_examplesdir}/python-%{module}-%{version}
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc NEWS README
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%{_examplesdir}/python3-%{module}-%{version}
+%endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/*
+%endif
This page took 0.105093 seconds and 4 git commands to generate.