1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
10 groups = System/Libraries
11 url = https://netpbm.sourceforge.net/
12 license = BSD and GPLv2 and IJG and MIT and Public Domain
13 summary = A library for handling different graphics file formats.
16 The netpbm package contains a library of functions which support
17 programs for handling various graphics file formats, including .pbm
18 (portable bitmaps), .pgm (portable graymaps), .pnm (portable anymaps),
19 .ppm (portable pixmaps) and others.
22 source_dl = https://sourceforge.net/projects/netpbm/files/super_stable/%{version}/
23 sources = %{thisapp}.tgz
46 cp -avf config.mk.in config.mk
49 echo 'CFLAGS_SHLIB = -fPIC' >> config.mk
51 # Disable static libs.
52 echo 'STATICLIB_TOO = N' >> config.mk
54 # Link to libtiff, libjpeg, libpng and libz.
55 echo 'TIFFLIB = libtiff.so' >> config.mk
56 echo 'JPEGLIB = libjpeg.so' >> config.mk
57 echo 'PNGLIB = libpng.so' >> config.mk
58 echo 'ZLIB = libz.so' >> config.mk
60 # Define include directorys for the linked libraries.
61 echo 'TIFFHDR_DIR = %{includedir}' >> config.mk
62 echo 'JPEGHDR_DIR = %{includedir}' >> config.mk
63 echo 'PNGHDR_DIR = %{includedir}' >> config.mk
64 echo 'ZHDR_DIR = %{includedir}' >> config.mk
66 # Do not strip the binaries during install.
67 echo 'STRIPFLAG =' >> config.mk
71 make %{PARALLELISMFLAGS} \
72 LDFLAGS="%{LDFLAGS} -L$(pwd)/pbm -L$(pwd)/pgm -L$(pwd)/pnm -L$(pwd)/ppm" \
73 CFLAGS="%{CFLAGS} -flax-vector-conversions -fno-strict-aliasing" \
80 make package pkgdir=%{BUILDROOT}%{prefix} LINUXSVGALIB="NONE" XML2LIBS="NONE"
82 # Ugly hack to have libs in correct dir on 64bit archs.
83 mkdir -p %{BUILDROOT}%{libdir}
84 if [ "%{libdir}" != "/usr/lib" ]; then
85 mv %{BUILDROOT}/usr/lib/lib* %{BUILDROOT}%{libdir}
87 ln -svf libnetpbm.so.11 %{BUILDROOT}%{libdir}/libnetpbm.so
89 rm -rvf %{BUILDROOT}%{prefix}/{README,VERSION,link,misc,man,pkginfo,config_template,pkgconfig_template}
90 rm -rvf %{BUILDROOT}%{bindir}/doc.url
103 package %{name}-devel
107 package %{name}-debuginfo