%define pkgname AdobeAIR
%define pkgversion 2.6
%define dlurl	http://airdownload.adobe.com/air/lin/download/%{pkgversion}/adobeair.i386.rpm

Summary:	Package to assist installation of %{pkgname} (i386)
Summary(ja): 	%{pkgname} (i386)のインストールを補助するパッケージ
Name:		install-assist-%{pkgname}
Version:	%{pkgversion}
Release: 	1%{?_dist_release}
License:	Commercial
Group:		Applications/Productivity

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 Adobe AIR
Requires:	gtk2 >= 2.4.0
Requires:	dbus-glib
Requires:	hal
Requires:	libXt
Requires:	openssl
%if %{?_dist_release} == "vl5"
Requires:	gnome-keyring
%endif
%if %{?_dist_release} == "vl6"
Requires:	libgnome-keyring
%endif
Requires:	libxml2
Requires:	libxslt

%ifarch x86_64
Requires:	compat32-gtk2
Requires:	compat32-libXt
%if %{?_dist_release} == "vl5"
Requires:	compat32-gnome-keyring
%endif
%if %{?_dist_release} == "vl6"
Requires:	compat32-libgnome-keyring
%endif
Requires:	compat32-libxml2
Requires:	compat32-nss
Requires:	compat32-nspr
Requires:	compat32-openssl
Requires:	compat32-libxslt
%endif

Packager:	munepi


%description
The Adobe(R) AIR(R) 2 runtime enables developers to use HTML, JavaScript, 
Adobe Flash(R) software, and ActionScript(R) to build web applications that 
run as standalone client applications without the constraints of a browser. 
Adobe AIR and the Adobe Flash Platform unleash the creativity of designers 
and developers by providing a consistent and flexible development 
environment for the delivery of applications across devices and platforms. 
Support for additional platforms, including Android, is under development.

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(R) AIR(R) 2ランタイムを利用すると、デベロッパーはHTML、JavaScript、
Adobe Flash(R)およびActionScript(R)を使用して、ブラウザーの制約に縛られることなく、
モバイル用およびデスクトップ用のWebアプリケーションをスタンドアロンの
クライアントアプリケーションとして構築できます。Adobe AIRおよび
Adobe Flash Platformの一貫した柔軟な開発環境では、デザイナーやデベロッパーは
配布先のデバイスやプラットフォームに制約されずに自在に作成できます。
Androidなど、他のプラットフォーム向けのサポートも開発中です。

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


%posttrans
## If exists cached rpm, copy its dummy rpm into /var/cache/self-build/
(cd /var/cache/apt/archives
    if [ -f adobeair-%{version}*.rpm ]; then
	%__cp -af adobeair-%{version}*.rpm adobeair.i386.rpm
    fi
)

## If /var/cache/apt/archives/adobeair.i386.rpm does not exist, 
## download it: 
/usr/lib/rpm/get-binary-rpm.sh %{name} %{dlurl}
## and, remove dummy rpm adobeair.i386.rpm: 
%__rm -f /var/cache/apt/archives/adobeair.i386.rpm

## rename adobeair.i386.rpm
(cd /var/cache/self-build
    %__mv adobeair.i386.rpm $(rpm -qp adobeair.i386.rpm 2>/dev/null).rpm
)


%files

%changelog
* Thu Mar 24 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2.6-1
- updated to 2.6

* Sun Nov 14 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2.5.1-1
- updated to 2.5.1

* Sat Oct 29 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2.5-1
- updated to 2.5

* Sun Aug 22 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2.0.3-1
- initial build for Vine Linux