|
|
|
|
@ -22,13 +22,13 @@
|
|
|
|
|
## |
|
|
|
|
|
|
|
|
|
# package version |
|
|
|
|
%define V_base 3.04 |
|
|
|
|
%define V_base 4.01 |
|
|
|
|
%define V_patchlevel 0 |
|
|
|
|
|
|
|
|
|
# package information |
|
|
|
|
Name: xpdf |
|
|
|
|
Summary: Portable Document Format (PDF) Viewer |
|
|
|
|
URL: http://foolabs.com/xpdf/ |
|
|
|
|
URL: http://www.xpdfreader.com/ |
|
|
|
|
Vendor: FooLabs |
|
|
|
|
Packager: OpenPKG Project |
|
|
|
|
Distribution: OpenPKG Community |
|
|
|
|
@ -36,16 +36,16 @@ Class: EVAL
|
|
|
|
|
Group: Postscript |
|
|
|
|
License: GPL |
|
|
|
|
Version: %{V_base}pl%{V_patchlevel} |
|
|
|
|
Release: 20140719 |
|
|
|
|
Release: 20190219 |
|
|
|
|
|
|
|
|
|
# list of sources |
|
|
|
|
Source0: ftp://ftp.foolabs.com/pub/xpdf/xpdf-%{V_base}.tar.gz |
|
|
|
|
Source0: https://xpdfreader-dl.s3.amazonaws.com/xpdf-%{V_base}.tar.gz |
|
|
|
|
|
|
|
|
|
# build information |
|
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20160101, gcc, gcc::with_cxx = yes |
|
|
|
|
PreReq: OpenPKG, openpkg >= 20160101 |
|
|
|
|
BuildPreReq: freetype >= 2.2, png |
|
|
|
|
PreReq: freetype >= 2.2, png |
|
|
|
|
BuildPreReq: freetype, png |
|
|
|
|
PreReq: freetype, png |
|
|
|
|
|
|
|
|
|
%description |
|
|
|
|
Xpdf is an open source viewer for Portable Document Format (PDF) |
|
|
|
|
@ -56,12 +56,12 @@ PreReq: freetype >= 2.2, png
|
|
|
|
|
%track |
|
|
|
|
prog xpdf = { |
|
|
|
|
version = %{V_base} |
|
|
|
|
url = http://foolabs.com/xpdf/download.html |
|
|
|
|
url = http://www.xpdfreader.com/download.html |
|
|
|
|
regex = xpdf-(__VER__)\.tar\.gz |
|
|
|
|
} |
|
|
|
|
prog xpdf:patchlevel = { |
|
|
|
|
version = %{V_patchlevel} |
|
|
|
|
url = http://foolabs.com/xpdf/download.html |
|
|
|
|
url = http://www.xpdfreader.com/download.html |
|
|
|
|
regex = xpdf-%{V_base}pl(__VER__)\.patch |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -69,29 +69,40 @@ PreReq: freetype >= 2.2, png
|
|
|
|
|
%setup -q -n xpdf-%{V_base} |
|
|
|
|
|
|
|
|
|
%build |
|
|
|
|
CC="%{l_cc}" \ |
|
|
|
|
CXX="%{l_cxx}" \ |
|
|
|
|
CFLAGS="%{l_cflags -O} %{l_cppflags} `%{l_prefix}/bin/freetype-config --cflags`" \ |
|
|
|
|
CXXFLAGS="%{l_cxxflags -O} %{l_cppflags} `%{l_prefix}/bin/freetype-config --cflags`" \ |
|
|
|
|
CPPFLAGS="%{l_cppflags} `%{l_prefix}/bin/freetype-config --cflags`" \ |
|
|
|
|
LDFLAGS="%{l_ldflags}" \ |
|
|
|
|
LIBS="`%{l_prefix}/bin/freetype-config --libs` -lpng -lz -lm" \ |
|
|
|
|
./configure \ |
|
|
|
|
--prefix=%{l_prefix} \ |
|
|
|
|
--mandir=%{l_prefix}/man \ |
|
|
|
|
--sysconfdir=%{l_prefix}/etc/xpdf \ |
|
|
|
|
--without-x \ |
|
|
|
|
--with-freetype2-includes=%{l_prefix}/include \ |
|
|
|
|
--with-freetype2-library=%{l_prefix}/lib \ |
|
|
|
|
--enable-a4-paper |
|
|
|
|
%{l_make} %{l_mflags -O} |
|
|
|
|
mkdir build |
|
|
|
|
cd build |
|
|
|
|
cmake \ |
|
|
|
|
-DCMAKE_BUILD_TYPE="Release" \ |
|
|
|
|
-DCMAKE_INSTALL_PREFIX="%{l_prefix}" \ |
|
|
|
|
-DCMAKE_C_COMPILER="%{l_cc}" \ |
|
|
|
|
-DCMAKE_C_FLAGS="%{l_cflags} %{l_cppflags}" \ |
|
|
|
|
-DCMAKE_EXE_LINKER_FLAGS="%{l_ldflags}" \ |
|
|
|
|
-DCMAKE_CXX_COMPILER="%{l_cxx}" \ |
|
|
|
|
-DCMAKE_CXX_FLAGS="%{l_cxxflags} %{l_cppflags} -Wno-deprecated" \ |
|
|
|
|
-DSYSTEM_XPDFRC="%{l_prefix}/etc/xpdf/xpdfrc" \ |
|
|
|
|
-DA4_PAPER=ON \ |
|
|
|
|
.. |
|
|
|
|
%{l_make} %{l_mflags} |
|
|
|
|
|
|
|
|
|
%install |
|
|
|
|
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
|
|
|
|
%{l_shtool} subst \ |
|
|
|
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin \ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/xpdf \ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/man/man1 \ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/man/man5 |
|
|
|
|
%{l_shtool} install -c -s -m 755 \ |
|
|
|
|
build/xpdf/pdfdetach build/xpdf/pdffonts build/xpdf/pdfimages build/xpdf/pdfinfo \ |
|
|
|
|
build/xpdf/pdftohtml build/xpdf/pdftopng build/xpdf/pdftoppm build/xpdf/pdftops \ |
|
|
|
|
build/xpdf/pdftotext \ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/bin/ |
|
|
|
|
%{l_shtool} install -c -m 755 \ |
|
|
|
|
-e 's;/usr/local/share/ghostscript/fonts;%{l_prefix}/share/ghostscript/fonts;' \ |
|
|
|
|
doc/sample-xpdfrc \ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/xpdf/xpdfrc |
|
|
|
|
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
|
|
|
|
%{l_shtool} install -c -m 644 \ |
|
|
|
|
doc/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ |
|
|
|
|
%{l_shtool} install -c -m 644 \ |
|
|
|
|
doc/*.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/ |
|
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
|
|
|
|
%{l_files_std} \ |
|
|
|
|
'%config %{l_prefix}/etc/xpdf/*' |
|
|
|
|
|