]> git.pld-linux.org Git - packages/adobe-flash.git/blob - adobe-flash.spec
- updated to 7.0.61.0, resolves CVE-2005-2628
[packages/adobe-flash.git] / adobe-flash.spec
1 #
2 # Conditional build:
3 %bcond_with     license_agreement       # generates package
4 #
5 %define         _ver_major      7
6 %define         _ver_minor      0
7 %define         _ver_patch      61.0
8 Summary:        Flash plugin for Netscape-compatible WWW browsers
9 Summary(pl):    Wtyczka Flash dla przegl±darek WWW zgodnych z Netscape
10 %define         base_name       macromedia-flash
11 %if %{with license_agreement}
12 Name:           %{base_name}
13 %else
14 Name:           %{base_name}-installer
15 %endif
16 Version:        %{_ver_major}.%{_ver_minor}.%{_ver_patch}
17 %define         _rel 1
18 Release:        %{_rel}%{?with_license_agreement:wla}
19 License:        Free to use, non-distributable
20 Group:          X11/Applications/Multimedia
21 %if %{with license_agreement}
22 Source0:        http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_%{_ver_major}_linux.tar.gz
23 # NoSource0-md5:        b063b512076d4c88a56cb7521e6b5409
24 %else
25 Source0:        license-installer.sh
26 %endif
27 URL:            http://www.macromedia.com/software/flashplayer/
28 %if %{with license_agreement}
29 BuildRequires:  rpmbuild(macros) >= 1.236
30 %endif
31 Requires:       browser-plugins(%{_target_cpu})
32 %if %{without license_agreement}
33 Requires:       cpio
34 Requires:       rpm-build-tools
35 Requires:       wget
36 %endif
37 Obsoletes:      flash-plugin
38 Obsoletes:      mozilla-plugin-macromedia-flash
39 Obsoletes:      mozilla-firefox-plugin-macromedia-flash
40 Obsoletes:      konqueror-plugin-macromedia-flash
41 ExclusiveArch:  %{ix86}
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %define         _plugindir      %{_libdir}/browser-plugins
45
46 # TODO: galeon and skipstone.
47 # use macro, otherwise extra LF inserted along with the ifarch
48 %define browsers mozilla, mozilla-firefox, konqueror, opera
49
50 %description
51 Flash plugin for Netscape-compatible WWW browsers.
52
53 Supported browsers: %{browsers}.
54
55 %description -l pl
56 Wtyczka Flash dla przegl±darek WWW zgodnych z Netscape.
57
58 Obs³ugiwane przegl±darki: %{browsers}.
59
60 %prep
61 %if %{with license_agreement}
62 %setup -q -n install_flash_player_7_linux
63 %endif
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67 %if %{without license_agreement}
68 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
69
70 sed -e '
71         s/@BASE_NAME@/%{base_name}/g
72         s/@TARGET_CPU@/%{_target_cpu}/g
73         s-@VERSION@-%{version}-g
74         s-@RELEASE@-%{release}-g
75         s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
76 ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
77
78 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
79
80 %else
81
82 install -d $RPM_BUILD_ROOT%{_plugindir}
83 install *.{so,xpt} $RPM_BUILD_ROOT%{_plugindir}
84
85 %endif
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %if %{without license_agreement}
91 %post
92 %{_bindir}/%{base_name}.install
93
94 %else
95
96 %triggerin -- mozilla-firefox
97 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
98
99 %triggerun -- mozilla-firefox
100 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
101
102 %triggerin -- mozilla
103 %nsplugin_install -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
104 if [ -d /usr/%{_lib}/mozilla ]; then
105         umask 022
106         rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
107         if [ -x /usr/bin/regxpcom ]; then
108                 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
109         fi
110 fi
111
112 %triggerun -- mozilla
113 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
114 if [ -d /usr/%{_lib}/mozilla ]; then
115         umask 022
116         rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
117         if [ -x /usr/bin/regxpcom ]; then
118                 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
119         fi
120 fi
121
122 %triggerin -- konqueror
123 %nsplugin_install -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
124
125 %triggerun -- konqueror
126 %nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
127
128 %triggerin -- opera
129 %nsplugin_install -d %{_libdir}/opera/plugins libflashplayer.so
130
131 %triggerun -- opera
132 %nsplugin_uninstall -d %{_libdir}/opera/plugins libflashplayer.so
133
134 # as rpm removes the old obsoleted package files after the triggers
135 # above are ran, add another trigger to make the links there.
136 %triggerpostun -- mozilla-firefox-plugin-macromedia-flash
137 %nsplugin_install -f -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
138
139 %triggerpostun -- mozilla-plugin-macromedia-flash
140 %nsplugin_install -f -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
141
142 %triggerpostun -- konqueror-plugin-macromedia-flash
143 %nsplugin_install -f -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
144 %endif
145
146 %files
147 %defattr(644,root,root,755)
148
149 %if %{without license_agreement}
150 %attr(755,root,root) %{_bindir}/%{base_name}.install
151 %{_datadir}/%{base_name}
152
153 %else
154 %doc Readme.txt
155 %attr(755,root,root) %{_plugindir}/*.so
156 %{_plugindir}/*.xpt
157 %endif
This page took 0.050025 seconds and 4 git commands to generate.