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