]> git.pld-linux.org Git - packages/adobe-flash.git/blob - adobe-flash.spec
- wget required by rpm-build-tools, cpio by rpm-build
[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      63
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://distfiles.gentoo.org/distfiles/flash-plugin-%{_ver_major}.%{_ver_minor}.%{_ver_patch}.tar.gz
24 # NoSource0-md5:        a835bc6613c76f62c74a50406bd5801d
25 %else
26 Source0:        license-installer.sh
27 %endif
28 URL:            http://www.macromedia.com/software/flashplayer/
29 %if %{with license_agreement}
30 BuildRequires:  rpmbuild(macros) >= 1.236
31 Requires:       browser-plugins(%{_target_cpu})
32 %endif
33 %if %{without license_agreement}
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
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 install_flash_player_7_linux
62 %endif
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 %if %{without license_agreement}
67 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
68
69 sed -e '
70         s/@BASE_NAME@/%{base_name}/g
71         s/@TARGET_CPU@/%{_target_cpu}/g
72         s-@VERSION@-%{version}-g
73         s-@RELEASE@-%{release}-g
74         s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
75 ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
76
77 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
78
79 %else
80
81 install -d $RPM_BUILD_ROOT%{_plugindir}
82 install *.{so,xpt} $RPM_BUILD_ROOT%{_plugindir}
83
84 %endif
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %if %{without license_agreement}
90 %post
91 %{_bindir}/%{base_name}.install
92
93 %else
94
95 %triggerin -- mozilla-firefox
96 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
97
98 %triggerun -- mozilla-firefox
99 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
100
101 %triggerin -- mozilla
102 %nsplugin_install -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
103 if [ -d /usr/%{_lib}/mozilla ]; then
104         umask 022
105         rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
106         if [ -x /usr/bin/regxpcom ]; then
107                 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
108         fi
109 fi
110
111 %triggerun -- mozilla
112 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
113 if [ -d /usr/%{_lib}/mozilla ]; then
114         umask 022
115         rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
116         if [ -x /usr/bin/regxpcom ]; then
117                 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
118         fi
119 fi
120
121 %triggerin -- konqueror
122 %nsplugin_install -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
123
124 %triggerun -- konqueror
125 %nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
126
127 %triggerin -- opera
128 %nsplugin_install -d %{_libdir}/opera/plugins libflashplayer.so
129
130 %triggerun -- opera
131 %nsplugin_uninstall -d %{_libdir}/opera/plugins libflashplayer.so
132
133 %triggerin -- seamonkey
134 %nsplugin_install -d %{_libdir}/seamonkey/plugins libflashplayer.so
135
136 %triggerun -- seamonkey
137 %nsplugin_uninstall -d %{_libdir}/seamonkey/plugins libflashplayer.so
138
139 # as rpm removes the old obsoleted package files after the triggers
140 # above are ran, add another trigger to make the links there.
141 %triggerpostun -- mozilla-firefox-plugin-macromedia-flash
142 %nsplugin_install -f -d %{_libdir}/mozilla-firefox/plugins libflashplayer.so flashplayer.xpt
143
144 %triggerpostun -- mozilla-plugin-macromedia-flash
145 %nsplugin_install -f -d %{_libdir}/mozilla/plugins libflashplayer.so flashplayer.xpt
146
147 %triggerpostun -- konqueror-plugin-macromedia-flash
148 %nsplugin_install -f -d %{_libdir}/kde3/plugins/konqueror libflashplayer.so
149 %endif
150
151 %files
152 %defattr(644,root,root,755)
153
154 %if %{without license_agreement}
155 %attr(755,root,root) %{_bindir}/%{base_name}.install
156 %{_datadir}/%{base_name}
157
158 %else
159 %doc Readme.txt
160 %attr(755,root,root) %{_plugindir}/*.so
161 %{_plugindir}/*.xpt
162 %endif
This page took 0.1712 seconds and 4 git commands to generate.