diff options
author | Remi Collet <remi@remirepo.net> | 2017-08-25 08:49:47 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-08-25 08:49:47 +0200 |
commit | 94d789de257b7c7486826df1cac30d2742f328bd (patch) | |
tree | f119c23abb02393dae92561f714c6a1333cceb02 | |
parent | b13b8f78ae70f60a124901aed39e7bcb7fcc2a56 (diff) |
build as ImageMagick on F25 / F26 and obsoletes ImageMagick6
build as ImageMagick6 on F27
-rw-r--r-- | ImageMagick6.spec | 48 |
1 files changed, 37 insertions, 11 deletions
diff --git a/ImageMagick6.spec b/ImageMagick6.spec index ef141a7..2d1c5a3 100644 --- a/ImageMagick6.spec +++ b/ImageMagick6.spec @@ -50,20 +50,22 @@ %global with_gvc 1 -%ifarch x86_64 -%{!?__isa_bits: %global __isa_bits 64} +%global libname ImageMagick + +%if 0%{?fedora} >= 25 +# No need to relocate, F25/26 same name, F27+ use ImageMagick-7 +%global move 0 %else -%{!?__isa_bits: %global __isa_bits 32} +%global move 1 %endif -%global libname ImageMagick -%if 0%{?fedora} > 26 +%if 0%{?fedora} >= 25 && 0%{?fedora} <= 26 Name: %{libname} %else Name: %{libname}6 %endif Version: %{VER}.%{Patchlevel} -Release: 1%{?dist} +Release: 2%{?dist} Summary: An X application for displaying and manipulating images Group: Applications/Multimedia License: ImageMagick @@ -119,6 +121,8 @@ Obsoletes: ImageMagick2-tools < %{version} Conflicts: %{libname} < %{version} Provides: %{libname} = %{version}-%{release} Provides: %{libname}%{?_isa} = %{version}-%{release} +%else +Obsoletes: %{libname}6 <= %{version}-%{release} %endif # Filter private shared @@ -171,6 +175,8 @@ Conflicts: %{libname}-devel < %{version} Provides: %{libname}-devel = %{version}-%{release} Provides: %{libname}-devel%{?_isa} = %{version}-%{release} Obsoletes: ImageMagick-last-devel < %{version} +%else +Obsoletes: %{libname}6-devel <= %{version}-%{release} %endif %description devel @@ -189,6 +195,9 @@ Summary: Commands for ImageMagick Group: Applications/Multimedia Obsoletes: ImageMagick2 < %{version} Obsoletes: ImageMagick-last-libs < %{version} +%if "%{name}" == "%{libname}" +Obsoletes: %{libname}6-libs <= %{version}-%{release} +%endif %description libs Provides the shared libraries and plugins of %{name}. @@ -204,6 +213,9 @@ Summary: DjVu plugin for ImageMagick Group: Applications/Multimedia Requires: %{name}-libs%{?_isa} = %{version}-%{release} Obsoletes: ImageMagick-last-djvu < %{version} +%if "%{name}" == "%{libname}" +Obsoletes: %{libname}6-djvu <= %{version}-%{release} +%endif %description djvu This packages contains a plugin for ImageMagick which makes it possible to @@ -219,6 +231,9 @@ for applications requiring this libraries. Summary: ImageMagick html documentation Group: Documentation Obsoletes: ImageMagick-last-doc < %{version} +%if "%{name}" == "%{libname}" +Obsoletes: %{libname}6-doc <= %{version}-%{release} +%endif %description doc ImageMagick documentation, this package contains usage (for the @@ -240,6 +255,8 @@ Conflicts: %{libname}-perl < %{version} Provides: %{libname}-perl = %{version}-%{release} Provides: %{libname}-perl%{?_isa} = %{version}-%{release} Obsoletes: ImageMagick-last-perl < %{version} +%else +Obsoletes: %{libname}6-perl <= %{version}-%{release} %endif %description perl @@ -254,6 +271,9 @@ Summary: ImageMagick Magick++ library (C++ bindings) Group: System Environment/Libraries Requires: %{name}-libs%{?_isa} = %{version}-%{release} Obsoletes: ImageMagick-last-c++ < %{version} +%if "%{name}" == "%{libname}" +Obsoletes: %{libname}6-c++ <= %{version}-%{release} +%endif %description c++ This package contains the Magick++ library, a C++ binding to the ImageMagick @@ -276,6 +296,8 @@ Conflicts: %{libname}-c++-devel < %{version} Provides: %{libname}-c++-devel = %{version}-%{release} Provides: %{libname}-c++-devel%{?_isa} = %{version}-%{release} Obsoletes: ImageMagick-last-c++-devel < %{version} +%else +Obsoletes: %{libname}6-c++-devel <= %{version}-%{release} %endif %description c++-devel @@ -353,7 +375,7 @@ cp -p Magick++/demo/*.cpp Magick++/demo/*.miff Magick++/examples %endif --with-perl-options="INSTALLDIRS=vendor %{?perl_prefix} CC='%__cc -L$PWD/magick/.libs' LDDLFLAGS='-shared -L$PWD/magick/.libs'" \ --without-dps \ -%if "%{name}" != "%{libname}" +%if %{move} --datadir=%{_datadir}/%{name} \ --sysconfdir=%{_sysconfdir}/%{name} \ %endif @@ -430,10 +452,10 @@ make %{?_smp_mflags} check %pre libs LIB=%{_libdir}/%{libname}-%{VER} -%if "%{name}" != "%{libname}" +%if %{move} ETC=%{_sysconfdir}/%{name} %else -ETC=%{_sysconfdir}/%{name}%{?incsuffixe} +ETC=%{_sysconfdir}/%{libname}%{?incsuffixe} %endif if [ -d $ETC -a ! -d $LIB ]; then cat << EOF @@ -462,7 +484,7 @@ fi %{_libdir}/libMagickCore%{?libsuffixe}.so.5* %{_libdir}/libMagickWand%{?libsuffixe}.so.5* %{_libdir}/%{libname}-%{VER} -%if "%{name}" != "%{libname}" +%if %{move} %dir %{_datadir}/%{name} %{_datadir}/%{name}/%{libname}%{?incsuffixe} %dir %{_sysconfdir}/%{name} @@ -506,7 +528,7 @@ fi %endif %files doc -%if "%{name}" != "%{libname}" +%if %{move} %doc %{_datadir}/%{name}/doc/%{libname}%{?incsuffixe} %else %doc %{_datadir}/doc/%{name}%{?incsuffixe} @@ -535,6 +557,10 @@ fi %changelog +* Fri Aug 25 2017 Remi Collet <remi@remirepo.net> - 6.9.9.9-2 +- build as ImageMagick on F25 / F26 and obsoletes ImageMagick6 +- build as ImageMagick6 on F27 + * Tue Aug 22 2017 Remi Collet <remi@remirepo.net> - 6.9.9.9-1 - update to version 6.9.9 patch level 9 |