Flatpak vs portable tarball?

There is a lot of information about what are the pros and cons of using Flatpak vs AUR or Flatpak vs other containerized packages… but I haven’t been able to find criteria to help me decide if I should install a package using a tarball file or a flatpak package.

In particular, I would like to install REAPER, which is not free software, and they offer a portable tarball (already compiled) on their website; I’ve also found an unverified Flatpak.

What are the pros and cons in this case? Is there any already written info on this?
Thanks

Welcome to the community @Gorka! :waving_hand::partying_face: :enos_flag:

Unfortunately it doesn’t appear an AUR entry exists for Reaper. If you’re installing from tarball, the correct way to do that would be to create a PKGBUILD file (see below) and install it using the Arch system tools (makepkg and pacman). This would ensure that the files installed are tracked by the system, so they’re managed.

If you circumvent that system, you risk littering your system with untracked files.

If you’re not up for creating a PKGBUILD file, then I would suggest Flatpack as the better of the remaining options.

Here’s a PKGBUILD file that successfully packages the installation in my testing, but I’ve not actually taken it to the install step (I’d rather do that in a VM which I haven’t got available at the moment). You might consider it a starting point. The dependencies are where I’m rather unsure.

### PKGBUILD

pkgname=reaper
pkgver=7.46
pkgrel=1
pkgdesc="Digital Audio Workstation (DAW) by Cockos"
arch=('x86_64')
url="https://www.reaper.fm/"
license=('custom')
depends=('glibc' 'alsa-lib' 'libxcb' 'libx11' 'freetype2' 'libpng' 'zlib')
source=("https://www.reaper.fm/files/7.x/reaper${pkgver//./}_linux_x86_64.tar.xz" "reaper.desktop")
sha256sums=('f17132ec85e38f0ed66cfc69c453f7d22bcc822d3f8966ed963b98090d81cc32' 'SKIP')

package() {
  cd "${srcdir}/reaper_linux_x86_64"

  # Install to /opt/reaper
  install -d "${pkgdir}/opt/reaper"
  cp -a * "${pkgdir}/opt/reaper/"

  # Symlink for the main binary
  install -d "${pkgdir}/usr/bin"
  ln -s /opt/reaper/reaper "${pkgdir}/usr/bin/reaper"

  # Desktop entry (uses our supplied desktop file)
  install -Dm644 "${srcdir}/reaper.desktop" "${pkgdir}/usr/share/applications/reaper.desktop"

  # License
  install -Dm644 "${srcdir}/reaper_linux_x86_64/REAPER/EULA.txt" "${pkgdir}/usr/share/licenses/${pkgname}/EULA.txt"
}

Create this file too and put it next to the PKGBUILD:
### reaper.desktop

[Desktop Entry]
Name=REAPER
GenericName=Digital Audio Workstation
Comment=Audio recording and editing DAW
Exec=/opt/reaper/reaper %f
Icon=reaper
Terminal=false
Type=Application
Categories=AudioVideo;Audio;Sequencer;Midi;Music;

To install that, from the directory you have PKGBUILD and reaper.desktop, run this command:

makepkg -sri
1 Like

True, but fortunately a repo package does exist:

https://archlinux.org/packages/extra/x86_64/reaper/

3 Likes

Woops :sweat_smile:

I didn’t bother to check, figuring it was closed source and therefore probably not there.

1 Like

Arch doesn’t seem to take a puritan stance against non-free proprietary software, if I am not mistaken.

2 Likes

Thanks!

An extra wooops for me :stuck_out_tongue:

1 Like

Thank you!! :slight_smile:
Also, a lot of thanks for the PKGBUILD, although it seems that I won’t be using it hehe
I’m trying to wrap my head around the possible installation methods in EndeavourOS/Arch.

I understand that there are native packages, which are distro-specific binary files that usually have dependencies, and self-contained packages like AppImage and Flatpak, which carry (almost) all their dependencies with them.

What are these binary tarballs, like the downloadable one in the Reaper website, which is presumably for a lot of distros? Does it mean that it contains all (or almost all) of its dependencies? Is file structure the only difference between distro-specific packages, and that the reason why the Reaper tarball can be converted to a distro-specific package? Is it correct to also call the binary tarball ‘package’?