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