Change-Id: I2bd02ee2ca31e442d1f6bdd36bb345082e114e02
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2131
Reviewed-by: Divya Thaluru <dthaluru@vmware.com>
Tested-by: gerrit-photon <photon-checkins@vmware.com>
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,75 @@ |
| 0 |
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
|
|
| 1 |
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")}
|
|
| 2 |
+ |
|
| 3 |
+Summary: Python PAM module using ctypes, py3/py2 |
|
| 4 |
+Name: python-pam |
|
| 5 |
+Version: 1.8.2 |
|
| 6 |
+Release: 1%{?dist}
|
|
| 7 |
+Url: https://pypi.python.org/pypi/python-pam/ |
|
| 8 |
+License: MIT |
|
| 9 |
+Group: Development/Languages/Python |
|
| 10 |
+Vendor: VMware, Inc. |
|
| 11 |
+Distribution: Photon |
|
| 12 |
+Source0: python-pam-%{version}.tar.gz
|
|
| 13 |
+%define sha1 python-pam=a28881d2c0a86297a0d45d2558c7381621480a76 |
|
| 14 |
+ |
|
| 15 |
+BuildArch: noarch |
|
| 16 |
+ |
|
| 17 |
+BuildRequires: python2 |
|
| 18 |
+BuildRequires: python2-libs |
|
| 19 |
+BuildRequires: python2-devel |
|
| 20 |
+BuildRequires: python-setuptools |
|
| 21 |
+ |
|
| 22 |
+Requires: python2 |
|
| 23 |
+Requires: python2-libs |
|
| 24 |
+ |
|
| 25 |
+%description |
|
| 26 |
+Python PAM module using ctypes, py3/py2. |
|
| 27 |
+ |
|
| 28 |
+%package -n python3-pam |
|
| 29 |
+Summary: python-pam |
|
| 30 |
+BuildRequires: python3 |
|
| 31 |
+BuildRequires: python3-devel |
|
| 32 |
+BuildRequires: python3-libs |
|
| 33 |
+ |
|
| 34 |
+Requires: python3 |
|
| 35 |
+Requires: python3-libs |
|
| 36 |
+ |
|
| 37 |
+%description -n python3-pam |
|
| 38 |
+ |
|
| 39 |
+Python 3 version. |
|
| 40 |
+ |
|
| 41 |
+%prep |
|
| 42 |
+%setup -q -n python-pam-%{version}
|
|
| 43 |
+rm -rf ../p3dir |
|
| 44 |
+cp -a . ../p3dir |
|
| 45 |
+ |
|
| 46 |
+%build |
|
| 47 |
+python2 setup.py build |
|
| 48 |
+pushd ../p3dir |
|
| 49 |
+python3 setup.py build |
|
| 50 |
+popd |
|
| 51 |
+ |
|
| 52 |
+%install |
|
| 53 |
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
| 54 |
+pushd ../p3dir |
|
| 55 |
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
| 56 |
+popd |
|
| 57 |
+ |
|
| 58 |
+%check |
|
| 59 |
+python2 setup.py test |
|
| 60 |
+pushd ../p3dir |
|
| 61 |
+python3 setup.py test |
|
| 62 |
+popd |
|
| 63 |
+ |
|
| 64 |
+%files |
|
| 65 |
+%defattr(-,root,root) |
|
| 66 |
+%{python2_sitelib}/*
|
|
| 67 |
+ |
|
| 68 |
+%files -n python3-pam |
|
| 69 |
+%defattr(-,root,root,-) |
|
| 70 |
+%{python3_sitelib}/*
|
|
| 71 |
+ |
|
| 72 |
+%changelog |
|
| 73 |
+* Thu Mar 09 2017 Xiaolin Li <xiaolinl@vmware.com> 1.8.2-1 |
|
| 74 |
+- Initial packaging for Photon |