Magellan Linux

Contents of /trunk/nonfree/acrobat-reader/acrobat-reader-9.4.2-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8923 - (show annotations) (download)
Mon Aug 22 14:39:26 2011 UTC (12 years, 9 months ago) by niro
File size: 3902 byte(s)
-fixed desktop-file installation
1 # $Id$
2
3 PNAME="acrobat-reader"
4 PVER="9.4.2"
5 PBUILD="r1"
6
7 PCATEGORIE="app-text"
8 STATE="unstable"
9
10 DESCRIPTION="Adobe Acrobat Reader, the famous PDF reader."
11 HOMEPAGE="http://www.adobe.com/products/acrobat/readermain.html"
12
13 # x86_64 specific dependencies
14 SDEPENDS_x86_64=">= net-www/nspluginwrapper-0.9"
15 SPECIAL_VARS="SDEPENDS_x86_64"
16
17 DEPEND=">= x11-libs/gtk2+-2.12
18 \$(eval echo \\\$SDEPENDS_\${ARCH/i*86/x86} | tr ';' '\n')"
19
20 SDEPEND=">= dev-util/desktop-file-utils-0.10
21 >= sys-apps/sed-4"
22
23 SRCFILE="AdbeRdr${PVER}-1_i486linux_enu.tar.bz2"
24 SRCDIR="${BUILDDIR}/AdobeReader"
25
26 sminclude mtools
27
28 SRC_URI=(
29 http://ardownload.adobe.com/pub/adobe/reader/unix/${PVER:0:2}x/${PVER}/enu/${SRCFILE}
30 ftp://ftp.adobe.com/pub/adobe/reader/
31 mirror://${PNAME}/${SRCFILE}
32 )
33
34 # binary package, no stripping allowed
35 NOSTRIP=true
36
37 src_prepare()
38 {
39 munpack ${SRCFILE} || die
40
41 # unpack the real installer files
42 tar --no-same-owner -xvf ${SRCDIR}/COMMON.TAR -C ${SRCDIR} || die
43 tar --no-same-owner -xvf ${SRCDIR}/ILINXR.TAR -C ${SRCDIR} || die
44
45 # fix the broken desktop icon:
46 # /var/tmp/magebuild/builded/usr/share/applications/adobe-AdobeReader.desktop: warning: value "AdobeReader8.png" for key "Icon" in group "Desktop Entry" is an icon name with an extension, but there should be no extension as described in the Icon Theme Specification if the value is not an absolute path
47 # /var/tmp/magebuild/builded/usr/share/applications/adobe-AdobeReader.desktop: error: file contains key "Caption" in group "Desktop Entry", but keys extending the format should start with "X-"
48 # /var/tmp/magebuild/builded/usr/share/applications/adobe-AdobeReader.desktop: error: file contains multiple keys named "Name[de]" in group "Desktop Entry"
49 # Error on file "AdobeReader.desktop": Failed to validate the created desktop file
50 cat ${SRCDIR}/Adobe/Reader${PVER%%.*}/Resource/Support/AdobeReader.desktop \
51 | uniq \
52 | sed -e '/Caption=/d' -e '/Icon=.*/s/.png//' \
53 > ${SRCDIR}/AdobeReader.desktop || die
54 }
55
56 src_install()
57 {
58 cd ${SRCDIR}/Adobe/Reader${PVER%%.*}
59
60 # needed directories
61 minstalldir /usr/bin || die
62 minstalldir /usr/lib/nsbrowser/plugins || die
63 minstalldir /usr/share/applications || die
64 minstalldir /opt/${PNAME}-${PVER}/bin || die
65
66 # install deskop icon
67 minstallpixmap Resource/Icons/64x64/AdobeReader${PVER%%.*}.png AdobeReader.png || die
68 desktop-file-install \
69 --vendor adobe \
70 --delete-original \
71 --dir ${BINDIR}/usr/share/applications \
72 --add-category X-Magellan-Extra \
73 --add-category Graphics \
74 --add-category Viewer \
75 --add-category Application \
76 AdobeReader.desktop \
77 || die
78
79 # fix permissions
80 chown --dereference -R -L root:root Reader || die
81 chown --dereference -R -L root:root Resource || die
82 find Reader -type d | xargs chmod 755 || die
83 find Resource -type d | xargs chmod 755 || die
84
85 # install data-files
86 mv Reader ${BINDIR}/opt/${PNAME}-${PVER} || die
87 mv Resource ${BINDIR}/opt/${PNAME}-${PVER} || die
88
89 # install bins
90 minstallexec bin/acroread /opt/${PNAME}-${PVER}/bin || die
91 mlink /opt/${PNAME}-${PVER}/bin/acroread /usr/bin/acroread || die
92
93 # install browser-plugin
94 minstallexec Browser/intellinux/nppdf.so /usr/lib/nsbrowser/plugins || die
95
96 # FIX ME: the PPKLite.api needs ldap, but we don't support this
97 local plugin_path
98 plugin_path="/opt/${PNAME}-${PVER}/Reader/intellinux/plug_ins"
99 [ -f ${BINDIR}/${plugin_path}/PPKLite.api ] && \
100 rm ${BINDIR}/${plugin_path}/PPKLite.api || die
101
102 cd ${SRCDIR}
103 minstallhtml ReadMe.htm || die
104 minstalldocs Adobe/Reader${PVER:0:1}/LICREAD.TXT || die
105 minstalldocs Adobe/Reader${PVER:0:1}/Browser/HowTo/ENU/Browser_Plugin_HowTo.txt || die
106 }
107
108 postinstall()
109 {
110 if [[ -x /usr/bin/nspluginwrapper ]]
111 then
112 echo "Auto installing 32bit plugins ..."
113 nspluginwrapper -v -a -i
114 fi
115 }
116
117 postremove()
118 {
119 if [[ -x /usr/bin/nspluginwrapper ]]
120 then
121 echo "Auto updating 32bit plugins ..."
122 nspluginwrapper -v -a -u
123 fi
124 }