acroread-x86.spec revision 16524
10139N/A#
10139N/A# Copyright (c) 2008 Sun Microsystems Inc.
10139N/A# This file and all modifications and additions to the pristine
10139N/A# package are under the same license as the package itself.
10139N/A#
10139N/A# Owner: dermot
10139N/A#
10139N/AName: acroread
10139N/ALicense: Commercial
17185N/AGroup: Applications/Multimedia
10139N/AProvides: acroread
10139N/AVersion: 9.1.1
10139N/ARelease: 1
18644N/ADistribution: Java Desktop System
17180N/AVendor: Sun Microsystems, Inc.
10139N/ASummary: Acrobat Reader for PDF files
18688N/AURL: http://www.adobe.com/
18688N/ABuildRoot: %{_tmppath}/%{name}-%{version}-build
10139N/ADocdir: %{_defaultdocdir}/doc
10139N/AAutoreqprov: no
19016N/APreReq: firefox
10139N/A
12707N/A
10139N/A
10139N/ASource: http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/%{version}/enu/AdbeRdr%{version}-1_i486solaris_enu.tar.bz2
20857N/ASource1: http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/%{version}/jpn/AdbeRdr%{version}-1_i486solaris_jpn.tar.bz2
10139N/ASource2: http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/%{version}/fra/AdbeRdr%{version}-1_i486solaris_fra.tar.bz2
20857N/ASource3: http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/%{version}/deu/AdbeRdr%{version}-1_i486solaris_deu.tar.bz2
10139N/A
10139N/ASource4: http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/9.1/misc/FontPack910_chs_i386-solaris.tar.bz2
10139N/ASource5: http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/9.1/misc/FontPack910_cht_i386-solaris.tar.bz2
10139N/ASource6: http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/9.1/misc/FontPack910_kor_i386-solaris.tar.bz2
10139N/ASource7: http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/9.1/misc/FontPack910_jpn_i386-solaris.tar.bz2
10139N/A
10139N/ASource8: acroread-combined-langs-x86
10139N/A
10139N/A
10139N/A%define adobe_base_dir %{_libdir}/AdobeReader
10139N/A%define adobe_doc_dir %{adobe_base_dir}/doc/acroread
10139N/A%define plugin_dir %{_libdir}/firefox/plugins
10139N/A%define plugin_link_target ../../AdobeReader/Adobe/Reader9/Browser/intelsolaris/nppdf.so
10139N/A
10139N/A
10139N/A%description
10139N/AAcrobat reader for PDF files
10139N/A
10139N/A
10139N/A%prep
10139N/A%setup -q -c -n %{name}-%{version}
10139N/A
19269N/Amkdir jpn
19586N/Acd jpn
bunzip2 -c %SOURCE1 | tar xf -
cd ..
mkdir fra
cd fra
bunzip2 -c %SOURCE2 | tar xf -
cd ..
mkdir deu
cd deu
bunzip2 -c %SOURCE3 | tar xf -
cd ..
mkdir chs
cd chs
bunzip2 -c %SOURCE4 | tar xf -
cd ..
mkdir cht
cd cht
bunzip2 -c %SOURCE5 | tar xf -
cd ..
mkdir kor
cd kor
bunzip2 -c %SOURCE6 | tar xf -
cd ..
cd jpn
bunzip2 -c %SOURCE7 | tar xf -
cd ..
%install
rm -rf $RPM_BUILD_ROOT
install -d ${RPM_BUILD_ROOT}%{adobe_base_dir}
# From the Asian font packs (chs, cht, kor, jpn), extract one of the LANGCOM.TAR
# files (they are all identical) and each of the other LANG*.TAR files.
# This gives us the localized font and cmap files.
# Files in common with the tarballs for the full Janapese and English releases
# get overwritten by later commands.
cd chs/CHSKIT
cat LANGCOM.TAR | (cd ${RPM_BUILD_ROOT}%{adobe_base_dir}; tar xvf - )
cat LANGCHS.TAR | (cd ${RPM_BUILD_ROOT}%{adobe_base_dir}; tar xvf - )
cd ../..
cd cht/CHTKIT
cat LANGCHT.TAR | (cd ${RPM_BUILD_ROOT}%{adobe_base_dir}; tar xvf - )
cd ../..
cd kor/KORKIT
cat LANGKOR.TAR | (cd ${RPM_BUILD_ROOT}%{adobe_base_dir}; tar xvf - )
cd ../..
cd jpn/JPNKIT
cat LANGJPN.TAR | (cd ${RPM_BUILD_ROOT}%{adobe_base_dir}; tar xvf - )
cd ../..
# From the x86 Solaris releases (enu/jpn/fra/deu), just extract all the files
# (over-writting any common files as we go).
cd jpn/AdobeReader
cat COMMON.TAR | (cd ${RPM_BUILD_ROOT}%{adobe_base_dir}; tar xvf -)
cat ISOLR.TAR | (cd ${RPM_BUILD_ROOT}%{adobe_base_dir}; tar xvf -)
cd ../..
cd fra/AdobeReader
cat COMMON.TAR | (cd ${RPM_BUILD_ROOT}%{adobe_base_dir}; tar xvf -)
cat ISOLR.TAR | (cd ${RPM_BUILD_ROOT}%{adobe_base_dir}; tar xvf -)
cd ../..
cd deu/AdobeReader
cat COMMON.TAR | (cd ${RPM_BUILD_ROOT}%{adobe_base_dir}; tar xvf -)
cat ISOLR.TAR | (cd ${RPM_BUILD_ROOT}%{adobe_base_dir}; tar xvf -)
cd ../..
cd AdobeReader
cat COMMON.TAR | (cd ${RPM_BUILD_ROOT}%{adobe_base_dir}; tar xvf -)
cat ISOLR.TAR | (cd ${RPM_BUILD_ROOT}%{adobe_base_dir}; tar xvf -)
cd ..
# overwrite distributed script with new ver that supports all langs
install --mode=0755 %SOURCE8 ${RPM_BUILD_ROOT}%{adobe_base_dir}/Adobe/Reader9/bin/acroread
cd AdobeReader
install -d ${RPM_BUILD_ROOT}%{adobe_doc_dir}
install --mode=0644 ${RPM_BUILD_ROOT}%{adobe_base_dir}/Adobe/Reader9/Reader/Legal/en_US/License.txt \
${RPM_BUILD_ROOT}%{adobe_doc_dir}
install --mode=0644 ${RPM_BUILD_ROOT}%{adobe_base_dir}/Adobe/Reader9/Reader/help/ENU/ReadMe.htm \
${RPM_BUILD_ROOT}%{adobe_doc_dir}
# make a link to the executable acroread script from /usr/bin
install -d ${RPM_BUILD_ROOT}%{_bindir}
cd ${RPM_BUILD_ROOT}%{_libdir}/AdobeReader/Adobe/Reader9/bin
cd ${RPM_BUILD_ROOT}%{_prefix}/bin
ln -s ../lib/AdobeReader/Adobe/Reader9/bin/acroread .
# Make a link for acroread.1 manpage file
install -d ${RPM_BUILD_ROOT}%{_mandir}/man1
cd ${RPM_BUILD_ROOT}%{_mandir}/man1
gunzip ../../../lib/AdobeReader/Adobe/Reader9/Resource/Shell/acroread.1.gz
ln -s ../../../lib/AdobeReader/Adobe/Reader9/Resource/Shell/acroread.1 .
# Make a link for .xml file
install -d ${RPM_BUILD_ROOT}%{_datadir}/mime/packages
cd ${RPM_BUILD_ROOT}%{_datadir}/mime/packages
ln -s ../../../lib/AdobeReader/Adobe/Reader9/Resource/Support/AdobeReader.xml acroread.xml
# Make a link for the .desktop file
install -d ${RPM_BUILD_ROOT}%{_datadir}/applications
cd ${RPM_BUILD_ROOT}%{_datadir}/applications
ln -s ../../lib/AdobeReader/Adobe/Reader9/Resource/Support/AdobeReader.desktop acroread.desktop
# Make links for the hicolor theme icons
install -d ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor
cd ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor
for f in `cd ../../../lib/AdobeReader/Adobe/Reader9/Resource/Icons/; /bin/ls -d *x*`
do
for p in `cd ../../../lib/AdobeReader/Adobe/Reader9/Resource/Icons/$f/; /bin/ls *.png`
do
install -d ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/$f/apps
ln -s ../../../../../lib/AdobeReader/Adobe/Reader9/Resource/Icons/$f/$p ./$f/apps
if test "x"$p != "xAdobeReader9.png" ; then
install -d ${RPM_BUILD_ROOT}%{_datadir}/icons/hicolor/$f/mimetypes
ln -s ../../../../../lib/AdobeReader/Adobe/Reader9/Resource/Icons/$f/$p ./$f/mimetypes/application-`echo $p | /bin/awk -F'.' '{print $(NF-1)}'`.png
fi
done
done
# Make a link for the Firefox plugin
install --mode=755 -d ${RPM_BUILD_ROOT}%{plugin_dir}
ln -s %{plugin_link_target} ${RPM_BUILD_ROOT}%{plugin_dir}/nppdf.so
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{_bindir}/acroread
%{plugin_dir}/nppdf.so
%{adobe_base_dir}
%changelog
* Sat May 16 2009 - elaine.xiong@sun.com
- security update 9.1.1.
* Wed Apr 08 2009 - elaine.xiong@sun.com
- initial version