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