michael@54: ## michael@54: ## netpbm.spec -- OpenPKG RPM Package Specification michael@54: ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. michael@54: ## michael@54: ## Permission to use, copy, modify, and distribute this software for michael@54: ## any purpose with or without fee is hereby granted, provided that michael@54: ## the above copyright notice and this permission notice appear in all michael@54: ## copies. michael@54: ## michael@54: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@54: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@54: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@54: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@54: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@54: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@54: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@54: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@54: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@54: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@54: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@54: ## SUCH DAMAGE. michael@54: ## michael@54: michael@54: # package information michael@54: Name: netpbm michael@54: Summary: Graphic Image Conversion Tool michael@54: URL: http://netpbm.sourceforge.net/ michael@54: Vendor: Bryan Henderson et al. michael@54: Packager: OpenPKG Foundation e.V. michael@54: Distribution: OpenPKG Community michael@54: Class: BASE michael@54: Group: Graphics michael@54: License: MIT-style michael@54: Version: 10.26.56 michael@55: Release: 20090106 michael@54: michael@54: # list of sources michael@54: Source0: http://switch.dl.sourceforge.net/sourceforge/netpbm/netpbm-%{version}.tgz michael@54: Patch0: netpbm.patch michael@54: michael@54: # build information michael@54: Prefix: %{l_prefix} michael@54: BuildRoot: %{l_buildroot} michael@54: BuildPreReq: OpenPKG, openpkg >= 20040130, perl, make, gcc, flex, m4 michael@54: PreReq: OpenPKG, openpkg >= 20040130, perl michael@54: BuildPreReq: tiff, jasper, jpeg, png, zlib michael@54: PreReq: tiff, jasper, jpeg, png, zlib michael@54: AutoReq: no michael@54: AutoReqProv: no michael@54: michael@54: %description michael@54: NetPBM is whole bunch of utilities for primitive manipulation of michael@54: graphic images. Wide array of converters from one graphics format michael@54: to another. E.g. from g3 fax format to jpeg. Many basic graphics michael@54: editing tools such as magnifying and cropping. michael@54: michael@54: %track michael@54: prog netpbm = { michael@54: version = %{version} michael@54: url = http://prdownloads.sourceforge.net/netpbm/ michael@54: regex = netpbm-(\d+\.\d+\.\d+)\.tgz michael@54: } michael@54: michael@54: %prep michael@54: %setup -q michael@54: %patch -p0 michael@54: michael@54: %build michael@54: ( cat Makefile.config.in michael@54: echo "" michael@54: echo "DEFAULT_TARGET = nonmerge" michael@54: echo "NETPBMLIBTYPE=unixstatic" michael@54: echo "NETPBMLIBSUFFIX=a" michael@54: echo "STATICLIB_TOO=n" michael@54: echo "CC = %{l_cc}" michael@54: echo "CFLAGS = %{l_cflags -O}" michael@54: echo "LDFLAGS = %{l_ldflags}" michael@54: echo "TIFFHDR_DIR = %{l_prefix}/include/tiff" michael@54: echo "TIFFLIB = libtiff.a" michael@54: echo "TIFFLIB_LDFLAGS = -lz" michael@54: echo "JASPERHDR_DIR = %{l_prefix}/include" michael@54: echo "JASPERLIB = libjasper.a libjpeg.a" michael@54: echo "JPEGHDR_DIR = %{l_prefix}/include" michael@54: echo "JPEGLIB = libjpeg.a" michael@54: echo "PNGHDR_DIR = %{l_prefix}/include" michael@54: echo "PNGLIB = libpng.a" michael@54: echo "ZHDR_DIR = %{l_prefix}/include" michael@54: echo "ZLIB = libz.a" michael@54: case "%{l_platform -t}" in michael@54: *-sunos* ) echo "NETWORKLD = -lsocket -lnsl" ;; michael@54: esac michael@54: ) >Makefile.config michael@54: %{l_make} %{l_mflags} -f GNUmakefile michael@54: michael@54: %install michael@54: rm -rf $RPM_BUILD_ROOT michael@54: %{l_shtool} subst \ michael@54: -e 's;\[ -d $(PKGDIR) \];false;' \ michael@54: -e 's;mkdir;true;' \ michael@54: GNUmakefile michael@54: %{l_shtool} mkdir -f -p -m 755 \ michael@54: $RPM_BUILD_ROOT%{l_prefix} \ michael@54: $RPM_BUILD_ROOT%{l_prefix}/share/netpbm \ michael@54: $RPM_BUILD_ROOT%{l_prefix}/include/netpbm michael@54: %{l_make} %{l_mflags} -f GNUmakefile package pkgdir=$RPM_BUILD_ROOT%{l_prefix} michael@54: %{l_shtool} subst \ michael@54: -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;g' \ michael@54: $RPM_BUILD_ROOT%{l_prefix}/bin/manweb \ michael@54: $RPM_BUILD_ROOT%{l_prefix}/bin/pnmquant \ michael@54: $RPM_BUILD_ROOT%{l_prefix}/bin/ppmfade \ michael@54: $RPM_BUILD_ROOT%{l_prefix}/bin/ppmrainbow \ michael@54: $RPM_BUILD_ROOT%{l_prefix}/bin/ppmshadow michael@54: strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true michael@54: rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/doc.url michael@54: rm -f $RPM_BUILD_ROOT%{l_prefix}/pkginfo michael@54: rm -f $RPM_BUILD_ROOT%{l_prefix}/README michael@54: rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/web michael@54: mv $RPM_BUILD_ROOT%{l_prefix}/include/*.h \ michael@54: $RPM_BUILD_ROOT%{l_prefix}/include/netpbm/ michael@54: mv $RPM_BUILD_ROOT%{l_prefix}/misc/* \ michael@54: $RPM_BUILD_ROOT%{l_prefix}/share/netpbm/ michael@54: rm -rf $RPM_BUILD_ROOT%{l_prefix}/misc michael@54: mv $RPM_BUILD_ROOT%{l_prefix}/link \ michael@54: $RPM_BUILD_ROOT%{l_prefix}/lib michael@54: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} michael@54: michael@54: %files -f files michael@54: michael@54: %clean michael@54: rm -rf $RPM_BUILD_ROOT michael@54: