]> git.pld-linux.org Git - packages/acroread.git/blobdiff - acroread.spec
- added seamonkey to browsers
[packages/acroread.git] / acroread.spec
index 2a5f127140a147eff1fe7e6b907fbd497aafed58..bd46481ad9ef619739c5634ae575332e5c0973c6 100644 (file)
@@ -2,49 +2,65 @@
 # Conditional build:
 %bcond_with    license_agreement       # generates package
 #
+%define                base_name       acroread
 Summary:       Acrobat Reader
 Summary(pl):   Acrobat Reader - czytnik plików PDF
 Summary(ru):   ðÒÏÇÒÁÍÍÁ ÄÌÑ ÞÔÅÎÉÑ ÄÏËÕÍÅÎÔÏ× × ÆÏÒÍÁÔÅ PDF ÏÔ Adobe
 Summary(uk):   ðÒÏÇÒÁÍÁ ÄÌÑ ÞÉÔÁÎÎÑ ÄÏËÕÍÅÎԦנՠÆÏÒÍÁÔ¦ PDF ×¦Ä Adobe
-%define                base_name       acroread
 %if %{with license_agreement}
 Name:          %{base_name}
 %else
 Name:          %{base_name}-installer
 %endif
-Version:       5010
-Release:       1%{?with_license_agreement:wla}
+%define        _rel    6
+Version:       7.0.5
+Release:       %{_rel}%{?with_license_agreement:wla}
+Epoch:         1
 License:       distribution restricted (http://www.adobe.com/products/acrobat/distribute.html)
 # in short:
 # - not distributable on public sites (only linking to adobe.com permitted)
 # - distribution on CD requires signing Distribution Agreement (see URL above)
 Group:         X11/Applications/Graphics
 %if %{with license_agreement}
-Source0:       ftp://ftp.adobe.com/pub/adobe/acrobatreader/unix/5.x/linux-%{version}.tar.gz
+Source0:       http://ardownload.adobe.com/pub/adobe/reader/unix/7x/7.0.5/enu/AdobeReader_enu-%{version}-1.i386.tar.gz
+%else
+Source0:       license-installer.sh
 %endif
+# please update @COPYSOURCES@ below if you add more Sources.
 Source1:       %{base_name}.desktop
 Source2:       %{base_name}.png
 URL:           http://www.adobe.com/products/acrobat/
+%if %{with license_agreement}
+BuildRequires: rpmbuild(macros) >= 1.236
+Requires:      openldap-libs >= 2.3
+%else
+Requires:      rpm-build-tools
+%endif
 ExclusiveArch: %{ix86}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                mozdir          %{_libdir}/mozilla/plugins
+%define                _plugindir      %{_libdir}/browser-plugins
+
+# TODO: galeon and skipstone, konqueror, opera.
+# use macro, otherwise extra LF inserted along with the ifarch
+%define        browsers mozilla, mozilla-firefox, seamonkey
 
 %define                platform        intellinux
-%define                tar0            LINUXRDR.TAR
+%define                tar0            ILINXR.TAR
 %define                tar1            COMMON.TAR
 
-%define                _noautostrip    .*w.*\\.api
+%define                _noautostrip    .*\.api
+%define                _noautoreq      '^lib.*\.so$' '^lib.*\(VERSION\)$'
 
 %description
-Adobe(R) Reader(R) is free software that lets you view and print
-PDF files (Portable Document Format) on a variety of hardware and
+Adobe(R) Reader(R) is free software that lets you view and print PDF
+files (Portable Document Format) on a variety of hardware and
 operating system platforms.
 
 %description -l pl
-Adobe(R) Reader(R) jest darmowym oprogramowaniem umo¿liwiaj±cym ogl±danie
-oraz drukowanie plików PDF (Portable Document Format) na ró¿nych platformach
-sprzêtowych oraz ró¿nych systemach operacyjnych.
+Adobe(R) Reader(R) jest darmowym oprogramowaniem umo¿liwiaj±cym
+ogl±danie oraz drukowanie plików PDF (Portable Document Format) na
+ró¿nych platformach sprzêtowych oraz ró¿nych systemach operacyjnych.
 
 %description -l ru
 ðÒÏÇÒÁÍÍÁ ÄÌÑ ÞÔÅÎÉÑ ÄÏËÕÍÅÎÔÏ× × ÆÏÒÍÁÔÅ Portable Document Format
@@ -54,174 +70,150 @@ sprz
 ðÒÏÇÒÁÍÁ ÄÌÑ ÞÉÔÁÎÎÑ ÄÏËÕÍÅÎԦנՠÆÏÒÍÁÔ¦ Portable Document Format
 (PDF), ÚÇÅÎÅÒÏ×ÁÎÉÈ Adobe Acrobat'ÏÍ.
 
-%package -n mozilla-plugin-%{base_name}
-Summary:       Mozilla PDF plugin
-Summary(pl):   Wtyczka PDF do Mozilli
+%package plugin
+Summary:       PDF plugin for Mozilla compatible browsers
+Summary(pl):   Wtyczka PDF dla przegl±darek zgodnych Mozilla
 Group:         X11/Applications
-Prereq:                mozilla-embedded
-Requires:      %{base_name} = %{version}
+Requires:      %{base_name} = %{epoch}:%{version}-%{release}
+Requires:      browser-plugins(%{_target_base_arch})
+Requires:      mozilla-embedded
+Obsoletes:     mozilla-plugin-acroread
 
-%description -n mozilla-plugin-%{base_name}
+%description plugin
 A Mozilla plugin for displaying PDF (Portable Document Format) files.
 
-%description -n mozilla-plugin-%{base_name} -l pl
+%description plugin -l pl
 Wtyczka Mozilli do wy¶wietlania plików PDF (Portable Document Format).
 
 %prep
 %if %{with license_agreement}
 %setup -q -c
-cd installers
+cd AdobeReader
 tar xf %{tar0}
 tar xf %{tar1}
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%if ! %{with license_agreement}
+%if %{without license_agreement}
 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
 
-cat <<EOF >$RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
-#!/bin/sh
-if [ "\$1" = "--with" -a "\$2" = "license_agreement" ]; then
-       TMPDIR=\`rpm --eval "%%{tmpdir}"\`; export TMPDIR
-       SPECDIR=\`rpm --eval "%%{_specdir}"\`; export SPECDIR
-       SRPMDIR=\`rpm --eval "%%{_srcrpmdir}"\`; export SRPMDIR
-       SOURCEDIR=\`rpm --eval "%%{_sourcedir}"\`; export SOURCEDIR
-       BUILDDIR=\`rpm --eval "%%{_builddir}"\`; export BUILDDIR
-       RPMDIR=\`rpm --eval "%%{_rpmdir}"\`; export RPMDIR
-       BACKUP=0
-       mkdir -p \$TMPDIR \$SPECDIR \$SRPMDIR \$RPMDIR \$SRPMDIR \$SOURCEDIR \$BUILDDIR
-       if [ -f \$SPECDIR/%{base_name}.spec ]; then
-               BACKUP=1
-               mv -f \$SPECDIR/%{base_name}.spec \$SPECDIR/%{base_name}.spec.prev
-       fi
-       for i in %{base_name}.desktop %{base_name}.png %{base_name}-locale.patch; do
-               if [ -f \$SOURCEDIR/\$i ]; then
-                       mv -f \$SOURCEDIR/\$i \$SOURCEDIR/\$i.prev
-                       BACKUP=1
-               fi
-       done
-       if echo "\$3" | grep '\.src\.rpm$' >/dev/null; then
-               ( cd \$SRPMDIR
-               if echo "\$3" | grep '://' >/dev/null; then
-                       wget --passive-ftp -t0 "\$3"
-               else
-                       cp -f "\$3" .
-               fi
-               rpm2cpio \`basename "\$3"\` | ( cd \$TMPDIR; cpio -i %{base_name}.spec )
-               for i in %{base_name}.desktop %{base_name}.png %{base_name}-locale.patch; do
-                       rpm2cpio \$i | ( cd \$TMPDIR; cpio -i \$i )
-               done )
-               cp -i \$TMPDIR/%{base_name}.spec \$SPECDIR/%{base_name}.spec \
-                       || exit 1
-               for i in %{base_name}.desktop %{base_name}.png %{base_name}-locale.patch; do
-                       cp -i \$TMPDIR/\$i \$SOURCEDIR/\$i || exit 1
-               done
-       else
-               cp -i "\$3" \$SPECDIR || exit 1
-               for i in %{base_name}.desktop %{base_name}.png %{base_name}-locale.patch; do
-                       cp -i %{_datadir}/%{base_name}/\$i \$SOURCEDIR/\$i || exit 1
-               done
-       fi
-       ( cd \$SPECDIR
-       %{_bindir}/builder -nc -ncs --with license_agreement --opts --target=%{_target_cpu} %{base_name}.spec
-       if [ "\$?" -ne 0 ]; then
-               exit 2
-       fi
-       RPMNAME1=%{base_name}-%{version}-%{release}wla.%{_target_cpu}.rpm
-       RPMNAME2=mozilla-plugin-%{base_name}-%{version}-%{release}wla.%{_target_cpu}.rpm
-       echo "Installing \$RPMNAME1"
-       RPMNAMES=\$RPMDIR/\$RPMNAME1
-       if rpm -q --whatprovides mozilla-embedded >/dev/null 2>&1; then
-               RPMNAMES="\$RPMNAMES \$RPMDIR/\$RPMNAME2"
-               echo "Installing \$RPMNAME2"
-       else
-               echo "Not installing \$RPMNAME2"
-       fi
-       rpm -U \$RPMNAMES || \
-               echo -e "Install manually the file(s):\n   \$RPMNAMES" )
-       if [ "\$BACKUP" -eq 1 ]; then
-               if [ -f \$SPECDIR/%{base_name}.spec.prev ]; then
-                       mv -f \$SPECDIR/%{base_name}.spec.prev \$SPECDIR/%{base_name}.spec
-               fi
-               for i in %{base_name}.desktop %{base_name}.png %{base_name}-locale.patch; do
-                       if [ -f \$SOURCEDIR/\$i.prev ]; then
-                               mv -f \$SOURCEDIR/\$i.prev \$SOURCEDIR/\$i
-                       fi
-               done
-       fi
-else
-       echo "
-License issues made us not to include inherent files into
-this package by default. If you want to create full working
-package please build it with the following command:
-
-\$0 --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
-"
-fi
-EOF
+sed -e '
+       s/@BASE_NAME@/%{base_name}/g
+       s/@TARGET_CPU@/%{_target_cpu}/g
+       s-@VERSION@-%{version}-g
+       s-@RELEASE@-%{release}-g
+       s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
+       s,@DATADIR@,%{_datadir}/%{base_name},g
+       s/@COPYSOURCES@/%{base_name}{.desktop,.png}/g
+' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
 
 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
 install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
 install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
-install %{PATCH0} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
 
 %else
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{base_name},%{mozdir}} \
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{base_name},%{_plugindir}} \
        $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
 
-cd installers
+cd AdobeReader
 cp -a Reader Resource $RPM_BUILD_ROOT%{_libdir}/%{base_name}
 awk -v INSTDIR=%{_libdir}/%{base_name}/Reader \
        '/^install_dir=/ {print "install_dir="INSTDIR; next} \
        {print}' \
-       bin/%{base_name}.sh > $RPM_BUILD_ROOT%{_bindir}/%{base_name}
-install Browsers/intellinux/* $RPM_BUILD_ROOT%{mozdir}
+       bin/%{base_name} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}
+install Browser/%{platform}/* $RPM_BUILD_ROOT%{_plugindir}
 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
 install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
+
+rm -rf $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/Patch
+
+ln -sf /usr/lib/liblber-2.3.so.0 $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/liblber.so
+ln -sf /usr/lib/libldap-2.3.so.0 $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/libldap.so
+ln -sf /usr/share/ssl/ca-bundle.crt $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/Cert/curl-ca-bundle.crt
+
+chmod a-x $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/*.so.*
 %endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if ! %{with license_agreement}
-%pre
-echo "
-License issues made us not to include inherent files into
-this package by default. If you want to create full working
-package please build it with the following command:
+%if %{without license_agreement}
+%post
+%{_bindir}/%{base_name}.install
+
+%else
+
+%triggerin plugin -- mozilla-firefox
+%nsplugin_install -d %{_libdir}/mozilla-firefox/plugins nppdf.so
+
+%triggerun plugin -- mozilla-firefox
+%nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins nppdf.so
+
+%triggerin plugin -- mozilla
+%nsplugin_install -d %{_libdir}/mozilla/plugins nppdf.so
+
+%triggerun plugin -- mozilla
+%nsplugin_uninstall -d %{_libdir}/mozilla/plugins nppdf.so
+
+%triggerin plugin -- seamonkey
+%nsplugin_install -d %{_libdir}/seamonkey/plugins nppdf.so
+
+%triggerun plugin -- seamonkey
+%nsplugin_uninstall -d %{_libdir}/seamonkey/plugins nppdf.so
+
+# % triggerin plugin -- konqueror
+# % nsplugin_install -d %{_libdir}/kde3/plugins/konqueror nppdf.so
+
+# % triggerun plugin -- konqueror
+# % nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror nppdf.so
+
+# % triggerin plugin -- opera
+# % nsplugin_install -d %{_libdir}/opera/plugins nppdf.so
+
+# % triggerun plugin -- opera
+# % nsplugin_uninstall -d %{_libdir}/opera/plugins nppdf.so
+
+# as rpm removes the old obsoleted package files after the triggers
+# above are ran, add another trigger to make the links there.
+%triggerpostun plugin -- mozilla-plugin-acroread
+%nsplugin_install -f -d %{_libdir}/mozilla/plugins nppdf.so
 
-%{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
-"
 %endif
 
 %files
 %defattr(644,root,root,755)
-%if ! %{with license_agreement}
+%if %{without license_agreement}
 %attr(755,root,root) %{_bindir}/%{base_name}.install
 %{_datadir}/%{base_name}
 %else
-%doc installers/{LICREAD.TXT,README}
+%doc AdobeReader/{LICREAD.TXT,ReadMe.htm}
 %attr(755,root,root) %{_bindir}/*
 %dir %{_libdir}/%{base_name}
 %{_libdir}/%{base_name}/Resource
-
 %dir %{_libdir}/%{base_name}/Reader
 %{_libdir}/%{base_name}/Reader/help
-%{_libdir}/%{base_name}/Reader/res
 %{_libdir}/%{base_name}/Reader/AcroVersion
-%{_libdir}/%{base_name}/Reader/*.pdf
+%{_libdir}/%{base_name}/Reader/Cert
+%{_libdir}/%{base_name}/Reader/GlobalPrefs
+%{_libdir}/%{base_name}/Reader/HowTo
+%{_libdir}/%{base_name}/Reader/Legal
+%{_libdir}/%{base_name}/Reader/JavaScripts
+%{_libdir}/%{base_name}/Reader/Messages
+%{_libdir}/%{base_name}/Reader/WebSearch
 %dir %{_libdir}/%{base_name}/Reader/%{platform}
-%{_libdir}/%{base_name}/Reader/%{platform}/app-defaults
-%{_libdir}/%{base_name}/Reader/%{platform}/fonts
-%{_libdir}/%{base_name}/Reader/%{platform}/res
-%attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins
+%dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins
+%attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/SPPlugins
 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/bin
 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/lib
+%attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/*.api
+%{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/AcroForm
+%{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Annotations
+%{_libdir}/%{base_name}/Reader/%{platform}/res
 %{_desktopdir}/acroread.desktop
 %{_pixmapsdir}/*
 
-%files -n mozilla-plugin-%{base_name}
+%files plugin
 %defattr(644,root,root,755)
-%attr(755,root,root) %{mozdir}/*
+%attr(755,root,root) %{_plugindir}/*
 %endif
This page took 0.093294 seconds and 4 git commands to generate.