## ## acroread.spec -- OpenPKG RPM Specification ## Copyright (c) 2000-2003 The OpenPKG Project ## Copyright (c) 2000-2003 Ralf S. Engelschall ## Copyright (c) 2000-2003 Cable & Wireless ## ## 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.08 %define V_comp 508 # package information Name: acroread Summary: Acrobat Reader URL: http://www.adobe.com/products/acrobat/ Vendor: Adobe Packager: The OpenPKG Project Distribution: OpenPKG [EVAL] Group: Graphics License: Commercial Version: %{V_real} Release: 20031019 # list of sources Source0: ftp://ftp.adobe.com/pub/adobe/acrobatreader/unix/5.x/linux-%{V_comp}.tar.gz Source1: ftp://ftp.adobe.com/pub/adobe/acrobatreader/unix/5.x/sol-%{V_comp}.tar.gz # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20030909 PreReq: OpenPKG, openpkg >= 20030909, X11 AutoReq: no AutoReqProv: no %description This is the freely-available Adobe Acrobat Reader (v5) for the Adobe Portable Document Format (PDF). %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[45]* ) tarball="%{SOURCE linux-%{V_comp}.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}.tar.gz}" shell="/bin/sh" ;; sun4*-sunos5* ) tarball="%{SOURCE sol-%{V_comp}.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 %{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 # 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 # FIXME mlelstv # -- this DLL contains a buffer overflow in acroread-5.07 # http://www.securityfocus.org/archive/1/328649/2003-07-08/2003-07-14/0 rm -f %RPM_BUILD_ROOT%{l_prefix}/libexec/acroread/Reader/intellinux/plug_ins/wwwlink.api # 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