updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / ipla / PKGBUILD
blobdfbfbeb2c58e98aa8aa78d62cf7339d2dcf50e16
1 # Contributor: Tom Wizetek <tom@wizetek.com>
2 pkgname=ipla
3 pkgver=1.1beta
4 pkgrel=4
5 pkgdesc="Interaktywna platforma multimedialna (PL)"
6 url="http://www.ipla.pl/"
7 license=('custom')
8 arch=('i686' 'x86_64')
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')
11 makedepends=('unzip')
12 source=(http://www.ipla.pl/templates/ipla/assets/iplalite.air)
13 md5sums=('28b1b697843933b5add28b72b0c9cf3b')
15 package() {
16         _appver="1.1 Beta"
17         _appverpath="META-INF/AIR/application.xml"
19         unzip -q -u iplalite.air
21         if [[ -z $(grep ">$_appver<" "$_appverpath") ]]
22         then
23                 _airver=$(sed -n 's,[ \t]*</*version>,,gp' "$_appverpath")
24                 msg ""
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' ]]
31                 do
32                         read -sn1 _contyesno
33                         case ${_contyesno} in
34                                 y|Y|'') echo && _contyesno='y' ;;
35                                 n|N|'\e') echo && return 1 ;;
36                         esac
37                 done
38         fi
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
48 #!/bin/sh
49 GNOME_DESKTOP_SESSION_ID=1 adobe-air /opt/ipla/iplalite.air
50 EoF
51         install -D -m 755 "$srcdir/ipla-gnome" "$pkgdir/usr/bin/ipla-gnome"
53         cat > ipla-kde << EoF
54 #!/bin/sh
55 KDE_FULL_SESSION=true adobe-air /opt/ipla/iplalite.air
56 EoF
57         install -D -m 755 "$srcdir/ipla-kde" "$pkgdir/usr/bin/ipla-kde"
59         cat > ipla-gnome.desktop << EoF
60 [Desktop Entry]
61 Type=Application
62 Terminal=false
63 Categories=Application;Network;
64 Exec=/usr/bin/ipla-gnome
65 Icon=/usr/share/pixmaps/ipla/ipla_128x128.png
66 Name=ipla (GNOME)
67 Comment=Interaktywna platforma multimedialna
68 EoF
69         install -D -m 644 "$srcdir/ipla-gnome.desktop" "$pkgdir/usr/share/applications/ipla-gnome.desktop"
71         cat > ipla-kde.desktop << EoF
72 [Desktop Entry]
73 Type=Application
74 Terminal=false
75 Categories=Application;Network;
76 Exec=/usr/bin/ipla-kde
77 Icon=/usr/share/pixmaps/ipla/ipla_128x128.png
78 Name=ipla (KDE)
79 Comment=Interaktywna platforma multimedialna
80 EoF
81         install -D -m 644 "$srcdir/ipla-kde.desktop" "$pkgdir/usr/share/applications/ipla-kde.desktop"
83         msg ""
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.'
87         msg ""
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.'
90         msg ""