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