]> git.pld-linux.org Git - packages/adobe-flash.git/blob - adobe-flash.spec
- unzip unneccessary
[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:       wget
30 %endif
31 Obsoletes:      flash-plugin
32 Obsoletes:      mozilla-plugin-macromedia-flash
33 Obsoletes:      mozilla-firefox-plugin-macromedia-flash
34 Obsoletes:      konqueror-plugin-macromedia-flash
35 ExclusiveArch:  %{ix86}
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %define         _plugindir      %{_libdir}/browser-plugins
39
40 # TODO: galeon and skipstone.
41 # use macro, otherwise extra LF inserted along with the ifarch
42 %define browsers mozilla, mozilla-firefox, konqueror, opera
43
44 %description
45 Flash plugin for Netscape-compatible WWW browsers.
46
47 Supported browsers: %{browsers}.
48
49 %description -l pl
50 Wtyczka Flash dla przeglĀ±darek WWW zgodnych z Netscape.
51
52 Supported browsers: %{browsers}.
53
54 %prep
55 %if %{with license_agreement}
56 %setup -q -n install_flash_player_7_linux
57 %endif
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61 %if %{without license_agreement}
62 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
63
64 sed -e '
65         s/@BASE_NAME@/%{base_name}/g
66         s/@TARGET_CPU@/%{_target_cpu}/g
67         s-@VERSION@-%{version}-g
68         s-@RELEASE@-%{release}-g
69         s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
70 ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
71
72 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
73
74 %else
75
76 install -d $RPM_BUILD_ROOT%{_plugindir}
77 install *.{so,xpt} $RPM_BUILD_ROOT%{_plugindir}
78
79 %endif
80
81 %clean
82 rm -rf $RPM_BUILD_ROOT
83
84 %if %{without license_agreement}
85 %pre
86 %{_bindir}/%{base_name}.install
87
88 %else
89
90 %triggerin -- mozilla-firefox
91 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
92
93 %triggerun -- mozilla-firefox
94 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
95
96 %triggerin -- mozilla
97 %nsplugin_install -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
98 if [ -d /usr/%{_lib}/mozilla ]; then
99         umask 022
100         rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
101         if [ -x /usr/bin/regxpcom ]; then
102                 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
103         fi
104 fi
105
106 %triggerun -- mozilla
107 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
108 if [ -d /usr/%{_lib}/mozilla ]; then
109         umask 022
110         rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
111         if [ -x /usr/bin/regxpcom ]; then
112                 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
113         fi
114 fi
115
116 %triggerin -- konqueror
117 %nsplugin_install -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
118
119 %triggerun -- konqueror
120 %nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
121
122 %triggerin -- opera
123 %nsplugin_install -d %{_libdir}/opera/plugins libflashplayer.so
124
125 %triggerun -- opera
126 %nsplugin_uninstall -d %{_libdir}/opera/plugins libflashplayer.so
127
128 %endif
129
130 %files
131 %defattr(644,root,root,755)
132
133 %if %{without license_agreement}
134 %attr(755,root,root) %{_bindir}/%{base_name}.install
135 %{_datadir}/%{base_name}
136
137 %else
138 %attr(755,root,root) %{_plugindir}/*.so
139 %{_plugindir}/*.xpt
140 %endif
This page took 0.042426 seconds and 4 git commands to generate.