--- /dev/null
+###############################################################################
+# IPFire.org - An Open Source Firewall Solution #
+# Copyright (C) - IPFire Development Team <info@ipfire.org> #
+###############################################################################
+
+name = netpbm
+version = 10.61.01
+release = 1
+
+groups = System/Libraries
+url = http://netpbm.sourceforge.net/
+license = BSD and GPLv2 and IJG and MIT and Public Domain
+summary = A library for handling different graphics file formats.
+
+description
+ The netpbm 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.
+end
+
+build
+ requires
+ flex
+ libjpeg-devel
+ libpng-devel
+ libtiff-devel
+ libX11-devel
+ libxml2-devel
+ perl
+ end
+
+ prepare_cmds
+ #sed -i 's/STRIPFLAG = -s/STRIPFLAG =/g' config.mk.in
+ #rm -rf converter/other/jpeg2000/libjasper/
+ #sed -i -e 's/^SUBDIRS = libjasper/SUBDIRS =/' converter/other/jpeg2000/Makefile
+ end
+
+ build
+ yes "" | ./configure
+
+ make \
+ LDFLAGS="-L$(pwd)/pbm -L$(pwd)/pgm -L$(pwd)/pnm -L$(pwd)/ppm" \
+ CFLAGS="%{CFLAGS} -flax-vector-conversions -fno-strict-aliasing" \
+ LADD="-lm" \
+ LINUXSVGALIB="NONE"
+ end
+
+ install
+ make package pkgdir=%{BUILDROOT}%{prefix} LINUXSVGALIB="NONE" XML2LIBS="NONE"
+
+ # Ugly hack to have libs in correct dir on 64bit archs.
+ mkdir -p %{BUILDROOT}%{libdir}
+ if [ "%{libdir}" != "/usr/lib" ]; then
+ mv %{BUILDROOT}/usr/lib/lib* %{BUILDROOT}%{libdir}
+ fi
+ ln -svf libnetpbm.so.11 %{BUILDROOT}%{libdir}/libnetpbm.so
+
+ rm -rvf %{BUILDROOT}%{prefix}/{README,VERSION,link,misc,man,pkginfo,config_template}
+ rm -rvf %{BUILDROOT}%{bindir}/doc.url
+ end
+end
+
+packages
+ package %{name}
+
+ package %{name}-progs
+ files
+ %{bindir}
+ end
+ end
+
+ package %{name}-devel
+ template DEVEL
+ end
+
+ package %{name}-debuginfo
+ template DEBUGINFO
+ end
+end
--- /dev/null
+diff -up netpbm-10.47.12/buildtools/manpage.mk.noppmtompeg netpbm-10.47.12/buildtools/manpage.mk
+--- netpbm-10.47.12/buildtools/manpage.mk.noppmtompeg 2010-04-27 09:54:52.121522491 -0400
++++ netpbm-10.47.12/buildtools/manpage.mk 2010-04-27 09:55:10.337642487 -0400
+@@ -251,7 +251,6 @@ MAN1 = \
+ ppmtolj.1 \
+ ppmtomap.1 \
+ ppmtomitsu.1 \
+- ppmtompeg.1 \
+ ppmtoneo.1 \
+ ppmtopcx.1 \
+ ppmtopgm.1 \
+diff -up netpbm-10.47.12/converter/ppm/Makefile.noppmtompeg netpbm-10.47.12/converter/ppm/Makefile
+--- netpbm-10.47.12/converter/ppm/Makefile.noppmtompeg 2010-04-27 09:55:20.293517254 -0400
++++ netpbm-10.47.12/converter/ppm/Makefile 2010-04-27 09:55:41.534642567 -0400
+@@ -7,7 +7,7 @@ VPATH=.:$(SRCDIR)/$(SUBDIR)
+
+ include $(BUILDDIR)/config.mk
+
+-SUBDIRS = hpcdtoppm ppmtompeg
++SUBDIRS = hpcdtoppm
+
+ PORTBINARIES = 411toppm eyuvtoppm gouldtoppm ilbmtoppm imgtoppm \
+ leaftoppm mtvtoppm neotoppm \
--- /dev/null
+#!/bin/bash
+
+version=${1}
+
+if [ -z "${version}" ]; then
+ echo >&2 "No version!"
+ exit 1
+fi
+
+export_dir="netpbm-${version}"
+rm -rf ${export_dir}
+
+set -x
+
+svn checkout https://netpbm.svn.sourceforge.net/svnroot/netpbm/advanced ${export_dir}
+svn checkout https://netpbm.svn.sourceforge.net/svnroot/netpbm/userguide ${export_dir}/userguide
+svn checkout https://netpbm.svn.sourceforge.net/svnroot/netpbm/trunk/test ${export_dir}/test
+find ${export_dir} -name "\.svn" -type d -print0 | xargs -0 rm -rvf
+
+# removing the ppmtompeg code, due to patents
+rm -rf ${export_dir}/converter/ppm/ppmtompeg/
+
+tar cfz netpbm-${version}.tar.gz ${export_dir}
+rm -rf ${export_dir}
+
+exit 0