Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1481985
 поиск   регистрация   авторизация 
 
Группа :: Графика
Пакет: netpbm

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Name: netpbm
Version: 10.20
Release: alt1.M24.1

Summary: Tools for manipulating graphics files in netpbm supported formats
License: GPL
Group: Graphics

Url: http://netpbm.sourceforge.net/
Source0: %name-%version.tar.bz2

Source1: mf50-netpbm_filters
Source2: test-images.tar.bz2

Patch0: %name-10.20-alt-sh-syntax.patch

Patch4: netpbm-10.19-message.patch
Patch5: netpbm-10.22-security2.patch
Patch6: netpbm-10.22-cmapsize.patch
Patch8: netpbm-10.23-security.patch
Patch9: netpbm-10.23-pngtopnm.patch
Patch10: netpbm-10.23-malloc.patch
Patch13: netpbm-10.25-bmpbpp.patch
Patch14: netpbm-10.25-CAN-2005-2471.patch
Patch15: netpbm-10.25-pnmtopng.patch

Requires: lib%name = %version-%release

# Automatically added by buildreq on Thu Mar 25 2004

BuildRequires: flex libjpeg-devel libpng-devel libtiff-devel zlib-devel

%package -n lib%name
Summary: A library for handling different graphics file formats
Group: System/Libraries

%package -n lib%name-devel
Summary: Development tools for programs which will use the netpbm libraries
Group: Development/C
Requires: lib%name = %version-%release

%package -n lib%name-devel-static
Summary: Static netpbm libraries
Group: Development/C
Requires: lib%name-devel = %version-%release

%description
The netpbm package contains programs for handling various graphics file
formats, including .pbm (portable bitmaps), .pgm (portable graymaps),
.pnm (portable anymaps), .ppm (portable pixmaps) and others.

%description -n lib%name
This package contains a library of functions which support programs for
handling various graphics file formats, including .pbm (portable bitmaps),
.pgm (portable graymaps), .pnm (portable anymaps), .ppm (portable pixmaps)
and others.

%description -n lib%name-devel
This package contains the header files and programmer's documentation
for developing programs which can handle the various graphics file
formats supported by the netpbm libraries.

%description -n lib%name-devel-static
This package contains the static libraries for developing statically linked
programs which can handle the various graphics file formats supported by
the netpbm libraries.

%prep
%setup -q -a2
%patch0 -p1

%patch4 -p1 -b .message
#patch5 -p1 -b .security2
%patch6 -p1 -b .cmapsize
#patch8 -p1 -b .security
%patch9 -p1 -b .pngtopnm
#patch10 -p1 -b .malloc
%patch13 -p1 -b .bmpbpp
%patch14 -p1 -b .CAN-2005-2471
%patch15 -p1 -b .pnmtopng

# Rename shhopt.h to pbmshhopt.h to avoid namespace conflicts.

%__mv lib/util/{,pbm}shhopt.h
find -type f \( -name '*.[chl]' -o -iname '*makefile*' \) -print0 |
xargs -r0 %__grep -FZl shhopt.h -- |
xargs -r0 %__subst 's/\<shhopt\.h/pbm&/g' --

%build
%__cat <<__EOF__ >lib/compile.h
#define COMPILE_TIME "$(LC_TIME=C date '+%a %b %d %Y')"
#define COMPILED_BY "%vendor"
__EOF__

%__cp -a Makefile.config{.in,}

# SMP-incompatible build?

%make CC=gcc CFLAGS='%optflags' CFLAGS_SHLIB='%optflags_shared' \
TIFFLIB=libtiff.so JPEGLIB=libjpeg.so PNGLIB=libpng.so ZLIB=libz.so \
#

%install
%__mkdir_p %buildroot
%make_install package pkgdir=%buildroot%_prefix STRIPFLAG= \
TIFFLIB=libtiff.so JPEGLIB=libjpeg.so PNGLIB=libpng.so ZLIB=libz.so \
#
%__mkdir_p %buildroot%_mandir
%__mv %buildroot{%_prefix/man/*,%_mandir}
%__mv %buildroot{%_prefix/misc,%_datadir/%name}
%__mv %buildroot{%_prefix/link/*,%_libdir}

%__mkdir_p %buildroot%_datadir/printconf/{mf_rules,tests}
%__install -p -m644 %SOURCE1 %buildroot%_datadir/printconf/mf_rules/
%__install -p -m644 test-images/* %buildroot%_datadir/printconf/tests/

%define docdir %_docdir/%name-%version
%__mkdir_p %buildroot%docdir
%__mv %buildroot{%_prefix/[A-Z]*,%docdir}
%__cp -a doc/{HISTORY,COPYRIGHT.PATENT,USERDOC,copyright_summary,Netpbm.programming} \
README %buildroot%docdir

%post -n lib%name -p %post_ldconfig
%postun -n lib%name -p %postun_ldconfig

%files -n lib%name
%_libdir/*.so.*
%dir %docdir
%docdir/copyright_summary
%docdir/COPYRIGHT.PATENT
%docdir/HISTORY
%docdir/README

%files -n lib%name-devel
%_libdir/*.so
%_includedir/*.h
%_man3dir/*.*
%dir %docdir
%docdir/Netpbm.programming

%files
%_bindir/*
%_man1dir/*.*
%_man5dir/*.*
%_datadir/%name
%_datadir/printconf
%dir %docdir
%docdir/USERDOC

%if_enabled static
%files -n lib%name-devel-static
%_libdir/*.a
%endif

%changelog

Полный changelog можно просмотреть здесь

 
design & coding: Vladimir Lettiev aka crux © 2004-2005