Arch PKGBUILD for desktop app

For other Arch Linux users out there: I created a PKGBUILD file for the desktop app, based on a generic AppImage one I found on the 'net. If I feel brave enough I might even upload it to the Arch User Repository. :slight_smile:

A real build should probably extract the contents to something like /usr/lib/supernotes. Also, I could not find a license text so I took the terms from the website. @Supernotes do you have a plain text license?

Unfortunately, the app window decorations feel very out of place on KDE, but that might be something only the Supernotes devs can do something about. :wink:

pkgdesc="Web-based note taking app"
depends=('zlib' 'hicolor-icon-theme')

prepare() {
    chmod +x "${_appimage}"
    ./"${_appimage}" --appimage-extract

build() {
    # Adjust .desktop so it will work outside of AppImage container
    sed -i -E "s|Exec=AppRun|Exec=env DESKTOPINTEGRATION=false /usr/bin/${_pkgname}|"\
    # Fix permissions; .AppImage permissions are 700 for all directories
    chmod -R a-x+rX squashfs-root/usr

package() {
    # AppImage
    install -Dm755 "${srcdir}/${_appimage}" "${pkgdir}/opt/${pkgname}/${pkgname}.AppImage"
    install -Dm644 "${srcdir}/${_terms}" "${pkgdir}/opt/${pkgname}/LICENSE.html"

    # Desktop file
    install -Dm644 "${srcdir}/squashfs-root/${_pkgname}.desktop"\

    # Icon images
    install -dm755 "${pkgdir}/usr/share/"
    cp -a "${srcdir}/squashfs-root/usr/share/icons" "${pkgdir}/usr/share/"

    # Symlink executable
    install -dm755 "${pkgdir}/usr/bin"
    ln -s "/opt/${pkgname}/${pkgname}.AppImage" "${pkgdir}/usr/bin/${_pkgname}"

    # Symlink license
    install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}/"
    ln -s "/opt/$pkgname/LICENSE.html" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.html"

Hey @jcassee, this looks great! Thanks for putting this out there. For license purposes it’s fine to just put “copyright Supernotes, all rights reserved”.

We can definitely look into adding better support for Arch / KDE out of the box, at the moment we are only testing against Ubuntu.

Would be great to know if we have any other Arch users out there who’d be interested in this!

1 Like

Thanks @jcassee for the PKGBUILD I just updated the version and hashes and it worked perfectly.