PyPAM/PyPAM.spec
2020-02-20 15:14:24 +08:00

63 lines
1.6 KiB
RPMSpec

Name: PyPAM
Version: 0.5.0
Release: 1
Summary: PAM bindings for Python
License: LGPLv2
Url: http://www.pangalactic.org/PyPAM
Source0: http://www.pangalactic.org/PyPAM/%{name}-%{version}.tar.gz
Patch0001: PyPAM-dlopen.patch
Patch0002: PyPAM-0.5.0-dealloc.patch
Patch0003: PyPAM-0.5.0-nofree.patch
Patch0004: PyPAM-0.5.0-memory-errors.patch
Patch0005: PyPAM-0.5.0-return-value.patch
Patch0006: PyPAM-python3-support.patch
BuildRequires: python3-devel pam-devel gcc
%filter_provides_in %{python3_sitearch}/PAM*.so$
%filter_setup
%global _description\
PAM (Pluggable Authentication Module) bindings for Python.
%description %_description
%package -n python3-PyPAM
Summary: PAM bindings for Python 3
BuildRequires: python3-devel
%description -n python3-PyPAM
PAM (Pluggable Authentication Module) bindings for Python 3.
%package_help
%prep
%autosetup -n PyPAM-%{version} -p1
rm -rf build dist
%build
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %{__python3} setup.py build
%install
%{__python3} setup.py install --root=$RPM_BUILD_ROOT
chmod 644 examples/pamtest.py
rm -f examples/pamexample
%check
PYTHONPATH=build/lib.linux-`uname -m`-%{python3_version}/ %{__python3} tests/PamTest.py
%files -n python3-PyPAM
%defattr(-,root,root,-)
%doc AUTHORS
%license COPYING
%{python3_sitearch}/PAM*.so
%{python3_sitearch}/*.egg-info
%files help
%defattr(-,root,root)
%doc NEWS README ChangeLog INSTALL examples
%changelog
* Fri Feb 14 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.5.0-1
- Package init