166 lines
4.6 KiB
RPMSpec
166 lines
4.6 KiB
RPMSpec
Name: netpbm
|
|
Version: 10.83.01
|
|
Release: 3
|
|
Summary: A library for handling different graphics file formats
|
|
License: BSD and GPLv2 and IJG and MIT and Public Domain
|
|
URL: http://netpbm.sourceforge.net/
|
|
|
|
Source0: netpbm-%{version}.tar.xz
|
|
|
|
Patch0000: netpbm-security-scripts.patch
|
|
Patch0001: netpbm-security-code.patch
|
|
Patch0002: netpbm-ppmfadeusage.patch
|
|
Patch0003: netpbm-noppmtompeg.patch
|
|
Patch0004: netpbm-CVE-2017-2587.patch
|
|
Patch0005: netpbm-python3.patch
|
|
Patch0006: netpbm-time.patch
|
|
Patch0007: netpbm-gcc4.patch
|
|
Patch0008: netpbm-bmptopnm.patch
|
|
Patch0009: netpbm-CAN-2005-2471.patch
|
|
Patch0010: netpbm-xwdfix.patch
|
|
Patch0011: netpbm-multilib.patch
|
|
Patch0012: netpbm-glibc.patch
|
|
Patch0013: netpbm-docfix.patch
|
|
Patch0014: netpbm-fiasco-overflow.patch
|
|
Patch0015: netpbm-cmuwtopbm.patch
|
|
Patch0016: netpbm-pamtojpeg2k.patch
|
|
Patch0017: netpbm-manfix.patch
|
|
Patch0018: netpbm-manual-pages.patch
|
|
|
|
BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, flex
|
|
BuildRequires: libX11-devel perl-generators python3 libxml2-devel ghostscript-core
|
|
Requires: ghostscript
|
|
Provides: bundled(jbigkit) netpbm-progs = %{version}-%{release}
|
|
Obsoletes: netpbm-progs < %{version}-%{release}
|
|
|
|
%description
|
|
The netpbm package contains a library of functions that support the following features:
|
|
Program for handling various graphic file formats and so on.
|
|
|
|
%package devel
|
|
Summary: Provides development tools for programs
|
|
Requires: netpbm = %{version}-%{release}
|
|
|
|
%description devel
|
|
The netpbm-devel package provides tools for developing programs which will use the netpbm libraries.
|
|
|
|
%package help
|
|
Summary: Help document for the netpbm package
|
|
Requires: netpbm-progs = %{version}-%{release}
|
|
Provides: netpbm-doc = %{version}-%{release}
|
|
Obsoletes: netpbm-doc < %{version}-%{release}
|
|
|
|
%description help
|
|
Help document for the netpbm package.
|
|
|
|
%prep
|
|
%autosetup -n %{name}-%{version} -p1
|
|
|
|
%build
|
|
./configure <<EOF
|
|
|
|
gnu
|
|
regular
|
|
shared
|
|
y
|
|
|
|
n
|
|
libjpeg.so
|
|
default
|
|
libtiff.so
|
|
default
|
|
libz.so
|
|
default
|
|
none
|
|
http://netpbm.sourceforge.net/doc/
|
|
EOF
|
|
|
|
TOP=`pwd`
|
|
|
|
make \
|
|
CC="%{__cc}" LDFLAGS="$RPM_LD_FLAGS -L$TOP/pbm -L$TOP/pgm -L$TOP/pnm -L$TOP/ppm" \
|
|
CFLAGS="$RPM_OPT_FLAGS -fPIC -flax-vector-conversions -fno-strict-aliasing" \
|
|
CFLAGS_CONFIG="$RPM_OPT_FLAGS" LADD="-lm" JPEGINC_DIR=%{_includedir} PNGINC_DIR=%{_includedir} \
|
|
TIFFINC_DIR=%{_includedir} JPEGLIB_DIR=%{_libdir} PNGLIB_DIR=%{_libdir} TIFFLIB_DIR=%{_libdir} \
|
|
LINUXSVGALIB="NONE" X11LIB=%{_libdir}/libX11.so XML2LIBS="NONE"
|
|
|
|
cd userguide
|
|
rm -f ppmtompeg* *.manual-pages *.manfix
|
|
|
|
for i in *.html ; do
|
|
../buildtools/makeman ${i}
|
|
done
|
|
|
|
mkdir -p man/{man1,man3,man5}
|
|
mv *.1 man/man1
|
|
mv *.3 man/man3
|
|
mv *5 man/man5
|
|
|
|
%install
|
|
make package pkgdir=%{buildroot}/usr LINUXSVGALIB="NONE" XML2LIBS="NONE"
|
|
|
|
install -d %{buildroot}%{_libdir}
|
|
if [ "%{_libdir}" != "/usr/lib" ]; then
|
|
mv %{buildroot}/usr/lib/lib* %{buildroot}%{_libdir}
|
|
fi
|
|
|
|
cp -af lib/libnetpbm.a %{buildroot}%{_libdir}/libnetpbm.a
|
|
cp -l %{buildroot}%{_libdir}/libnetpbm.so.?? %{buildroot}%{_libdir}/libnetpbm.so
|
|
|
|
install -d %{buildroot}%{_datadir}
|
|
mv userguide/man %{buildroot}%{_mandir}
|
|
|
|
sed -i 's/\xa0//' %{buildroot}%{_mandir}/man1/pgmminkowski.1
|
|
|
|
for i in hpcdtoppm ppmsvgalib vidtoppm picttoppm directory error extendedopacity \
|
|
pam pbm pgm pnm ppm index libnetpbm_dir liberror ppmtotga; do
|
|
rm -f %{buildroot}%{_mandir}/man1/${i}.1
|
|
done
|
|
|
|
install -d %{buildroot}%{_datadir}/netpbm
|
|
mv %{buildroot}/usr/misc/{*.map,rgb.txt} %{buildroot}%{_datadir}/netpbm/
|
|
|
|
cd %{buildroot}%{_bindir}
|
|
rm -f pgmtopbm pnmcomp
|
|
ln -s pamcomp pnmcomp
|
|
echo -e '#!/bin/sh\npamditherbw $@ | pamtopnm\n' > pgmtopbm
|
|
chmod 0755 pgmtopbm
|
|
cd -
|
|
|
|
%post -p /sbin/ldconfig
|
|
%postun -p /sbin/ldconfig
|
|
|
|
%check
|
|
cd test
|
|
export LD_LIBRARY_PATH=%{buildroot}%{_libdir} PBM_TESTPREFIX=%{buildroot}%{_bindir} PBM_BINPREFIX=%{buildroot}%{_bindir}
|
|
./Execute-Tests && exit 0
|
|
cd -
|
|
|
|
%files
|
|
%doc doc/copyright_summary doc/COPYRIGHT.PATENT README doc/GPL_LICENSE.txt
|
|
%{_libdir}/lib*.so*
|
|
%{_bindir}/*
|
|
%{_datadir}/netpbm/
|
|
%exclude %{_mandir}/man5/extendedopacity.5
|
|
%exclude %{_libdir}/lib*.a
|
|
|
|
%files devel
|
|
%{_includedir}/netpbm/*.h
|
|
%exclude /usr/{README,VERSION,link,misc,man,pkginfo,config_template,pkgconfig_template}
|
|
|
|
%files help
|
|
%doc userguide/* doc/HISTORY
|
|
%{_mandir}/man1/*
|
|
%{_mandir}/man3/*
|
|
%{_mandir}/man5/*
|
|
|
|
%changelog
|
|
* Thu Jan 23 2020 openEuler Buildteam <buildteam@openeuler.org> - 10.83.01-3
|
|
- Type:bugfix
|
|
- Id:NA
|
|
- SUG:NA
|
|
- DESC:delete the jasper
|
|
|
|
* Tue Nov 26 2019 wangzhishun <wangzhishun1@huawei.com> - 10.83.01-2
|
|
- Package init
|