1 Star 0 Fork 9

lyn/netpbm

forked from src-openEuler/netpbm 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
netpbm.spec 5.24 KB
一键复制 编辑 原始数据 按行查看 历史
lyn 提交于 2023-04-19 19:32 . Update to 11.02.00
Name: netpbm
Version: 11.02.00
Release: 1
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 is prepared by
# svn checkout https://svn.code.sf.net/p/netpbm/code/advanced netpbm-%%{version}
# svn checkout https://svn.code.sf.net/p/netpbm/code/userguide netpbm-%%{version}/userguide
# svn checkout https://svn.code.sf.net/p/netpbm/code/trunk/test netpbm-%%{version}/test
# and removing the .svn directories ( find -name "\.svn" -type d -print0 | xargs -0 rm -rf )
Source0: netpbm-%{version}.tar.xz
Patch0000: netpbm-security-scripts.patch
Patch0001: netpbm-security-code.patch
Patch0002: netpbm-ppmfadeusage.patch
Patch0003: netpbm-CVE-2017-2587.patch
Patch0004: netpbm-python3.patch
Patch0005: netpbm-time.patch
Patch0006: netpbm-gcc4.patch
Patch0007: netpbm-bmptopnm.patch
Patch0008: netpbm-CAN-2005-2471.patch
Patch0009: netpbm-xwdfix.patch
Patch0010: netpbm-multilib.patch
Patch0011: netpbm-glibc.patch
Patch0012: netpbm-docfix.patch
Patch0013: netpbm-cmuwtopbm.patch
Patch0014: netpbm-pamtojpeg2k.patch
Patch0015: netpbm-manfix.patch
Patch0016: netpbm-libdir-so.patch
Patch0017: netpbm-c99.patch
BuildRequires: libjpeg-devel, libpng-devel, libtiff-devel, flex make
BuildRequires: libX11-devel perl-generators python3 libxml2-devel ghostscript-core gcc perl
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 *.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
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
* Wed Apr 19 2023 liyanan <thistleslyn@163.com> - 11.02.00-1
- Update to 11.02.00
* Wed Jan 05 2022 Ge Wang <wangge20@huawei.com> - 10.83.01-5
- Fix building error: Can not locate English.pm
- Add perl in BuildRequires
* Wed Jun 16 2021 zhaoyao <zhaoyao32@huawei.com> - 10.83.01-4
- Fix buiding error: Can't exec "-c": No such file or directory
- Add gcc in BuildRequires
* 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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lyn1001/netpbm.git
git@gitee.com:lyn1001/netpbm.git
lyn1001
netpbm
netpbm
master

搜索帮助