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