Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
199 lines (186 sloc) 5.75 KB
name: audacity
adopt-info: audacity
description: |
Audacity® is a free, easy-to-use, multi-track audio editor and recorder for Windows,
Mac OS X, GNU/Linux and other operating systems. The interface is translated into
many languages.
You can use Audacity to:
* Record live audio
* Convert tapes and records into digital recordings or CDs
* Edit WAV, AIFF, FLAC, MP2, MP3 or Ogg Vorbis sound files
* Cut, copy, splice or mix sounds together
* Change the speed or pitch of a recording
* Apply a wide range of other effects to audio recordings
grade: stable
confinement: strict
base: core18
architectures:
- build-on: amd64
- build-on: i386
layout:
/etc/asound.conf:
bind-file: $SNAP/etc/alsa.conf
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/alsa-lib:
bind: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/alsa-lib
/usr/share/alsa/alsa.conf:
bind-file: $SNAP/usr/share/alsa/alsa.conf
/usr/share/audacity:
bind: $SNAP/usr/share/audacity
/usr/share/locale:
bind: $SNAP/usr/share/locale
plugs:
gtk-2-engines:
interface: content
target: $SNAP/lib/gtk-2.0
default-provider: gtk2-common-themes
gtk-2-themes:
interface: content
target: $SNAP/share/themes
default-provider: gtk2-common-themes
icon-themes:
interface: content
target: $SNAP/share/icons
default-provider: gtk-common-themes
environment:
GTK_PATH: $SNAP/lib/gtk-2.0
GTK_DATA_PREFIX: $SNAP
XDG_DATA_DIRS: $SNAP/share:$XDG_DATA_DIRS
apps:
audacity:
command: desktop-launch $SNAP/usr/bin/audacity
desktop: usr/share/applications/audacity.desktop
common-id: org.audacityteam.Audacity
plugs:
- audio-playback
- audio-record
- desktop
- desktop-legacy
- home
- pulseaudio
- removable-media
- unity7
- wayland
- x11
parts:
fix-symlinks:
# REF: https://unix.stackexchange.com/questions/100918/convert-absolute-symlink-to-relative-symlink-with-simple-linux-command
plugin: nil
override-build: |
cat <<EOF > $SNAPCRAFT_PART_INSTALL/fix-symlinks.sh
cd \$SNAPCRAFT_PART_INSTALL
find . -lname '/*' |
while read l ; do
echo ln -sf \$(echo \$(echo \$l | sed 's|/[^/]*|/..|g')\$(readlink \$l) | sed 's/.....//') \$l
done |
sh
EOF
chmod +x $SNAPCRAFT_PART_INSTALL/fix-symlinks.sh
prime:
- -*
desktop-gtk2:
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
source-subdir: gtk
plugin: make
make-parameters: ["FLAVOR=gtk2"]
build-packages:
- libgtk2.0-dev
stage-packages:
- libxkbcommon0 # XKB_CONFIG_ROOT
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libgtk2.0-0
- libgdk-pixbuf2.0-0
- libglib2.0-bin
- libgtk2.0-bin
- unity-gtk2-module
- libappindicator1
- locales-all
- ibus-gtk
- libibus-1.0-5
alsa:
plugin: nil
source: https://github.com/diddledan/snapcraft-alsa.git
override-pull: |
cat > alsa.conf <<EOF
pcm.!default {
type pulse
fallback "sysdefault"
hint {
show on
description "Default ALSA Output (currently PulseAudio Sound Server)"
}
}
ctl.!default {
type pulse
fallback "sysdefault"
}
EOF
override-build: |
install -m644 -D -t $SNAPCRAFT_PART_INSTALL/etc alsa.conf
build-packages:
- libasound2-dev
stage-packages:
- libasound2
- libasound2-plugins
wxwidgets:
after: [fix-symlinks, desktop-gtk2]
source: https://github.com/audacity/wxWidgets.git
plugin: autotools
configflags:
- --prefix=/usr
- --with-gtk
build-environment:
- CFLAGS: -O2 -pipe
- CXXFLAGS: -O2 -pipe
override-build: |
snapcraftctl build
$SNAPCRAFT_STAGE/fix-symlinks.sh
audacity:
after: [desktop-gtk2, alsa, wxwidgets]
plugin: autotools
source: https://github.com/audacity/audacity.git
parse-info: [usr/share/appdata/audacity.appdata.xml]
override-pull: |
snapcraftctl pull
last_committed_tag="$(git describe --tags --abbrev=0)"
last_released_tag="$(snap info $SNAPCRAFT_PROJECT_NAME | awk '$1 == "beta:" { print $2 }')"
# If the latest tag from the upstream project has not been released to
# beta, build that tag instead of master.
if [ "${last_committed_tag}" != "${last_released_tag}" ]; then
git fetch
git checkout "${last_committed_tag}"
snapcraftctl set-version "$(echo "${last_committed_tag}" | sed -E -e "s|^$SNAPCRAFT_PROJECT_NAME-?||i")"
else
snapcraftctl set-version "$(git rev-parse --short HEAD)"
fi
sed -i -E 's|Icon=.*|Icon=${SNAP}/usr/share/icons/hicolor/scalable/apps/audacity.svg|' src/audacity.desktop.in
git show -s --format="#define REV_LONG \"%H\"%n#define REV_TIME \"%cd\"%n" | tee src/RevisionIdent.h
for configure in configure lib-src/FileDialog/configure lib-src/lib-widget-extra/configure lib-src/mod-nyq-bench/configure lib-src/mod-script-pipe/configure; do
sed -i -E 's|wxconfigargs="((\$static_wx_preference \$unicode_preference (\$wxconfigargs )?(\$debug_preference )?)?\$wx_preference)"|wxconfigargs="\1 --prefix=$SNAPCRAFT_STAGE/usr"|' $configure
done
configflags:
- --prefix=/usr
- --disable-dynamic-loading
build-environment:
- CFLAGS: -O2 -pipe
- CXXFLAGS: -O2 -pipe
build-packages:
- cmake
- gettext
- libavformat-dev
- libgtk2.0-dev
- libjack-jackd2-dev
- libmp3lame-dev
- libpulse-dev
- python
stage-packages:
- libavformat57
- libgtk2.0-0
- libice6
- libmp3lame0
- libpulse0
- libsm6
You can’t perform that action at this time.