Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37562406
en ru br
ALT Linux repos
S:1.3.42-alt1
5.0: 1.3.1-alt3
4.1: 1.1.11-alt1
4.0: 1.1.8-alt1
3.0:
+backports:1.1.7-alt5.0.M30

Group :: Graphics
RPM: GraphicsMagick

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

# Allow for selectively disabling from commandline
%{!?quant:%define quant 16}
%{!?perlm:%define perlm 1}
%{!?cplus:%define cplus 1}

Name: GraphicsMagick
Version: 1.1.11
Release: alt1
Summary: An X application for displaying and manipulating images
Summary(ru_RU.KOI8-R): Программа для отображения и редактирования изображений
License: MIT
Group: Graphics
Source: ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/%name-%version.tar.bz2
Source2: %name.desktop
Patch0: %name-libpath.patch

Url: http://www.GraphicsMagick.org/

Requires: bzip2 freetype2 libjpeg libpng zlib ghostscript
Requires: lib%name = %version-%release

BuildPreReq: libltdl-devel chrpath

# Automatically added by buildreq on Fri Jan 19 2007

BuildRequires: bzlib-devel enscript gcc-c++ ghostscript-classic graphviz groff-base imake libjasper-devel libjbig-devel liblcms-devel libSM-devel libtiff-devel libwmf-devel libXext-devel libxml2-devel ncompress netpbm perl-devel wget xorg-cf-files xterm

%description
GraphicsMagick(TM) provides a powerful image manipulation and
translation utility. It is capable of displaying still images and
animations using the X Window system, provides a simple interface for
interactively editing images, and is capable of importing selected
windows or the entire desktop. GraphicsMagick can read and write over
88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, and
Photo CD. It can resize, rotate, sharpen, color reduce, or add special
effects to the image and save the result to any supported format.
GraphicsMagick may be used to create animated or transparent .gifs,
create composite images, create thumbnail images, and much, much,
more.

GraphicsMagick is one of your choices if you need a program to manipulate
and display images. If you want to develop your own applications
which use GraphicsMagick code or APIs, you need to install
GraphicsMagick-devel as well.

%description -l ru_RU.KOI8-R
GraphicsMagick (ТМ) многофункциональная программа для редактирования и
преобразования изображений. С ее помощью возможно просматривать рисунки
и мультипликации, используя систему X Windows. Обеспечивает простой интерфейс
для того, чтобы в интерактивном режиме редактировать изображения, и способна
к захвату отдельных окон или всего рабочего стола. GraphicsMagick может
читать и писать более чем в 88 графических форматов, включая JPEG, TIFF, WMF,
SVG, PNG, PNM, GIF, и Photo CD. С ее помощью можно изменять размеры, вращать,
улучшать, уменьшать глубину цвета, или добавлять специальные эффекты к
изображению и сохранять результат в любом поддерживаемом формате.
GraphicsMagick может использоваться, чтобы создавать движущиеся или прозрачные
.gifs, создавать сложные изображения, размером с ноготок, и очень, очень, больше.

GraphicsMagick первоначально основан на ImageMagick 5.5.2. GraphicsMagick
поддерживает устойчивую ветвь выпуска, детальный ChangeLog,
и "чистый" исходный код с полной историей версий так,
что изменения контролируемы, и изменения между версиями точно описаны.
ImageMagick не предлагает этого. Так как GraphicsMagick "более устойчив",
больше времени было проведено, оптимизируя и отлаживая его код.
GraphicsMagick часто быстрее чем ImageMagick. ImageMagick сосредотачивается
на том, чтобы добавлять новые функциональные возможности и особенности.

%package doc
Summary:  Documentation for %name
Group: Documentation

%description doc
Documentation for %name

%package ImageMagick-compat
Summary: Image processing tools providing ImageMagick interface
Group: Graphics
Requires: %name = %version-%release
Provides: ImageMagick
Conflicts: ImageMagick

%description ImageMagick-compat
GraphicsMagick provides a set of command-line applications to manipulate
image files. It is a fork of the ImageMagick project and therefore offers
a similar set of features, but puts a larger emphasis on stability.

With this package installed, the GraphicsMagick command line tools can
be executed like their ImageMagick counterparts. It allows to migrate
scripts from ImageMagick to GraphicsMagick without any code changes.

%package -n lib%name
Summary: %name shared libraries
Group: System/Libraries

%description -n lib%name
lib%name contains the libraries files you'll need to use GraphicsMagick applications.
GraphicsMagick is an image manipulation program.

%package -n lib%name-devel
Summary: Header files for GraphicsMagick app development
Group: Development/C
Requires: lib%name = %version-%release
Obsoletes: %name-devel

%description -n lib%name-devel
GraphicsMagick-devel contains the header files you'll need to develop
GraphicsMagick applications. GraphicsMagick is an image manipulation program.

If you want to create applications that will use GraphicsMagick code or
APIs, you need to install GraphicsMagick-devel as well as GraphicsMagick.
You do not need to install it if you just want to use GraphicsMagick, however.

%if %perlm
%package -n perl-%name
Summary: Libraries and modules for access to %name from perl
Group: Development/Perl
BuildPreReq: perl >= 5.6.0
Requires: lib%name = %version-%release, perl >= 5.6.0

%description -n perl-%name
Perl bindings to GraphicsMagick.

Install perl-%name if you want to use any perl scripts that use
GraphicsMagick.
%endif

%if %cplus
%package -n lib%name-c++
Summary: GraphicsMagick Magick++ library (C++ bindings)
Group: Development/C++
Requires: lib%name = %version-%release
Obsoletes: %name-c++

%description -n lib%name-c++
This package contains the Magick++ library, a C++ binding to the GraphicsMagick
graphics manipulation library.

Install GraphicsMagick-c++ if you want to use any applications that use
Magick++.

%package -n lib%name-c++-devel
Summary: C++ bindings for the GraphicsMagick library
Group: Development/C++
Requires: lib%name-devel = %version, lib%name-c++ = %version
Requires: bzip2-devel, freetype2-devel
Requires: libjpeg-devel, libpng-devel, libtiff-devel, zlib-devel, libxml2-devel
Obsoletes: %name-c++-devel

%description -n lib%name-c++-devel
GraphicsMagick-devel contains the static libraries and header files you'll
need to develop GraphicsMagick applications using the Magick++ C++ bindings.
GraphicsMagick is an image manipulation program.

If you want to create applications that will use Magick++ code or APIs,
you'll need to install GraphicsMagick-c++-devel, GraphicsMagick-devel and
GraphicsMagick.  You don't need to install it if you just want to use
GraphicsMagick, or if you want to develop/compile applications using the
GraphicsMagick C interface, however.
%endif

%prep
%setup -q
%patch0 -p1

# local doc

%__subst "s|http://www.imagemagick.org/|file://%_docdir/%name-%version/index.html|g" magick/animate.c magick/display.c
# fix font in dialog "Open File"
%__subst "s|iso8859-15|r|g" magick/xwindow.c
%__subst "s|iso8859-1|r|g" magick/xwindow.c

find PerlMagick scripts www -type f -exec perl -pi -e 's=!/usr/local/bin/perl=!/usr/bin/perl=' {} \;

# don't require libtool 1.6

echo -e '\nAC_DEFUN([AC_LIBTOOL_TAGS],[])' >> acinclude.m4

%build
%autoreconf
%configure --enable-shared \
--disable-static \
--with-modules \
       --enable-fast-install \
       --enable-magick-compat \
%if %perlm
--with-perl=%__perl \
       --with-perl-options='PREFIX=%prefix INSTALLDIRS=vendor' \
%else
--without-perl \
%endif
%if %cplus
--with-magick-plus-plus \
%else
--without-magick-plus-plus \
%endif
--with-windows-font-dir=%_datadir/fonts/default/TrueType-ms \
--with-quantum-depth=%quant

%make_build

%install
%__make DESTDIR=%buildroot install

# Fix RPATH

chrpath -r /usr/lib %buildroot%perl_vendor_autolib/Graphics/Magick/Magick.so

# doc stuff

%__rm -Rf docs-%name-%version
%__mkdir docs-%name-%version
%__mv %buildroot%_datadir/%name-%version/* docs-%name-%version/
%__mv  docs-%name-%version/config %buildroot%_datadir/%name-%version/
##%__rm -Rf docs-%name-%version/config
%__rm -Rf docs-%name-%version/web/*.rej

%__install -pD -m644 images/gm-125x80t.png  %buildroot%_miconsdir/%name.png
%__install -pD -m644 images/gm-188x120t.png %buildroot%_niconsdir/%name.png
%__install -pD -m644 images/gm-282x180t.png %buildroot%_liconsdir/%name.png

# menu file

%__install -pD -m644 %SOURCE2 %buildroot%_datadir/applications/%name.desktop

%if %perlm
%__rm -f `find %buildroot%_libdir/perl*/ -name perllocal.pod -type f`
%__rm -f `find %buildroot%_libdir/perl*/ -name .packlist -type f`
%endif

%post
%update_menus

%postun
%clean_menus

%post -n lib%name
%post_ldconfig

%postun -n lib%name
%postun_ldconfig

%post -n lib%name-c++
%post_ldconfig

%postun -n lib%name-c++
%postun_ldconfig

%files
%doc ChangeLog README.txt NEWS
%_bindir/gm
%_datadir/%name-%version/
%_mandir/man1/gm.1.bz2
%_datadir/applications/%name.desktop
%_miconsdir/%name.png
%_niconsdir/%name.png
%_liconsdir/%name.png

%files doc
%doc docs-%name-%version/*

%files ImageMagick-compat
%_bindir/animate
%_bindir/composite
%_bindir/conjure
%_bindir/convert
%_bindir/display
%_bindir/identify
%_bindir/import
%_bindir/mogrify
%_bindir/montage
%_mandir/man4/miff.4.gz
%_mandir/man5/quantize.5.gz

%files -n lib%name
%_libdir/lib%name.so*
%_libdir/lib%{name}Wand.so*
%_libdir/%name-%version/

%files -n lib%name-devel
%dir %_includedir/%name
%_includedir/%name/wand/
%_includedir/%name/magick/
%_libdir/lib%name.so
%_libdir/pkgconfig/%name.pc
%_libdir/pkgconfig/%{name}Wand.pc
%_bindir/%name-config
%_bindir/%{name}Wand-config
%_mandir/man1/%name-config.1.gz
%_mandir/man1/%{name}Wand-config.1.gz

%if %perlm
%files -n perl-%name
%doc PerlMagick/demo
%perl_vendor_archlib/Graphics/
%perl_vendor_archlib/auto/Graphics/
%perl_vendor_man3dir/*gz
%endif

%if %cplus
%files -n lib%name-c++
%_libdir/lib%name++.so*

%files -n lib%name-c++-devel
%_includedir/%name/Magick++.h
%_includedir/%name/Magick++/
%_libdir/lib%name++.so
%_libdir/pkgconfig/%name++.pc
%_bindir/%name++-config
%_mandir/man1/%name++-config.1.gz
%_libdir/lib%name++.so*
%endif

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin