Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37046689
en ru br
Репозитории ALT
S:10.85.04-alt2
5.1: 10.35.32-alt1.M51.1
4.1: 10.35.32-alt1.M41.1
4.0: 10.35.32-alt1.M40.1
3.0: 10.26.4-alt1
www.altlinux.org/Changes

Группа :: Графика
Пакет: netpbm

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

Name: netpbm
Version: 10.26.4
Release: alt1

# for maintainer:

# http_proxy= rpm -bi --enable update_docs ~/RPM/SPECS/netpbm.spec
%def_disable update_docs

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: %name-html-docs-20050306.tar.bz2

Requires: lib%name = %version-%release

# Automatically added by buildreq on Sun Mar 06 2005

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

# for manual pages

BuildRequires: %_bindir/html2pod

%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 -a1

# 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 -p 's/\<shhopt\.h/pbm&/g' --

# relocate /usr/link to %_libdir; NB: x86_64 uses /lib64

%__subst -p 's,(PKGDIR)/lib,(PKGDIR)/%_lib,g' lib/Makefile
%__subst -p 's,(PKGDIR)/link,(PKGDIR)/%_lib,g' lib/Makefile
%__subst -p 's,\.\./lib/lib%name,lib%name,g' lib/Makefile

%build
%__cp -av Makefile.config{.in,}
%__cat <<__EOF__ >lib/compile.h
#define COMPILE_TIME "$(LC_TIME=C date '+%a %b %d %Y')"
#define COMPILED_BY "%vendor"
__EOF__

# use system-wide jbig library

%__rm -fv converter/other/jbig/{jbig.c,jbig_tab.c,jbig.h}

# SMP incompatible

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

%install

# {{{ makerealman script (replacement for buildtools/makepointerman)


%__mkdir_p pod
%__cat <<\__EOF__ >buildtools/makerealman
#!/bin/sh -ex
NAME="$1"; MANDIR="$3"; SECTION="$4"
HTML="netpbm.sourceforge.net/doc/$NAME.html"
%if_enabled update_docs
if ! wget --timestamping --force-directories "http://$HTML"
%else
if [ ! -f "$HTML" ]
%endif
then
echo "warning: HTML doc for $NAME not available" >&2
exit 0
fi
%__perl -ne 's/>GENERAL</>DESCRIPTION</g; #\
s{<a name=[^>]*>(.+?)</a>}{$1}gi; #\
s{<\?makeman\s+\.\S+\s*(.+?)\s*\?>}{<H1>$1</H1>}g; #\
s{<\?makeman\s+(.+?)\s*\?>}{<p>$1</p>}g && s/\\//g; #\
s{<[hH][12][^>]*>([A-Z ]+)</[hH][12]>}{<H1>$1</H1>}g; #\
$in = 1 if /^<[hH][12][^>]*>(NAME|SYNOPSIS)/; #\
last if /^<hr\b|table of contents/i and $in; #\
print "<p>" and next if /<p>This program is part of/i; #\
print if $in;' "$HTML" >"pod/$NAME.html"
%_bindir/html2pod "pod/$NAME.html" >"pod/$NAME.pod"
%_bindir/pod2man --section="$SECTION" --name="$NAME" --center="%name-%version" \
"pod/$NAME.pod" >"$MANDIR/$NAME.$SECTION"
__EOF__

%__cat <<__EOF__ >buildtools/makepointerman
#!%__perl
chdir "$PWD";
exec "buildtools/makerealman" =>  at ARGV;
__EOF__

%__chmod +x buildtools/make{real,pointer}man

# }}}


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

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

%if_enabled update_docs
# our /bin/sh is unable to handle <(...) process substitution
%define _buildshell /bin/bash
DATE=`date +%Y%m%d`
%__tar cf - netpbm.sourceforge.net/doc/*.html | bzip2 > %name-html-docs-$DATE.tar.bz2
diff -u <(%__tar jtfv %SOURCE1 |sort -k6) <(%__tar jtfv %name-html-docs-$DATE.tar.bz2 |sort -k6)
%endif

# manweb sucks

%__rm -fv %buildroot{%_bindir,%_man1dir}/manweb* %buildroot%_bindir/doc.url

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

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

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

%files
%_bindir/*
%_man1dir/*.*
%_man5dir/*.*
%_datadir/%name/
%dir %pkgdocdir
%pkgdocdir/HISTORY

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

%changelog

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

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin