]> git.pld-linux.org Git - packages/adobe-flash.git/blob - adobe-flash.spec
- rel 2; missing endif readded
[packages/adobe-flash.git] / adobe-flash.spec
1 #
2 # Conditional build:
3 %bcond_with     license_agreement       # generates package
4
5 %define         ver32   11.0.1.98
6 %define         ver64   11.0.1.98
7
8 %ifarch %{ix86}
9 %define         version %{ver32}
10 %define         libmark %{nil}
11 %endif
12 %ifarch %{x8664}
13 %define         version %{ver64}
14 %define         libmark ()(64bit)
15 %endif
16
17 %define         base_name       adobe-flash
18 %define         rel 2
19 Summary:        Flash plugin for Netscape-compatible WWW browsers
20 Summary(pl.UTF-8):      Wtyczka Flash dla przeglądarek WWW zgodnych z Netscape
21 %if %{with license_agreement}
22 Name:           %{base_name}
23 %else
24 Name:           %{base_name}-installer
25 %endif
26 Version:        %{version}
27 Release:        %{rel}%{?with_license_agreement:wla}
28 Epoch:          1
29 License:        Free to use, non-distributable
30 Group:          X11/Applications/Multimedia
31 %if %{with license_agreement}
32 #Source0:       http://download.macromedia.com/pub/labs/flashplatformruntimes/flashplayer10-3/flashplayer10-3_rc1_lin_042011.tar.gz
33 Source0:        http://download.macromedia.com/pub/labs/flashplatformruntimes/flashplayer11/flashplayer11_b2_install_lin_32_080811.tar.gz#/%{base_name}-%{ver32}.tgz
34 # NoSource0-md5:        285d585fd6bbf6bdaf16d404dceaa761
35 NoSource:       0
36 ##Source1:      http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-%{version}.linux-x86_64.so.tar.gz
37 Source1:        http://download.macromedia.com/pub/labs/flashplatformruntimes/flashplayer11/flashplayer11_b2_install_lin_64_080811.tar.gz#/%{base_name}64-%{ver64}.tgz
38 # NoSource1-md5:        87ccb674fbcf94739f82cc6089634623
39 NoSource:       1
40 Source2:        mms.cfg
41 %else
42 Source3:        http://svn.pld-linux.org/svn/license-installer/license-installer.sh
43 # Source3-md5:  329c25f457fea66ec502b7ef70cb9ede
44 %endif
45 URL:            http://www.adobe.com/products/flashplayer/
46 %if %{with license_agreement}
47 BuildRequires:  rpmbuild(macros) >= 1.357
48 BuildRequires:  sed >= 4.0
49 Requires:       browser-plugins >= 2.0
50 # dlopened by player
51 Requires:       libasound.so.2%{libmark}
52 Requires:       libcurl.so.4%{libmark}
53 %else
54 Requires:       rpm-build-tools >= 4.4.37
55 Requires:       rpmbuild(macros) >= 1.544
56 %endif
57 Provides:       browser(flash)
58 Provides:       macromedia-flash
59 Obsoletes:      flash-plugin
60 Obsoletes:      konqueror-plugin-macromedia-flash
61 Obsoletes:      macromedia-flash
62 Obsoletes:      mozilla-firefox-plugin-macromedia-flash
63 Obsoletes:      mozilla-plugin-macromedia-flash
64 ExclusiveArch:  %{ix86} %{x8664}
65 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66
67 %define         _sysconfdir     /etc/adobe
68
69 # So that building package on AC system won't write package name dep that Th system can't understand (libstdc++4)
70 %define         _noautoreqdep   libstdc++.so.6
71
72 # No debuginfo to be stored
73 %define         _enable_debug_packages  0
74
75 %description
76 Adobe(R) Flash(R) Player for Linux - the next-generation client
77 runtime for engaging with Flash content and applications on Linux.
78
79 %description -l pl.UTF-8
80 Adobe(R) Flash(R) Player - środowisko nowej generacji do obsługi
81 treści i aplikacji we Flashu pod Linuksem.
82
83 %prep
84 %if %{with license_agreement}
85 %ifarch %{x8664}
86 %setup -q -T -c -b 1
87 %else
88 %setup -q -T -c -b 0
89 %endif
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 ' %{SOURCE3} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
113
114 cp -p %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
115
116 %else
117
118 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_browserpluginsdir},%{_bindir},%{_desktopdir}}
119 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/mms.cfg
120 install -p *.so $RPM_BUILD_ROOT%{_browserpluginsdir}
121 install usr/bin/flash-player-properties $RPM_BUILD_ROOT%{_bindir}
122 install usr/share/applications/flash-player-properties.desktop $RPM_BUILD_ROOT%{_desktopdir}/flash-player-properties.desktop
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) %{_bindir}/flash-player-properties
150 %attr(755,root,root) %{_browserpluginsdir}/*.so
151 %{_desktopdir}/flash-player-properties.desktop
152 %endif
This page took 0.110172 seconds and 4 git commands to generate.