base-specs/acroread.spec
author laca
Wed, 28 Feb 2007 18:57:18 +0000
changeset 9397 b16e349d18c5
child 9742 9249f7fb9d26
permissions -rw-r--r--
the easy part of the reorg (most files moved around)

#
# Copyright (c) 2005 Sun Microsystems Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Owner: dermot
#
Name:         acroread
License:      Commercial
Group:        Applications/Multimedia
Provides:     acroread
Version:      7.0.9
Release:      1
Distribution: Java Desktop System
Vendor:	      Sun Microsystems, Inc.
Summary:      Acrobat Reader for PDF files
URL:          http://www.adobe.com/
BuildRoot:    %{_tmppath}/%{name}-%{version}-build
Docdir:       %{_defaultdocdir}/doc
Autoreqprov:  no
PreReq:       firefox

%ifos solaris
Source:       http://ardownload.adobe.com/pub/adobe/reader/unix/7x/7.0.9/enu/AdbeRdr709_solaris_enu.tar.gz
Source1:      http://ardownload.adobe.com/pub/adobe/reader/unix/7x/7.0.5/chs/AdobeReader_chs-7.0.5-1.i386.tar.gz
Source2:      http://ardownload.adobe.com/pub/adobe/reader/unix/7x/7.0.5/cht/AdobeReader_cht-7.0.5-1.i386.tar.gz
Source3:      http://ardownload.adobe.com/pub/adobe/reader/unix/7x/7.0.5/jpn/AdobeReader_jpn-7.0.5-1.i386.tar.gz
Source4:      http://ardownload.adobe.com/pub/adobe/reader/unix/7x/7.0.5/kor/AdobeReader_kor-7.0.5-1.i386.tar.gz
Source5:      l10n-configure.sh
Source6:      acroread-combined-langs
%define acro_dir AdobeReader
%define base_install_dir %{_libdir}/%{acro_dir}
%define acrobin_dir %{_bindir}
%define desktop_apps_dir %{_datadir}/applications
%define hicolor_theme_dir %{_datadir}/icons/hicolor
%define plugin_dir %{_libdir}/firefox/plugins
%define acrodoc_dir %{base_install_dir}/doc/%{name}
%define platform_acro_file SSOLR.TAR
%define platform_browser_dir sparcsolaris
%define plugin_link_target ../../%{acro_dir}/Browser/%{platform_browser_dir}/nppdf.so
%else
Source:       http://ardownload.adobe.com/pub/adobe/reader/unix/7x/7.0.8/enu/AdobeReader_enu-7.0.8-1.i386.tar.gz
Source1:      http://ardownload.adobe.com/pub/adobe/reader/unix/7x/7.0.5/chs/AdobeReader_chs-7.0.5-1.i386.tar.gz
Source2:      http://ardownload.adobe.com/pub/adobe/reader/unix/7x/7.0.5/cht/AdobeReader_cht-7.0.5-1.i386.tar.gz
Source3:      http://ardownload.adobe.com/pub/adobe/reader/unix/7x/7.0.5/jpn/AdobeReader_jpn-7.0.5-1.i386.tar.gz
Source4:      http://ardownload.adobe.com/pub/adobe/reader/unix/7x/7.0.5/kor/AdobeReader_kor-7.0.5-1.i386.tar.gz
Source5:      l10n-configure.sh
Source6:      acroread-combined-langs
%define acro_dir AdobeReader
%define base_install_dir %{_prefix}/X11R6/lib/%{acro_dir}
%define acrobin_dir %{_prefix}/X11R6/bin
%define plugin_dir %{_libdir}/firefox/plugins
%define acrodoc_dir %{_defaultdocdir}/%{name}
%define platform_acro_file ILINXR.TAR
%define platform_browser_dir intellinux
%define plugin_link_target %{base_install_dir}/Browser/%{platform_browser_dir}/nppdf.so
%endif


%description
Acrobat reader for PDF files


%prep
%setup -q -c -n %{name}-%{version}

mkdir chs
cd chs
gunzip -c %SOURCE1 | tar xf -
cd ..

mkdir cht
cd cht
gunzip -c %SOURCE2 | tar xf -
cd ..

mkdir jpn
cd jpn
gunzip -c %SOURCE3 | tar xf -
cd ..

mkdir kor
cd kor
gunzip -c %SOURCE4 | tar xf -
cd ..

bash -x %SOURCE5


%install
rm -rf $RPM_BUILD_ROOT
install -d ${RPM_BUILD_ROOT}%{base_install_dir}

# Extract Asian font software
cd chs/AdobeReader
cat COMMON.TAR | (cd ${RPM_BUILD_ROOT}%{base_install_dir}; tar xvf -)
cd ../..
cd cht/AdobeReader
cat COMMON.TAR | (cd ${RPM_BUILD_ROOT}%{base_install_dir}; tar xvf -)
cd ../..
cd jpn/AdobeReader
cat COMMON.TAR | (cd ${RPM_BUILD_ROOT}%{base_install_dir}; tar xvf -)
cd ../..
cd kor/AdobeReader
cat COMMON.TAR | (cd ${RPM_BUILD_ROOT}%{base_install_dir}; tar xvf -)
cd ../..
cd AdobeReader
cat COMMON.TAR | (cd ${RPM_BUILD_ROOT}%{base_install_dir}; tar xvf -)
cat %{platform_acro_file} | (cd ${RPM_BUILD_ROOT}%{base_install_dir}; tar xvf -)
cd ..
# overwrite distributed script with new ver that supports all langs
install --mode=0755 %SOURCE6 ${RPM_BUILD_ROOT}%{base_install_dir}/bin/acroread

cd AdobeReader
install -d ${RPM_BUILD_ROOT}%{acrodoc_dir}
install --mode=0644 LICREAD.TXT ${RPM_BUILD_ROOT}%{acrodoc_dir}
install --mode=0644 ReadMe.htm ${RPM_BUILD_ROOT}%{acrodoc_dir}

# make a link to the executable acroread script from a $PATH directory (/usr/bin or /usr/X11R6/bin)
install -d ${RPM_BUILD_ROOT}%{acrobin_dir}
cd ${RPM_BUILD_ROOT}%{_libdir}/AdobeReader/bin
cd ${RPM_BUILD_ROOT}%{_prefix}/bin
ln -s ../lib/AdobeReader/bin/acroread .
%ifos solaris
# Make link in /usr/sfw/bin for backward compatability with prev acroread ver.
install -d ${RPM_BUILD_ROOT}%{_prefix}/sfw/bin
cd ${RPM_BUILD_ROOT}%{_prefix}/sfw/bin
ln -s ../../lib/AdobeReader/bin/acroread .
install -d ${RPM_BUILD_ROOT}%{desktop_apps_dir}
cd ${RPM_BUILD_ROOT}%{desktop_apps_dir}
ln -s ../../lib/AdobeReader/Resource/Support/AdobeReader_GNOME.desktop acroread.desktop
install -d ${RPM_BUILD_ROOT}%{hicolor_theme_dir}
cd ${RPM_BUILD_ROOT}%{hicolor_theme_dir}
for f in `cd  ../../../lib/AdobeReader/Resource/Icons/; /bin/ls -d *x*`
do 
  install -d ${RPM_BUILD_ROOT}%{hicolor_theme_dir}/$f/apps
  ln -s ../../../../../lib/AdobeReader/Resource/Icons/$f/AdobeReader.png ./$f/apps
done
%endif

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)
%{base_install_dir}
%{acrobin_dir}/acroread
%{plugin_dir}/nppdf.so
%{acrodoc_dir}

%changelog
* Tue Feb 20 2007 - [email protected]
- Up-revved to 7.0.9 due to Adobe security alert
* Fri Nov 24 2006 - [email protected]
- Create link for the .desktop file and the icon for it.
* Tue Jul 04 2006 - [email protected]
- Up-revved to 7.0.8 and overwrite provided acroread script with version
  that supports the Asian LANGs
* Wed May 10 2006 - [email protected]
- change the plugin dir to /usr/lib/firefox/plugins since firefox move
  from /usr/sfw/lib to /usr/lib
* Wed Nov 02 2005 - [email protected]
- Copy in v7 changes from JDS3.1 branch.
* Thu Oct 20 2005 - [email protected]
- Change mozilla references to firefox.
* Mon Oct 10 2005 - [email protected]
- Add symlink in /usr/sfw/bin for backward compatability. Fixes 6300634.
* Thu Aug 25 2005 - [email protected]
- move to version 7.0.1 - need to re-write prep and install sections
* Mon Dec 20 2004 - [email protected]
- bump to 5.0.10
  directory structure of tarballs changed slightly
* Fri Nov 26 2004 - [email protected]
- Removed jds-integration dependency
* Fri Nov 12 2004 - [email protected]
- add jds-integration dependency
* Wed Nov 10 2004 - [email protected]
- Fix for 5089858 - add Asian font packages.
* Tue Oct 05 2004 - [email protected]
- CR 6174047 : moved acroread to install to /usr/sfw
  Bug 5110289 : changed plugin link to be relative for solaris
* Mon Aug 16 2004 - [email protected]
- parameterize platform_browser_dir
* Fri Aug 06 2004 - [email protected]
- initial version