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