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