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