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