Maintaining AppImage AUR Packages
Published: 17 July 2023
These are my general notes on maintaining an AUR package which installs an AppImage on an Arch Linux device.
Creating an AUR package based on an Appimage
I use Dave Parrish’s Dave Parrish’s Better PKGBUILD Template for AppImage Packages to create AUR packages for Appimages.
Downloading and Updating a Package
Firstly, download the AUR Package if you haven’t already.
git clone ssh://aur@aur.archlinux.org/<package>.git
If you already have the AUR Package downloaded, make sure it is up to date with a git pull
.
Update the PKGBUILD file
Update the pkgver
to the software version number which you are trying to install
When a new version of the package is released, the pkgrel
value must be reset to 1. With any changes to the PKGBUILD file after this, this value should be incremented by 1.
Verify and add the SHA256SUM
Before a package is installed, a checksum is performed to check for errors. If the checksum is not provided from the author, download the new version of the software and check its SHA256SUM value, and add it to the PKGBUILD. shasum -a 256 <file>
If using vim, you can run the following command to insert the SHASUM into the current line:
:r!shasum -a 256 <file>
Generate the .SRCINFO file
Generate the package metadata
makepkg --printsrcinfo > .SRCINFO
Change origin
If you need to change the package origin, you can do so as follows
git remote remove origin
git remote add origin ssh://aur@aur.archlinux.org/package.git
Finalise Package Update
Once you have finished updating the PKGBUILD, you can now sync dependencies, prepare the package and install it with makepkg -si
After successfully building and installing your package, you can remove the package files, commit and push your changes.
rm -rf src pkg *.AppImage *.pkg.tar.zst
git commit -m "Updated to v1.0.0"
git push