- Move away from pkgconfig-style buildrequires to support SLE
- Implement update-alternatives - License update: HPND OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pillow?expand=0&rev=4
This commit is contained in:
parent
aafc86e796
commit
698b0816f7
@ -1,8 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 18 09:07:13 UTC 2013 - speilicke@suse.com
|
||||
|
||||
- Move away from pkgconfig-style buildrequires to support SLE
|
||||
- Implement update-alternatives
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 14 11:38:42 UTC 2013 - cfarrell@suse.com
|
||||
|
||||
- license update: HPND
|
||||
|
||||
- License update: HPND
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 12 10:18:12 UTC 2013 - speilicke@suse.com
|
||||
|
@ -32,12 +32,14 @@ BuildRequires: tk-devel
|
||||
BuildRequires: unzip
|
||||
%if 0%{?suse_version} > 1210
|
||||
BuildRequires: libjpeg8-devel
|
||||
BuildRequires: libwebp-devel
|
||||
%endif
|
||||
BuildRequires: pkgconfig(freetype2)
|
||||
BuildRequires: pkgconfig(lcms)
|
||||
BuildRequires: pkgconfig(libtiff-4)
|
||||
BuildRequires: pkgconfig(libwebp)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
BuildRequires: freetype2-devel
|
||||
BuildRequires: liblcms-devel
|
||||
BuildRequires: libtiff-devel
|
||||
BuildRequires: zlib-devel
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||
@ -78,23 +80,52 @@ CFLAGS="%{optflags}" python setup.py build
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
for p in pilconvert pildriver pilfile pilfont pilprint ; do
|
||||
mv %{buildroot}%{_bindir}/$p.py %{buildroot}%{_bindir}/$p-%{py_ver}
|
||||
ln -s %{_bindir}/$p-%{py_ver} %{buildroot}%{_bindir}/$p
|
||||
done
|
||||
|
||||
%check
|
||||
python setup.py test
|
||||
python selftest.py
|
||||
|
||||
%post
|
||||
update-alternatives \
|
||||
--install %{_bindir}/pilconvert pilconvert %{_bindir}/pilconvert-%{py_ver} 20 \
|
||||
--slave %{_bindir}/pildriver pildriver %{_bindir}/pildriver-%{py_ver} \
|
||||
--slave %{_bindir}/pilfile pilfile %{_bindir}/pilfile-%{py_ver} \
|
||||
--slave %{_bindir}/pilfont pilfont %{_bindir}/pilfont-%{py_ver} \
|
||||
--slave %{_bindir}/pilprint pilprint %{_bindir}/pilprint-%{py_ver}
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
update-alternatives --remove pilconvert %{_bindir}/pilconvert-%{py_ver}
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc CHANGES.rst README.rst
|
||||
%{_bindir}/pilconvert.py
|
||||
%{_bindir}/pildriver.py
|
||||
%{_bindir}/pilfile.py
|
||||
%{_bindir}/pilfont.py
|
||||
%{_bindir}/pilprint.py
|
||||
%ghost %{_bindir}/pilconvert
|
||||
%{_bindir}/pilconvert-%{py_ver}
|
||||
%ghost %{_bindir}/pildriver
|
||||
%{_bindir}/pildriver-%{py_ver}
|
||||
%ghost %{_bindir}/pilfile
|
||||
%{_bindir}/pilfile-%{py_ver}
|
||||
%ghost %{_bindir}/pilfont
|
||||
%{_bindir}/pilfont-%{py_ver}
|
||||
%ghost %{_bindir}/pilprint
|
||||
%{_bindir}/pilprint-%{py_ver}
|
||||
%{python_sitearch}/PIL
|
||||
%{python_sitearch}/Pillow-%{version}-py%{py_ver}.egg-info
|
||||
%exclude %{python_sitearch}/PIL/ImageTk*
|
||||
%exclude %{python_sitearch}/PIL/_imagingtk*
|
||||
%if 0%{?suse_version} > 1210
|
||||
%ghost %{_sysconfdir}/alternatives/pilconvert
|
||||
%ghost %{_sysconfdir}/alternatives/pildriver
|
||||
%ghost %{_sysconfdir}/alternatives/pilfile
|
||||
%ghost %{_sysconfdir}/alternatives/pilfont
|
||||
%ghost %{_sysconfdir}/alternatives/pilprint
|
||||
%endif
|
||||
|
||||
%files tk
|
||||
%defattr(-,root,root,-)
|
||||
|
Loading…
Reference in New Issue
Block a user