netpbm/netpbm.spec

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
parent 54
f012bbb2a542
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

     1 ##
     2 ##  netpbm.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
     4 ##
     5 ##  Permission to use, copy, modify, and distribute this software for
     6 ##  any purpose with or without fee is hereby granted, provided that
     7 ##  the above copyright notice and this permission notice appear in all
     8 ##  copies.
     9 ##
    10 ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    11 ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    12 ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    13 ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    14 ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    15 ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    16 ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    17 ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    18 ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    19 ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    20 ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    21 ##  SUCH DAMAGE.
    22 ##
    24 #   package information
    25 Name:         netpbm
    26 Summary:      Graphic Image Conversion Tool
    27 URL:          http://netpbm.sourceforge.net/
    28 Vendor:       Bryan Henderson et al.
    29 Packager:     OpenPKG Foundation e.V.
    30 Distribution: OpenPKG Community
    31 Class:        BASE
    32 Group:        Graphics
    33 License:      MIT-style
    34 Version:      10.26.56
    35 Release:      20090106
    37 #   list of sources
    38 Source0:      http://switch.dl.sourceforge.net/sourceforge/netpbm/netpbm-%{version}.tgz
    39 Patch0:       netpbm.patch
    41 #   build information
    42 Prefix:       %{l_prefix}
    43 BuildRoot:    %{l_buildroot}
    44 BuildPreReq:  OpenPKG, openpkg >= 20040130, perl, make, gcc, flex, m4
    45 PreReq:       OpenPKG, openpkg >= 20040130, perl
    46 BuildPreReq:  tiff, jasper, jpeg, png, zlib
    47 PreReq:       tiff, jasper, jpeg, png, zlib
    48 AutoReq:      no
    49 AutoReqProv:  no
    51 %description
    52     NetPBM is whole bunch of utilities for primitive manipulation of
    53     graphic images. Wide array of converters from one graphics format
    54     to another. E.g. from g3 fax format to jpeg. Many basic graphics
    55     editing tools such as magnifying and cropping.
    57 %track
    58     prog netpbm = {
    59         version   = %{version}
    60         url       = http://prdownloads.sourceforge.net/netpbm/
    61         regex     = netpbm-(\d+\.\d+\.\d+)\.tgz
    62     }
    64 %prep
    65     %setup -q
    66     %patch -p0
    68 %build
    69     ( cat Makefile.config.in
    70       echo ""
    71       echo "DEFAULT_TARGET = nonmerge"
    72       echo "NETPBMLIBTYPE=unixstatic"
    73       echo "NETPBMLIBSUFFIX=a"
    74       echo "STATICLIB_TOO=n"
    75       echo "CC = %{l_cc}"
    76       echo "CFLAGS = %{l_cflags -O}"
    77       echo "LDFLAGS = %{l_ldflags}"
    78       echo "TIFFHDR_DIR = %{l_prefix}/include/tiff"
    79       echo "TIFFLIB = libtiff.a"
    80       echo "TIFFLIB_LDFLAGS = -lz"
    81       echo "JASPERHDR_DIR = %{l_prefix}/include"
    82       echo "JASPERLIB = libjasper.a libjpeg.a"
    83       echo "JPEGHDR_DIR = %{l_prefix}/include"
    84       echo "JPEGLIB = libjpeg.a"
    85       echo "PNGHDR_DIR = %{l_prefix}/include"
    86       echo "PNGLIB = libpng.a"
    87       echo "ZHDR_DIR = %{l_prefix}/include"
    88       echo "ZLIB = libz.a"
    89       case "%{l_platform -t}" in
    90           *-sunos* ) echo "NETWORKLD = -lsocket -lnsl" ;;
    91       esac
    92     ) >Makefile.config
    93     %{l_make} %{l_mflags} -f GNUmakefile
    95 %install
    96     rm -rf $RPM_BUILD_ROOT
    97     %{l_shtool} subst \
    98         -e 's;\[ -d $(PKGDIR) \];false;' \
    99         -e 's;mkdir;true;' \
   100         GNUmakefile
   101     %{l_shtool} mkdir -f -p -m 755 \
   102         $RPM_BUILD_ROOT%{l_prefix} \
   103         $RPM_BUILD_ROOT%{l_prefix}/share/netpbm \
   104         $RPM_BUILD_ROOT%{l_prefix}/include/netpbm
   105     %{l_make} %{l_mflags} -f GNUmakefile package pkgdir=$RPM_BUILD_ROOT%{l_prefix}
   106     %{l_shtool} subst \
   107         -e 's;/usr/bin/perl;%{l_prefix}/bin/perl;g' \
   108         $RPM_BUILD_ROOT%{l_prefix}/bin/manweb \
   109         $RPM_BUILD_ROOT%{l_prefix}/bin/pnmquant \
   110         $RPM_BUILD_ROOT%{l_prefix}/bin/ppmfade \
   111         $RPM_BUILD_ROOT%{l_prefix}/bin/ppmrainbow \
   112         $RPM_BUILD_ROOT%{l_prefix}/bin/ppmshadow
   113     strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   114     rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/doc.url
   115     rm -f $RPM_BUILD_ROOT%{l_prefix}/pkginfo
   116     rm -f $RPM_BUILD_ROOT%{l_prefix}/README
   117     rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/web
   118     mv $RPM_BUILD_ROOT%{l_prefix}/include/*.h \
   119        $RPM_BUILD_ROOT%{l_prefix}/include/netpbm/
   120     mv $RPM_BUILD_ROOT%{l_prefix}/misc/* \
   121        $RPM_BUILD_ROOT%{l_prefix}/share/netpbm/
   122     rm -rf $RPM_BUILD_ROOT%{l_prefix}/misc
   123     mv $RPM_BUILD_ROOT%{l_prefix}/link \
   124        $RPM_BUILD_ROOT%{l_prefix}/lib
   125     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
   127 %files -f files
   129 %clean
   130     rm -rf $RPM_BUILD_ROOT

mercurial