You are not logged in.

#1 2021-07-03 10:18:02

Registered: 2021-07-02
Posts: 1

[REQUEST] simplenote-electron


I was wondering whether you would consider adding simplenote-electron to the Arch community repo?

A PKGBUILD for simplenote-electron-bin is already present in the AUR, but this uses a *.deb as it's source. There's nothing inherently wrong with this, but for a PKGBUILD where the contents are just vomited into /opt/$pkgname/ I feel it makes more sense to use an *.AppImage for the package source as these place less assumptions on system shared object versions. Additionally, The upstream devs support more architectures as AppImages than they do as debs ( … ag/v2.13.0). Hence, switching the package source binary to the *.AppImage would benefit more Arch Linux downstream projects, such as Arch Linux ARM, which typically use PKGBUILDs from Arch Linux x86_64 as a starting point. I've asked the current maintainer of the AUR simplenote-electron-bin PKGBUILD, whether they would consider modifying their PKGBUILD to use the *.AppImage as the package source, but they are reluctant to do so as it would add complexity. However, as this is quite a popular programme, I thought that it might be a good candidate for the Arch community repo.

All comments on the PKGBUILD are welcome. It installs and runs without error on aarch64 & x86_64. I can't vouch for armv7h & i686 architectures as I don't have any of these installations to hand to test, but I can't see any reason why it wouldn't work on these. Some stuff that could potentially be removed is the "Fix Permissions" section in prepare(). The upstream devs were a bit lax with their file/directory permissions in the past. I'm not sure whether this is still the case, but left this in to cover those bases. I've tried building the package from the actual source code, but so far I've failed. I'm guessing it's not that easy to do, otherwise there would probably already be an AUR package that did so, and I wouldn't be here typing this now.

# Maintainer: Feakster <feakster at posteo dot eu>

### Info ###
pkgdesc='The simplest way to keep notes'
arch=('armv7h' 'aarch64' 'i686' 'x86_64')
depends=('gtk3' 'hicolor-icon-theme' 'libxss' 'mesa' 'nss')
    'libnotify: desktop notifications'
    'noto-fonts-emoji: emoji support'
    'ttf-joypixels: emoji support'

### Prepare ###
prepare() {
    ## Change Directory ##
    cd "$srcdir"

    ## Mark AppImage as Executable ##
    chmod a+x $_appimage

    ## Extract AppImage into squashfs-root Directory ##
    ./$_appimage --appimage-extract

    ## Remove Unnecessary Files ##
    rm squashfs-root/{.DirIcon,AppRun,$_pkgname.png}

    ## Fix Permissions ##
    find squashfs-root -type d -exec chmod 0755 {} \;
    find squashfs-root -type f -exec chmod 0644 {} \;
    find squashfs-root -type f -regex '^.+\.so\(\.[0-9]+\)?$' -exec chmod 0755 {} \;
    chmod 0755 squashfs-root/$_pkgname

    ## Modify Desktop File ##
    sed -i \
        -e "s|^Exec=.*|Exec=/usr/bin/$_pkgname %U|" \
        -e '/^TryExec=.*/d' \
        -e '/^X-AppImage-Version=.*/d' \
    echo "TryExec=/opt/$_pkgname/$_pkgname" >> squashfs-root/${_pkgname}.desktop

### Package ###
package() {
    ## Move AppImage Contents to /opt/$_pkgname ##
    install -dm0755 "$pkgdir"/opt/$_pkgname
    cp -RT "$srcdir"/squashfs-root "$pkgdir"/opt/$_pkgname

    ## SUID Sandbox ##
    chmod 4755 "$pkgdir"/opt/$_pkgname/chrome-sandbox

    ## Executable Binary ##
    install -dm0755 "$pkgdir"/usr/bin
    ln -fs \
        /opt/$_pkgname/$_pkgname \

    ## Icons ##
    for SIZE in 16 32 48 64 128 256 512 1024
        install -dm0755 "$pkgdir"/usr/share/icons/hicolor/${SIZE}x${SIZE}/apps
        ln -fs \
            /opt/$_pkgname/usr/share/icons/hicolor/${SIZE}x${SIZE}/apps/${_pkgname}.png \

    ## Desktop Entry ##
    install -dm0755 "$pkgdir"/usr/share/applications
    ln -fs \
        /opt/$_pkgname/${_pkgname}.desktop \

    ## Licenses ##
    install -dm0755 "$pkgdir"/usr/share/licenses/$pkgname
    ln -fs \
        /opt/$_pkgname/LICENSE.electron.txt \
    ln -fs \
        /opt/$_pkgname/LICENSES.chromium.html \


#2 2021-07-03 11:06:36

From: Netherlands, Europe
Registered: 2005-10-04
Posts: 9,326

Re: [REQUEST] simplenote-electron

I feel it makes more sense to use an *.AppImage for the package source as these place less assumptions on system shared object versions.

That is usually considered a big downside for an archlinux package . wrote:

Download an application, make it executable, and run! No need to install. No system libraries or system preferences are altered. Can also run in a sandbox like Firejail

That's great for user installs , not for systemwide installs through a package manager .

Don't try to create a package for an electron application that is based on an appimage, try using system installed electron* . … guidelines should help you to get started.

* If this is succesful, chances are very few architecture related changes are needed.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)


Board footer

Powered by FluxBB