netpbm/netpbm.spec

Sat, 24 Mar 2012 21:40:49 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 24 Mar 2012 21:40:49 +0100
changeset 414
fd611cde817f
parent 54
f012bbb2a542
permissions
-rw-r--r--

Introduce many changes to the buildconf and source code including:
(01) clean up, update, and partially update default config files,
(02) seems that Melware is unable to perform release engineering so
update chan_capi to new daily snapshot to solve echo problems,
(03) correct Asterisk inadequate hard coded gmime version check,
(04) force postgresql pthreads linkage to solve build problem,
(05) remove buggy hard coded LibXML configure definitions,
(06) remove local architecture specification to allow GCC
internal logic to determine proper CPU type instead,
(07) remove vendor sound install target causing uncontrolled
downloads and non RPM managed file installation,
(08) solve long outstanding bug in tcptls causing Asterisk
to ignore any intermediate CA certificate signatures,
(09) back out Digium engineering team's bright idea of replacing the
very portable and pervasive POSIX rand(1) with ast_random(), and
then not even implementing it causing all references to fail in
platforms not providing the very new POSIX.1-2008 mkdtemp(3)
function only distributed by BSD and some Linux,
(10) withdraw advanced linker symbol manipulations from SVR5 builds
until either Binutils supports hybrid versioned and anonymous
linker scripts or GCC stops hard coding versioned linker scripts,
(11) correct missing library linkage, some tailored to a specific OS,
(12) remove outdated logic for the no longer distributed gmime-config(1),
(13) remove local gmime buildconf hacks now that Asterisk has corrected
their own build configuration to almost portably support gmime,
(14) solve build problems relating to undetected LibXML paths,
(15) correct erroneous out of tree include definitions,
(16) improve some variable and comment naming,
(17) simplify sound language path hierarchy creation,
and correct australian english installation logic.

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

mercurial