1 # Contributor: Tom Wizetek <tom@wizetek.com>
5 pkgdesc="Interaktywna platforma multimedialna (PL)"
6 url="http://www.ipla.pl/"
9 [[ ${CARCH} = 'i686' ]] && depends=('adobe-air') && optdepends=('gnome-keyring' 'kdeutils-kwallet')
10 [[ ${CARCH} = 'x86_64' ]] && depends=('bin32-adobe-air') && optdepends=('gcc-libs-multilib' 'binutils-multilib' 'gcc-multilib' 'lib32-libgnome-keyring' 'gnome-keyring' 'kdeutils-kwallet')
12 source=(http://www.ipla.pl/templates/ipla/assets/iplalite.air)
13 md5sums=('28b1b697843933b5add28b72b0c9cf3b')
17 _appverpath="META-INF/AIR/application.xml"
19 unzip -q -u iplalite.air
21 if [[ -z $(grep ">$_appver<" "$_appverpath") ]]
23 _airver=$(sed -n 's,[ \t]*</*version>,,gp' "$_appverpath")
25 msg "VERSION MISMATCH!"
26 msg "Expected application version: $_appver"
27 msg "Current .air file version: $_airver"
28 echo -en "\nThis may not work. Continue anyway? [Y/n]"
30 until [[ ${_contyesno} == 'y' ]]
34 y|Y|'') echo && _contyesno='y' ;;
35 n|N|'
\e') echo && return 1 ;;
40 install -D -m 644 "$srcdir/iplalite.air" "$pkgdir/opt/ipla/iplalite.air"
41 install -D -m 644 "$srcdir/style/assets/LogoSmall.png" "$pkgdir/usr/share/pixmaps/ipla/ipla_small.png"
42 install -D -m 644 "$srcdir/style/assets/logo16_16.png" "$pkgdir/usr/share/pixmaps/ipla/ipla_16x16.png"
43 install -D -m 644 "$srcdir/style/assets/logo32_32.png" "$pkgdir/usr/share/pixmaps/ipla/ipla_32x32.png"
44 install -D -m 644 "$srcdir/style/assets/logo48_48.png" "$pkgdir/usr/share/pixmaps/ipla/ipla_48x48.png"
45 install -D -m 644 "$srcdir/style/assets/logo128_128.png" "$pkgdir/usr/share/pixmaps/ipla/ipla_128x128.png"
47 cat > ipla-gnome << EoF
49 GNOME_DESKTOP_SESSION_ID=1 adobe-air /opt/ipla/iplalite.air
51 install -D -m 755 "$srcdir/ipla-gnome" "$pkgdir/usr/bin/ipla-gnome"
55 KDE_FULL_SESSION=true adobe-air /opt/ipla/iplalite.air
57 install -D -m 755 "$srcdir/ipla-kde" "$pkgdir/usr/bin/ipla-kde"
59 cat > ipla-gnome.desktop << EoF
63 Categories=Application;Network;
64 Exec=/usr/bin/ipla-gnome
65 Icon=/usr/share/pixmaps/ipla/ipla_128x128.png
67 Comment=Interaktywna platforma multimedialna
69 install -D -m 644 "$srcdir/ipla-gnome.desktop" "$pkgdir/usr/share/applications/ipla-gnome.desktop"
71 cat > ipla-kde.desktop << EoF
75 Categories=Application;Network;
76 Exec=/usr/bin/ipla-kde
77 Icon=/usr/share/pixmaps/ipla/ipla_128x128.png
79 Comment=Interaktywna platforma multimedialna
81 install -D -m 644 "$srcdir/ipla-kde.desktop" "$pkgdir/usr/share/applications/ipla-kde.desktop"
84 msg "ipla requires a password management tool."
85 msg "Install one for the desktop environment of your choice."
86 msg 'See "Optional dependencies" during package installation.'
88 msg 'You may also need to install from AUR "libpng12" (i686) or "lib32-libpng12" (x86_64)'
89 msg 'for Adobe AIR to work properly instead of using "libpng" 1.4 or newer.'