%global VERSION @PACKAGE_VERSION@
+%global MAJOR_VERSION @MAGICK_MAJOR_VERSION@
%global Patchlevel @PACKAGE_RELEASE@
Name: @PACKAGE_NAME@
Group: Applications/Multimedia
License: http://www.imagemagick.org/script/license.php
Url: http://www.imagemagick.org/
-Source0: ftp://ftp.imagemagick.org/pub/%{name}/%{name}-%{VERSION}-%{Patchlevel}.tar.xz
+Source0: http://www.imagemagick.org/download/%{name}/%{name}-%{VERSION}-%{Patchlevel}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel
You do not need to install it if you just want to use ImageMagick,
however.
-
-%package doc
-Summary: ImageMagick HTML documentation
-Group: Documentation
-
-
%package djvu
Summary: DjVu plugin for ImageMagick
Group: Applications/Multimedia
save and load DjvU files from ImageMagick and libMagickCore using applications.
+%package doc
+Summary: ImageMagick HTML documentation
+Group: Documentation
+
%description doc
ImageMagick documentation, this package contains usage (for the
commandline tools) and API (for the libraries) documentation in HTML format.
%package perl
Summary: ImageMagick perl bindings
Group: System Environment/Libraries
-Requires: perl-base
Requires: %{name} = %{version}-%{release}
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
--with-lcms \
--with-rsvg \
--with-xml \
- --with-perl-options='INSTALLDIRS=vendor' \
- --without-dps \
- --without-included-ltdl --with-ltdl-include=%{_includedir} \
- --with-ltdl-lib=%{_libdir}
+ --with-perl-options="INSTALLDIRS=vendor %{?perl_prefix} CC='%__cc -L$PWD/magick/.libs' LDDLFLAGS='-shared -L$PWD/magick/.libs'" \
+ --without-dps
# Disable rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%install
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
-make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
-cp -a www/source $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{VERSION}
-rm $RPM_BUILD_ROOT%{_libdir}/*.la
+make install DESTDIR=%{buildroot} INSTALL="install -p"
+cp -a www/source %{buildroot}%{_datadir}/doc/%{name}-%{MAJOR_VERSION}
+rm %{buildroot}%{_libdir}/*.la
# fix weird perl Magick.so permissions
-chmod 755 $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Image/Magick/Magick.so
+chmod 755 %{buildroot}%{perl_vendorarch}/auto/Image/Magick/Magick.so
# perlmagick: fix perl path of demo files
%{__perl} -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)' PerlMagick/demo/*.pl
# perlmagick: cleanup various perl tempfiles from the build which get installed
-find $RPM_BUILD_ROOT -name "*.bs" |xargs rm -f
-find $RPM_BUILD_ROOT -name ".packlist" |xargs rm -f
-find $RPM_BUILD_ROOT -name "perllocal.pod" |xargs rm -f
+find %{buildroot} -name "*.bs" |xargs rm -f
+find %{buildroot} -name ".packlist" |xargs rm -f
+find %{buildroot} -name "perllocal.pod" |xargs rm -f
# perlmagick: build files list
echo "%defattr(-,root,root,-)" > perl-pkg-files
-find $RPM_BUILD_ROOT/%{_libdir}/perl* -type f -print \
- | sed "s@^$RPM_BUILD_ROOT@@g" > perl-pkg-files
-find $RPM_BUILD_ROOT%{perl_vendorarch} -type d -print \
- | sed "s@^$RPM_BUILD_ROOT@%dir @g" \
+find %{buildroot}/%{_libdir}/perl* -type f -print \
+ | sed "s@^%{buildroot}@@g" > perl-pkg-files
+find %{buildroot}%{perl_vendorarch} -type d -print \
+ | sed "s@^%{buildroot}@%dir @g" \
| grep -v '^%dir %{perl_vendorarch}$' \
| grep -v '/auto$' >> perl-pkg-files
if [ -z perl-pkg-files ] ; then
exit -1
fi
-# These don't belong here, we include them in %%doc
-rm $RPM_BUILD_ROOT%{_datadir}/%{name}-%{VERSION}/{ChangeLog,LICENSE,NEWS.txt}
-
-# fix multilib issues
-%ifarch x86_64 s390x ia64 ppc64 alpha sparc64
-%define wordsize 64
-%else
-%define wordsize 32
-%endif
-
-mv $RPM_BUILD_ROOT%{_includedir}/%{name}/magick/magick-config.h \
- $RPM_BUILD_ROOT%{_includedir}/%{name}/magick/magick-config-%{wordsize}.h
-
-cat >$RPM_BUILD_ROOT%{_includedir}/%{name}/magick/magick-config.h <<EOF
-#ifndef IMAGEMAGICK_MULTILIB
-#define IMAGEMAGICK_MULTILIB
-
-#include <bits/wordsize.h>
-
-#if __WORDSIZE == 32
-# include "magick-config-32.h"
-#elif __WORDSIZE == 64
-# include "magick-config-64.h"
-#else
-# error "unexpected value for __WORDSIZE macro"
-#endif
-
-#endif
-EOF
-
%clean
-rm -rf $RPM_BUILD_ROOT
-
+rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun c++ -p /sbin/ldconfig
-
%files
%defattr(-,root,root,-)
%doc QuickStart.txt ChangeLog Platforms.txt
%doc README.txt LICENSE NOTICE AUTHORS.txt NEWS.txt
-%{_libdir}/libMagickCore.so.4*
-%{_libdir}/libMagickWand.so.4*
+%{_libdir}/libMagickCore*so*
+%{_libdir}/libMagickWand*so*
%{_bindir}/[a-z]*
%{_libdir}/%{name}-%{VERSION}
-%{_datadir}/%{name}-%{VERSION}
+%{_datadir}/%{name}-%{MAJOR_VERSION}
%{_mandir}/man[145]/[a-z]*
%{_mandir}/man1/%{name}.*
-%exclude %{_libdir}/%{name}-%{VER}/modules-Q16/coders/djvu.*
+%exclude %{_libdir}/%{name}-%{VERSION}/modules-*/coders/djvu.*
+%{_sysconfdir}/%{name}-%{MAJOR_VERSION}
%files devel
%defattr(-,root,root,-)
%{_bindir}/MagickCore-config
-%{_bindir}/Magick-config
%{_bindir}/MagickWand-config
-%{_bindir}/Wand-config
-%{_libdir}/libMagickCore.so
-%{_libdir}/libMagickWand.so
-%{_libdir}/pkgconfig/MagickCore.pc
-%{_libdir}/pkgconfig/ImageMagick.pc
-%{_libdir}/pkgconfig/MagickWand.pc
-%{_libdir}/pkgconfig/Wand.pc
-%dir %{_includedir}/%{name}
-%{_includedir}/%{name}/magick
-%{_includedir}/%{name}/wand
-%{_mandir}/man1/Magick-config.*
+%{_libdir}/libMagickCore*so*
+%{_libdir}/libMagickWand*so*
+%{_libdir}/pkgconfig/MagickCore*.pc
+%{_libdir}/pkgconfig/ImageMagick*.pc
+%{_libdir}/pkgconfig/MagickWand*.pc
+%dir %{_includedir}/%{name}-%{MAJOR_VERSION}
+%{_includedir}/%{name}-%{MAJOR_VERSION}/MagickCore
+%{_includedir}/%{name}-%{MAJOR_VERSION}/MagickWand
%{_mandir}/man1/MagickCore-config.*
-%{_mandir}/man1/Wand-config.*
%{_mandir}/man1/MagickWand-config.*
%files djvu
%defattr(-,root,root,-)
-%{_libdir}/%{name}-%{VER}/modules-Q16/coders/djvu.*
+%{_libdir}/%{name}-%{version}/modules-Q16/coders/djvu.*
%files doc
%defattr(-,root,root,-)
-%doc %{_datadir}/doc/%{name}-%{VERSION}
+%doc %{_datadir}/doc/%{name}-%{MAJOR_VERSION}
%doc LICENSE
%files c++
%defattr(-,root,root,-)
%doc Magick++/AUTHORS Magick++/ChangeLog Magick++/NEWS Magick++/README
%doc www/Magick++/COPYING
-%{_libdir}/libMagick++.so.4*
+%{_libdir}/libMagick++*so*
%files c++-devel
%defattr(-,root,root,-)
%doc Magick++/examples
%{_bindir}/Magick++-config
-%{_includedir}/%{name}/Magick++
-%{_includedir}/%{name}/Magick++.h
-%{_libdir}/libMagick++.so
-%{_libdir}/pkgconfig/Magick++.pc
-%{_libdir}/pkgconfig/ImageMagick++.pc
+%{_includedir}/%{name}-%{MAJOR_VERSION}/Magick++
+%{_includedir}/%{name}-%{MAJOR_VERSION}/Magick++.h
+%{_libdir}/libMagick++*so*
+%{_libdir}/pkgconfig/Magick++*.pc
+%{_libdir}/pkgconfig/ImageMagick++*.pc
%{_mandir}/man1/Magick++-config.*
%files perl -f perl-pkg-files