]>
Commit | Line | Data |
---|---|---|
e9cc6da3 | 1 | # |
aa3cbbce | 2 | # Conditional build: |
3 | %bcond_with license_agreement # generates package | |
19d7e29f | 4 | |
e6d2385a ER |
5 | %ifarch %{ix86} |
6 | %define ver 10.2.152.27 | |
7 | %define libmark %{nil} | |
8 | %endif | |
e0aacdca | 9 | %ifarch %{x8664} |
e6d2385a ER |
10 | %define ver 10.3.162.29 |
11 | %define libmark ()(64bit) | |
b18d4034 | 12 | %endif |
19d7e29f | 13 | |
fdeb48aa | 14 | %define base_name adobe-flash |
0422b44b | 15 | %define rel 1 |
53f15d83 | 16 | Summary: Flash plugin for Netscape-compatible WWW browsers |
989db712 | 17 | Summary(pl.UTF-8): Wtyczka Flash dla przeglądarek WWW zgodnych z Netscape |
aa3cbbce | 18 | %if %{with license_agreement} |
19 | Name: %{base_name} | |
20 | %else | |
21 | Name: %{base_name}-installer | |
22 | %endif | |
e6d2385a | 23 | Version: %{ver} |
5e11dd18 | 24 | Release: %{rel}%{?with_license_agreement:wla} |
4ec0200b | 25 | Epoch: 1 |
53f15d83 | 26 | License: Free to use, non-distributable |
01b5e1fb | 27 | Group: X11/Applications/Multimedia |
aa3cbbce | 28 | %if %{with license_agreement} |
e6d2385a ER |
29 | #Source0: http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_2_p2_32bit_linux_111710.tar.gz |
30 | #Source0: http://fpdownload.macromedia.com/get/flashplayer/current/flash-plugin-%{version}-release.i386.rpm | |
31 | Source0: http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.tar.gz | |
32 | # NoSource0-md5: e9fc57403796a4992474e4f25857ca14 | |
364b3cd0 | 33 | NoSource: 0 |
f4a110d9 | 34 | ##Source1: http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-%{version}.linux-x86_64.so.tar.gz |
aa56ec7e | 35 | Source1: http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_2_p3_64bit_linux_111710.tar.gz |
35b7834e | 36 | # NoSource1-md5: 49b55c7eb8044453e5f6f2e4b3cb4084 |
e0aacdca | 37 | NoSource: 1 |
63f88470 | 38 | Source2: mms.cfg |
18284157 | 39 | %else |
63f88470 ER |
40 | Source3: http://svn.pld-linux.org/svn/license-installer/license-installer.sh |
41 | # Source3-md5: 329c25f457fea66ec502b7ef70cb9ede | |
aa3cbbce | 42 | %endif |
d6511d55 | 43 | Source4: memcpy-to-memmove.sh |
ba9bcac5 | 44 | URL: http://www.adobe.com/products/flashplayer/ |
b68eb59b | 45 | %if %{with license_agreement} |
df79ad5e | 46 | BuildRequires: rpmbuild(macros) >= 1.357 |
5f855dbc | 47 | BuildRequires: sed >= 4.0 |
df79ad5e | 48 | Requires: browser-plugins >= 2.0 |
15b3da69 | 49 | # dlopened by player |
b18d4034 AM |
50 | Requires: libasound.so.2%{libmark} |
51 | Requires: libcurl.so.4%{libmark} | |
94ae04b2 | 52 | %else |
1fe695bf | 53 | Requires: rpm-build-tools >= 4.4.37 |
9377eeca | 54 | Requires: rpmbuild(macros) >= 1.544 |
533db319 | 55 | %endif |
bcccd50e | 56 | Provides: browser(flash) |
5f855dbc | 57 | Provides: macromedia-flash |
533db319 | 58 | Obsoletes: flash-plugin |
533db319 | 59 | Obsoletes: konqueror-plugin-macromedia-flash |
5891b1a0 | 60 | Obsoletes: macromedia-flash |
a00d2cc2 ER |
61 | Obsoletes: mozilla-firefox-plugin-macromedia-flash |
62 | Obsoletes: mozilla-plugin-macromedia-flash | |
e0aacdca | 63 | ExclusiveArch: %{ix86} %{x8664} |
01b5e1fb PG |
64 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
65 | ||
ed1085d2 ER |
66 | %define _sysconfdir /etc/adobe |
67 | ||
0fa08e0e ER |
68 | # So that building package on AC system won't write package name dep that Th system can't understand (libstdc++4) |
69 | %define _noautoreqdep libstdc++.so.6 | |
70 | ||
1fe30e9c ER |
71 | # No debuginfo to be stored |
72 | %define _enable_debug_packages 0 | |
73 | ||
01b5e1fb | 74 | %description |
65fff478 | 75 | Adobe(R) Flash(R) Player for Linux - the next-generation client |
e338620c | 76 | runtime for engaging with Flash content and applications on Linux. |
53f15d83 | 77 | |
5f2286aa JR |
78 | %description -l pl.UTF-8 |
79 | Adobe(R) Flash(R) Player - środowisko nowej generacji do obsługi | |
80 | treści i aplikacji we Flashu pod Linuksem. | |
53f15d83 | 81 | |
01b5e1fb | 82 | %prep |
aa3cbbce | 83 | %if %{with license_agreement} |
b18d4034 AM |
84 | %ifarch %{x8664} |
85 | %setup -q -T -c -b 1 | |
86 | %else | |
3170126a | 87 | %setup -q -T -c -b 0 |
b18d4034 | 88 | %endif |
d4052f7c ER |
89 | |
90 | %build | |
e6d2385a | 91 | s=$(echo 'LNX %{version}' | tr . ,) |
7673fff0 | 92 | v=$(strings libflashplayer.so | grep '^LNX ') |
d4052f7c ER |
93 | if [ "$v" != "$s" ]; then |
94 | : wrong version | |
95 | exit 1 | |
96 | fi | |
d6511d55 AM |
97 | |
98 | %ifarch %{x8664} | |
99 | # Bug #354073: Patch binary to use memmove instead of memcpy from | |
100 | # Redhat's bug https://bugzilla.redhat.com/show_bug.cgi?id=638477#c94 | |
101 | cp libflashplayer.so libflashplayer.so.orig | |
102 | /bin/bash %{SOURCE4} libflashplayer.so \ | |
103 | || (echo "memcpy-to-memmove.sh failed" && exit 1) | |
104 | %endif | |
aa3cbbce | 105 | %endif |
01b5e1fb PG |
106 | |
107 | %install | |
108 | rm -rf $RPM_BUILD_ROOT | |
ed1085d2 | 109 | %if %{without license_agreement} |
aa3cbbce | 110 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}} |
111 | ||
18284157 ER |
112 | sed -e ' |
113 | s/@BASE_NAME@/%{base_name}/g | |
114 | s/@TARGET_CPU@/%{_target_cpu}/g | |
115 | s-@VERSION@-%{version}-g | |
116 | s-@RELEASE@-%{release}-g | |
117 | s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g | |
03482652 | 118 | s,@DATADIR@,%{_datadir}/%{base_name},g |
63f88470 | 119 | ' %{SOURCE3} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install |
aa3cbbce | 120 | |
63f88470 | 121 | cp -p %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name} |
aa3cbbce | 122 | |
123 | %else | |
124 | ||
ed1085d2 | 125 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_browserpluginsdir}} |
63f88470 ER |
126 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/mms.cfg |
127 | install -p *.so $RPM_BUILD_ROOT%{_browserpluginsdir} | |
aa3cbbce | 128 | %endif |
129 | ||
01b5e1fb PG |
130 | %clean |
131 | rm -rf $RPM_BUILD_ROOT | |
132 | ||
df79ad5e | 133 | %if %{without license_agreement} |
ae33c71b | 134 | %post |
18284157 | 135 | %{_bindir}/%{base_name}.install |
533db319 | 136 | %else |
df79ad5e ER |
137 | %post |
138 | %update_browser_plugins | |
533db319 | 139 | |
df79ad5e ER |
140 | %postun |
141 | if [ "$1" = 0 ]; then | |
142 | %update_browser_plugins | |
143 | fi | |
533db319 ER |
144 | %endif |
145 | ||
aa3cbbce | 146 | %files |
147 | %defattr(644,root,root,755) | |
df79ad5e | 148 | %if %{without license_agreement} |
aa3cbbce | 149 | %attr(755,root,root) %{_bindir}/%{base_name}.install |
150 | %{_datadir}/%{base_name} | |
aa3cbbce | 151 | %else |
ed1085d2 ER |
152 | %dir %{_sysconfdir} |
153 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mms.cfg | |
df79ad5e | 154 | %attr(755,root,root) %{_browserpluginsdir}/*.so |
aa3cbbce | 155 | %endif |