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