%define pkgname flash-plugin
%define pkgversion	11.2.202.238
%define dlurl	http://fpdownload.macromedia.com/get/flashplayer/pdc/%{pkgversion}/flash-plugin-%{pkgversion}-release.%{target_arch}.rpm

%ifarch %{ix86}
%define target_arch i386
%endif
%ifarch x86_64
%define target_arch x86_64
%endif

Summary:	Package to assist installation of Adobe Flash Player (%{target_arch})
Summary(ja): 	Adobe Flash Player (%{target_arch}) のインストールを補助するパッケージ
Name:		install-assist-%{pkgname}
Version:	%{pkgversion}
Release: 	1%{?_dist_release}

License:	Commercial
Group:		Applications/Internet

ExclusiveArch:	%{ix86} x86_64
# Requires(posttrans) not yet implemented. So we use (post) instead.
Requires(post):	self-build-setup >= 0.9.0
# Required packages for flash-plugin 10 (<BTS:wishes:0178>)
Requires:	curl
Requires:	nss
Requires:	libXt
%ifarch x86_64
##Requires:	compat32-nss
##Requires:	compat32-libXt
##Requires:	compat32-alsa-lib
# NOTE: After releasing flash-plugin version 11.1.102.55, 
# our vl5, vl6, vl7 (or higher) use the 64bit linux native flash-plugin. 
# We need not some nspluginwrapper processes on the %%posttrans of 
# this package. 
##Requires(post):	nspluginwrapper
Obsoletes:	flash-plugin < 11.1.102.55-release
%endif

Obsoletes:	install-assist-flash-plugin9

BuildRoot:	%{_tmppath}/%{name}-%{version}-root

Packager:	kazutaka, munepi


%description
Adobe Flash Player %{pkgversion} (%{target_arch})

If you install this package, it automaticaly downloads 
required files to install %{pkgname}.
And the downloaded files are automatically installed if 
installation is executed by apt-get command or synaptic
package manager.

%description -l ja
Adobe Flash Player %{pkgversion} (%{target_arch})

このパッケージをインストールすると、自動的に %{pkgname}
のインストールに必要な rpm ファイルをダウンロードします。
また apt-get コマンドや synapticパッケージマネージャから実行
した場合は、ダウンロードした rpm ファイルのインストールも自
動的に行います。


%install
%{__rm} -rf ${RPM_BUILD_ROOT}
%{__install} -d ${RPM_BUILD_ROOT}/%{_datadir}/%{name}

%clean
%{__rm} -rf ${RPM_BUILD_ROOT}

%posttrans
/usr/lib/rpm/get-binary-rpm.sh %{name} %{dlurl}


## compatibility for nspluginwrapper
rpm --quiet -q nspluginwrapper
[ $? -eq 1 ] && exit 0
[ -f /etc/sysconfig/nspluginwrapper ] || exit 1
# Check the list of plugins what are excluded from wrapping
grep -q -e "libflashplayer" /etc/sysconfig/nspluginwrapper
# If libflashplayer.so is a wrapped plugin of nspluginwrapper, ...
[ $? -eq 1 ] && \
    /usr/lib/rpm/pre-allocate-rpm.sh %{pkgname}-%{version}-release
/usr/bin/mozilla-plugin-config -i
exit 0


%files


%changelog
* Sat Aug 18 2012 Munehiro Yamamoto <munepi@vinelinux.org> 11.2.202.238-1
- new upstream release

* Mon Jun 11 2012 Munehiro Yamamoto <munepi@vinelinux.org> 11.2.202.236-1
- new upstream release

* Tue May  8 2012 Munehiro Yamamoto <munepi@vinelinux.org> 11.2.202.235-1
- new upstream release

* Sun Apr 15 2012 Munehiro Yamamoto <munepi@vinelinux.org> 11.2.202.233-1
- new upstream release

* Wed Mar 28 2012 Munehiro Yamamoto <munepi@vinelinux.org> 11.2.202.228-1
- new upstream release

* Tue Mar 06 2012 Munehiro Yamamoto <munepi@vinelinux.org> 11.1.102.63-1
- new upstream release
  - CVE-2012-0768, CVE-2012-0769 [APSB12-05]

* Thu Feb 16 2012 Munehiro Yamamoto <munepi@vinelinux.org> 11.1.102.62-1
- new upstream release

* Fri Nov 18 2011 Munehiro Yamamoto <munepi@vinelinux.org> 11.1.102.55-2
- Obsoletes: install-assist-flash-plugin9
- dropped Requires: compat32-nss compat32-libXt compat32-alsa-lib (x86_64)

* Wed Nov 16 2011 Munehiro Yamamoto <munepi@vinelinux.org> 11.1.102.55-1
- new upstream release
- change %%dlurl
- support the native linux 64-bit flash-plugin
  - drop Requires(post): nspluginwrapper
  - keep compatibility for nspluginwrapper (for vl5, vl6)

* Tue Oct 11 2011 Munehiro Yamamoto <munepi@vinelinux.org> 11.0.1.152-4
- changed to Obsoletes: flash-plugin < 11.0.1.152-release

* Mon Oct 10 2011 Munehiro Yamamoto <munepi@vinelinux.org> 11.0.1.152-3
- improved the installation of linux 64-bit flash-plugin for vl7 (x86_64)
  - dropped Requires(post): nspluginwrapper 
  - added Obsoletes: flash-plugin <= 11.0.1.152-release
  - fixed %%posttrans

* Thu Oct  6 2011 Munehiro Yamamoto <munepi@vinelinux.org> 11.0.1.152-2
- supportted native linux 64-bit flash-plugin (for vl7)

* Thu Oct  6 2011 Munehiro Yamamoto <munepi@vinelinux.org> 11.0.1.152-1
- new upstream release

* Fri Sep 23 2011 Munehiro Yamamoto <munepi@vinelinux.org> 10.3.183.10-1
- new upstream release

* Fri Sep 02 2011 Munehiro Yamamoto <munepi@vinelinux.org> 10.3.183.7-1
- new upstream release

* Sat Aug 20 2011 Munehiro Yamamoto <munepi@vinelinux.org> 10.3.183.5-1
- new upstream release

* Thu Jun 16 2011 Munehiro Yamamoto <munepi@vinelinux.org> 10.3.181.26-1
- new upstream release

* Sat May 14 2011 Munehiro Yamamoto <munepi@vinelinux.org> 10.3.181.14-1
- new upstream release

* Fri May 06 2011 Munehiro Yamamoto <munepi@vinelinux.org> 10.2.159.1-1
- new upstream release

* Wed Mar 23 2011 Munehiro Yamamoto <munepi@vinelinux.org> 10.2.153.1-1
- new upstream release

* Thu Feb 10 2011 Munehiro Yamamoto <munepi@vinelinux.org> 10.2.152.27
- new upstream release

* Wed Dec 08 2010 Munehiro Yamamoto <munepi@vinelinux.org> 10.1.102.65
- new upstream release

* Sat Nov 06 2010 Munehiro Yamamoto <munepi@vinelinux.org> 10.1.102.64
- new upstream release

* Thu Sep 23 2010 Munehiro Yamamoto <munepi@vinelinux.org> 10.1.85.3-1
- new upstream release

* Fri Aug 20 2010 Munehiro Yamamoto <munepi@vinelinux.org> 10.1.82.76-1
- new upstream release

* Fri Jun 11 2010 Munehiro Yamamoto <munepi@vinelinux.org> 10.1.53.64-1
- new upstream release
- added Requires: nss libXt
- added Requires: compat32-libXt (for x86_64)

* Sat Feb 13 2010 Munehiro Yamamoto <munepi@vinelinux.org> 10.0.45.2-1
- new upstream release

* Wed Dec 09 2009 Munehiro Yamamoto <munepi@vinelinux.org> 10.0.42.34-1
- new upstream release

* Wed Aug 12 2009 Munehiro Yamamoto <munepi@vinelinux.org> 10.0.32.18-2
- mentioned "i386" flash-player in Summary and %%description

* Fri Jul 31 2009 Munehiro Yamamoto <munepi@vinelinux.org> 10.0.32.18-1
- new upstream release

* Sat Jul 11 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 10.0.22.87-4
- setup for x86_64

* Fri Jun 05 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 10.0.22.87-3
- add Requires: curl (<BTS:wishes:0178>)

* Thu Jun 04 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 10.0.22.87-2
- update flash-plugin.spec (add symlink for %%{_libdir}/mozilla/plugins/)
  (<BTS:wishes:0178>)

* Sun May 24 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 10.0.22.87-1
- initial build for Vine Linux.