updated on Thu Jan 19 20:01:47 UTC 2012
[aur-mirror.git] / audio-recorder-from-deb / PKGBUILD
blob6ed93e0cdd3b39a1697ee18606314dcde66ae7f8
1 # Maintainer: Dan Serban
3 pkgname=audio-recorder-from-deb
4 pkgver=0.6.2
5 pkgrel=1
6 pkgdesc="Record audio from your soundcard and microphone"
7 arch=(i686 x86_64)
8 url=https://launchpad.net/audio-recorder
9 license=(GPLv3)
10 depends=(gstreamer0.10 gstreamer0.10-base gstreamer0.10-base-plugins gstreamer0.10-good-plugins gstreamer0.10-bad-plugins gstreamer0.10-ugly-plugins gtk3 libgnome-media-profiles libpng12 libpulse libxml2 pango pulseaudio pulseaudio-alsa)
11 makedepends=(lynx)
12 install=audio-recorder-from-deb.install
13 conflicts=(audio-recorder-bzr)
14 _filearch=i386
15 [ "${CARCH}" == "x86_64" ] && _filearch=amd64
17 build()
19   _url_prefix="http://ppa.launchpad.net/osmoma/audio-recorder/ubuntu/pool/main"
21   # --- audio-recorder ---
22   _audio_recorder_ubu_ver=0.6.2~oneiric
23   _file="audio-recorder_${_audio_recorder_ubu_ver}_${_filearch}.deb"
24   wget "${_url_prefix}/a/audio-recorder/${_file}"
25   bsdtar -xf "${_file}" data.tar.gz
26   bsdtar -xf data.tar.gz -C "${pkgdir}"
27   rm data.tar.gz
29   _url_prefix="http://archive.ubuntu.com/ubuntu/pool/main"
30   mkdir -p "${pkgdir}"/usr/share/audio-recorder/lib
32   # --- libappindicator3 ---
33   rm libappindicator3-1_*.deb 2>/dev/null || true
34   _url=$(lynx -dump "${_url_prefix}/liba/libappindicator/" | grep -o http.*/libappindicator3-1_.*_${_filearch}\.deb | tail -1)
35   wget "${_url}"
36   bsdtar -xf $(basename "${_url}") data.tar.gz
37   bsdtar -xf data.tar.gz || true
38   rm data.tar.gz
39   install -Dm755 $(find usr/lib -type f | grep libappindicator3.so) "${pkgdir}"/usr/share/audio-recorder/lib/libappindicator3.so.1
40   rm -r usr
42   # --- libdbusmenu-gtk3 ---
43   rm libdbusmenu-gtk3-4_*.deb 2>/dev/null || true
44   _url=$(lynx -dump "${_url_prefix}/libd/libdbusmenu/" | grep -o http.*/libdbusmenu-gtk3-4_.*_${_filearch}\.deb | tail -1)
45   wget "${_url}"
46   bsdtar -xf $(basename "${_url}") data.tar.gz
47   bsdtar -xf data.tar.gz || true
48   rm data.tar.gz
49   install -Dm755 $(find usr/lib -type f | grep libdbusmenu-gtk3.so) "${pkgdir}"/usr/share/audio-recorder/lib/libdbusmenu-gtk3.so.4
50   rm -r usr
52   # --- libdbusmenu-glib ---
53   rm libdbusmenu-glib4_*.deb 2>/dev/null || true
54   _url=$(lynx -dump "${_url_prefix}/libd/libdbusmenu/" | grep -o http.*/libdbusmenu-glib4_.*_${_filearch}\.deb | tail -1)
55   wget "${_url}"
56   bsdtar -xf $(basename "${_url}") data.tar.gz
57   bsdtar -xf data.tar.gz || true
58   rm data.tar.gz
59   install -Dm755 $(find usr/lib -type f | grep libdbusmenu-glib.so) "${pkgdir}"/usr/share/audio-recorder/lib/libdbusmenu-glib.so.4
60   rm -r usr
62   # --- libindicator3 ---
63   rm libindicator3-6_*.deb 2>/dev/null || true
64   _url=$(lynx -dump "${_url_prefix}/libi/libindicator/" | grep -o http.*/libindicator3-6_.*_${_filearch}\.deb | tail -1)
65   wget "${_url}"
66   bsdtar -xf $(basename "${_url}") data.tar.gz
67   bsdtar -xf data.tar.gz || true
68   rm data.tar.gz
69   install -Dm755 $(find usr/lib -type f | grep libindicator3.so) "${pkgdir}"/usr/share/audio-recorder/lib/libindicator3.so.6
70   rm -r usr
72   mkdir -p "${pkgdir}"/usr/bin
73   USRBINFILE="${pkgdir}"/usr/bin/audio_recorder_wrapper.sh
74   echo '#!/bin/bash' > "${USRBINFILE}"
75   echo 'export LD_LIBRARY_PATH="/usr/share/audio-recorder/lib:${LD_LIBRARY_PATH}"' >> "${USRBINFILE}"
76   echo 'exec audio-recorder' >> "${USRBINFILE}"
77   chmod +x "${USRBINFILE}"
78   mkdir -p "${pkgdir}"/usr/share/applications
79   DESKTOPFILE="${pkgdir}"/usr/share/applications/audio-recorder.desktop
80   echo "[Desktop Entry]" > "${DESKTOPFILE}"
81   echo "Name=Audio Recorder" >> "${DESKTOPFILE}"
82   echo "GenericName=Audio Recorder" >> "${DESKTOPFILE}"
83   echo "Comment=Easy-to-use audio recording tool" >> "${DESKTOPFILE}"
84   echo "Exec=audio_recorder_wrapper.sh" >> "${DESKTOPFILE}"
85   echo "Icon=audio-recorder" >> "${DESKTOPFILE}"
86   echo "StartupNotify=true" >> "${DESKTOPFILE}"
87   echo "Terminal=false" >> "${DESKTOPFILE}"
88   echo "Type=Application" >> "${DESKTOPFILE}"
89   echo "Categories=GNOME;AudioVideo;Recorder" >> "${DESKTOPFILE}"