You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
174 lines
6.0 KiB
174 lines
6.0 KiB
## |
|
## acroread.spec -- OpenPKG RPM Package Specification |
|
## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/> |
|
## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/> |
|
## |
|
## Permission to use, copy, modify, and distribute this software for |
|
## any purpose with or without fee is hereby granted, provided that |
|
## the above copyright notice and this permission notice appear in all |
|
## copies. |
|
## |
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
## SUCH DAMAGE. |
|
## |
|
|
|
# package version |
|
%define V_real 5.10 |
|
%define V_comp_lnx 5010 |
|
%define V_comp_sol 5010 |
|
|
|
# package information |
|
Name: acroread |
|
Summary: Acrobat Reader |
|
URL: http://www.adobe.com/products/acrobat/ |
|
Vendor: Adobe |
|
Packager: OpenPKG Foundation e.V. |
|
Distribution: OpenPKG Community |
|
Class: EVAL |
|
Group: Postscript |
|
License: Commercial |
|
Version: %{V_real} |
|
Release: 20061013 |
|
|
|
# list of sources |
|
Source0: ftp://ftp.adobe.com/pub/adobe/acrobatreader/unix/5.x/linux-%{V_comp_lnx}.tar.gz |
|
Source1: ftp://ftp.adobe.com/pub/adobe/acrobatreader/unix/5.x/solaris-%{V_comp_sol}.tar.gz |
|
|
|
# build information |
|
Prefix: %{l_prefix} |
|
BuildRoot: %{l_buildroot} |
|
BuildPreReq: OpenPKG, openpkg >= 20040130 |
|
PreReq: OpenPKG, openpkg >= 20040130, X11 |
|
AutoReq: no |
|
AutoReqProv: no |
|
|
|
%description |
|
This is the freely-available Adobe Acrobat Reader (v5) for the |
|
Adobe Portable Document Format (PDF). |
|
|
|
%track |
|
prog acroread:linux = { |
|
version = %{V_comp_lnx} |
|
url = ftp://ftp.adobe.com/pub/adobe/acrobatreader/unix/5.x/ |
|
regex = linux-(__VER__)\.tar\.gz |
|
} |
|
prog acroread:solaris = { |
|
version = %{V_comp_sol} |
|
url = ftp://ftp.adobe.com/pub/adobe/acrobatreader/unix/5.x/ |
|
regex = solaris-(__VER__)\.tar\.gz |
|
} |
|
|
|
%prep |
|
%setup -q -T -c |
|
|
|
%build |
|
|
|
%install |
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
# create installation hierarchy |
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
$RPM_BUILD_ROOT%{l_prefix}/bin \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/acroread |
|
|
|
# unpack the corresponding binary only |
|
case "%{l_platform -t}" in |
|
i?86-freebsd[456]* ) |
|
tarball="%{SOURCE linux-%{V_comp_lnx}.tar.gz}" |
|
shell="/compat/linux/bin/sh" |
|
if [ ! -f $shell ]; then |
|
( echo "The Linux ABI base system is not installed under /compat/linux/." |
|
echo "Please install the FreeBSD port/package linux_base, first." |
|
) | %{l_rpmtool} msg -b -t error |
|
exit 1 |
|
fi |
|
;; |
|
i?86-linux2* ) |
|
tarball="%{SOURCE linux-%{V_comp_lnx}.tar.gz}" |
|
shell="/bin/sh" |
|
;; |
|
sun4*-sunos5* ) |
|
tarball="%{SOURCE solaris-%{V_comp_sol}.tar.gz}" |
|
shell="/bin/sh" |
|
;; |
|
* ) echo "Platform %{l_platform -t} not supported" | %{l_rpmtool} msg -b |
|
exit 1 |
|
;; |
|
esac |
|
%{l_gzip} -c -d $tarball | %{l_tar} xf - |
|
|
|
# perform the standard installation procedure |
|
( cd installers |
|
%{l_shtool} subst -e 's;Linux);Linux|FreeBSD);' INSTALL |
|
PAGER="cat" |
|
export PAGER |
|
( echo "ACCEPT" |
|
echo "$RPM_BUILD_ROOT%{l_prefix}/libexec/acroread" |
|
) | $shell INSTALL |
|
) || exit $? |
|
|
|
# post-adjust installation tree |
|
mv $RPM_BUILD_ROOT%{l_prefix}/libexec/acroread/bin/acroread \ |
|
$RPM_BUILD_ROOT%{l_prefix}/bin/acroread |
|
rm -rf $RPM_BUILD_ROOT%{l_prefix}/libexec/acroread/bin |
|
%{l_shtool} subst \ |
|
-e "s;$RPM_BUILD_ROOT%{l_prefix}/libexec;%{l_prefix}/libexec;g" \ |
|
$RPM_BUILD_ROOT%{l_prefix}/bin/acroread |
|
case "%{l_platform -t}" in |
|
*-freebsd* ) |
|
%{l_shtool} subst -e 's;#!/bin/sh;#!/compat/linux/bin/sh;' \ |
|
$RPM_BUILD_ROOT%{l_prefix}/bin/acroread |
|
brandelf -t Linux \ |
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/acroread/Reader/intellinux/bin/* |
|
;; |
|
esac |
|
|
|
# determine installation files |
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
|
|
|
%files -f files |
|
|
|
%clean |
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
%post |
|
if [ $1 -eq 1 ]; then |
|
case "%{l_platform -t}" in |
|
*-freebsd*) |
|
if [ ! -f /compat/linux/bin/sh ]; then |
|
( echo "The Linux ABI base system is not installed under /compat/linux/." |
|
echo "Please install the FreeBSD port/package linux_base." |
|
) | %{l_rpmtool} msg -b |
|
fi |
|
( if [ -r /etc/defaults/rc.conf ]; then |
|
. /etc/defaults/rc.conf |
|
fi |
|
if [ -r /etc/rc.conf ]; then |
|
. /etc/rc.conf |
|
fi |
|
case ${linux_enable} in |
|
[Yy][Ee][Ss] ) |
|
;; |
|
* ) |
|
( echo "Acrobat Reader requires the Linux ABI in the kernel." |
|
echo "Run /usr/sbin/linux manually before running TSM" |
|
echo "or add the following line to /etc/rc.conf:" |
|
echo "linux_enable=\"YES\"" |
|
) | %{l_rpmtool} msg -b |
|
;; |
|
esac |
|
) || exit $? |
|
;; |
|
esac |
|
fi |
|
|
|
|