]> git.pld-linux.org Git - packages/adobe-flash.git/blob - adobe-flash.spec
- it's v10 already
[packages/adobe-flash.git] / adobe-flash.spec
1 #
2 # Conditional build:
3 %bcond_with     license_agreement       # generates package
4 #
5 %define         ver_major       10
6 %define         ver_minor       0
7 %define         ver_patch       0
8 %define         ver_serial      0
9 %define         base_name       adobe-flash
10 %define         rel 4
11 Summary:        Flash plugin for Netscape-compatible WWW browsers
12 Summary(pl.UTF-8):      Wtyczka Flash dla przeglądarek WWW zgodnych z Netscape
13 %if %{with license_agreement}
14 Name:           %{base_name}
15 %else
16 Name:           %{base_name}-installer
17 %endif
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/flashplayer10/flashplayer10_install_linux_081108.tar.gz
24 # NoSource0-md5:        868fe510a1e9a6addfa8144c643cef48
25 %else
26 Source1:        license-installer.sh
27 %endif
28 URL:            http://www.adobe.com/products/flashplayer/
29 %if %{with license_agreement}
30 BuildRequires:  rpmbuild(macros) >= 1.357
31 BuildRequires:  sed >= 4.0
32 Requires:       browser-plugins >= 2.0
33 # apparently dlopened by player
34 Requires:       libasound.so.2
35 %else
36 Requires:       rpm-build-tools
37 %endif
38 Provides:       browser(flash)
39 Provides:       macromedia-flash
40 Obsoletes:      flash-plugin
41 Obsoletes:      konqueror-plugin-macromedia-flash
42 Obsoletes:      macromedia-flash
43 Obsoletes:      mozilla-firefox-plugin-macromedia-flash
44 Obsoletes:      mozilla-plugin-macromedia-flash
45 ExclusiveArch:  %{ix86}
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %define         _sysconfdir     /etc/adobe
49
50 # No debuginfo to be stored
51 %define         _enable_debug_packages  0
52
53 %description
54 Adobe(R) Flash(R) Player for Linux - the next-generation client
55 runtime for engaging with Flash content and applications on Linux.
56
57 %description -l pl.UTF-8
58 Adobe(R) Flash(R) Player - środowisko nowej generacji do obsługi
59 treści i aplikacji we Flashu pod Linuksem.
60
61 %prep
62 %if %{with license_agreement}
63 %setup -q -n install_flash_player_%{ver_major}_linux
64 %endif
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68 %if %{without license_agreement}
69 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
70
71 sed -e '
72         s/@BASE_NAME@/%{base_name}/g
73         s/@TARGET_CPU@/%{_target_cpu}/g
74         s-@VERSION@-%{version}-g
75         s-@RELEASE@-%{release}-g
76         s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
77 ' %{SOURCE1} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
78
79 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
80
81 %else
82
83 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_browserpluginsdir}}
84 cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/mms.cfg
85 # http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=16701594
86 # http://www.adobe.com/devnet/flashplayer/articles/flash_player_admin_guide.html
87 AutoUpdateDisable=1
88 AutoUpdateInterval=0
89 # OverrideGPUValidation=true
90 EOF
91 install *.so $RPM_BUILD_ROOT%{_browserpluginsdir}
92
93 # HACK: Try if new ABI is compatible
94 sed -i -e 's/libcurl\.so\.3/libcurl.so.4/g' $RPM_BUILD_ROOT%{_browserpluginsdir}/libflashplayer.so
95
96 %endif
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %if %{without license_agreement}
102 %post
103 %{_bindir}/%{base_name}.install
104 %else
105 %post
106 %update_browser_plugins
107
108 %postun
109 if [ "$1" = 0 ]; then
110         %update_browser_plugins
111 fi
112 %endif
113
114 %files
115 %defattr(644,root,root,755)
116 %if %{without license_agreement}
117 %attr(755,root,root) %{_bindir}/%{base_name}.install
118 %{_datadir}/%{base_name}
119 %else
120 %dir %{_sysconfdir}
121 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mms.cfg
122 %attr(755,root,root) %{_browserpluginsdir}/*.so
123 %endif
This page took 0.057411 seconds and 4 git commands to generate.