1 # Maintainer: Dan Serban
3 pkgname=audio-recorder-from-deb
6 pkgdesc="Record audio from your soundcard and microphone"
8 url=https://launchpad.net/audio-recorder
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)
12 install=audio-recorder-from-deb.install
13 conflicts=(audio-recorder-bzr)
15 [ "${CARCH}" == "x86_64" ] && _filearch=amd64
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}"
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)
36 bsdtar -xf $(basename "${_url}") data.tar.gz
37 bsdtar -xf data.tar.gz || true
39 install -Dm755 $(find usr/lib -type f | grep libappindicator3.so) "${pkgdir}"/usr/share/audio-recorder/lib/libappindicator3.so.1
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)
46 bsdtar -xf $(basename "${_url}") data.tar.gz
47 bsdtar -xf data.tar.gz || true
49 install -Dm755 $(find usr/lib -type f | grep libdbusmenu-gtk3.so) "${pkgdir}"/usr/share/audio-recorder/lib/libdbusmenu-gtk3.so.4
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)
56 bsdtar -xf $(basename "${_url}") data.tar.gz
57 bsdtar -xf data.tar.gz || true
59 install -Dm755 $(find usr/lib -type f | grep libdbusmenu-glib.so) "${pkgdir}"/usr/share/audio-recorder/lib/libdbusmenu-glib.so.4
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)
66 bsdtar -xf $(basename "${_url}") data.tar.gz
67 bsdtar -xf data.tar.gz || true
69 install -Dm755 $(find usr/lib -type f | grep libindicator3.so) "${pkgdir}"/usr/share/audio-recorder/lib/libindicator3.so.6
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}"