############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = netpbm version = 10.73.42 release = 3 groups = System/Libraries url = https://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 source_dl = https://sourceforge.net/projects/netpbm/files/super_stable/%{version}/ sources = %{thisapp}.tgz build requires /usr/bin/perl perl(English) perl(Time::gmtime) flex libjpeg-devel libpng-devel libtiff-devel libxml2-devel zlib-devel perl perl(English) end CFLAGS += \ -fno-builtin-exit \ -D__noreturn__= prepare_cmds # Create config file. cp -avf config.mk.in config.mk # Enable fPIC. echo 'CFLAGS_SHLIB = -fPIC' >> config.mk # Disable static libs. echo 'STATICLIB_TOO = N' >> config.mk # Link to libtiff, libjpeg, libpng and libz. echo 'TIFFLIB = libtiff.so' >> config.mk echo 'JPEGLIB = libjpeg.so' >> config.mk echo 'PNGLIB = libpng.so' >> config.mk echo 'ZLIB = libz.so' >> config.mk # Define include directorys for the linked libraries. echo 'TIFFHDR_DIR = %{includedir}' >> config.mk echo 'JPEGHDR_DIR = %{includedir}' >> config.mk echo 'PNGHDR_DIR = %{includedir}' >> config.mk echo 'ZHDR_DIR = %{includedir}' >> config.mk # Do not strip the binaries during install. echo 'STRIPFLAG =' >> config.mk end build make %{PARALLELISMFLAGS} \ LDFLAGS="%{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" \ X11LIB="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,pkgconfig_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