Updating AUR Package

· klm's blog


Original post is here: eklausmeier.goip.de

I use Arch Linux for my machines. There are essentially two types of packages in Arch Linux:

  1. Official ones, in repositories Core, Extra, Multilib, Community, and some other
  2. User provided, in repository AUR (Arch User Repository)

For updating an AUR package I use trizen. But this post is about maintaining an AUR package.

Here I will collect the commands required to update the PKGBUILD, when you maintain an AUR package.

Let's take makedepend as an example. First you check-out the Git repository in read-write mode.

1git clone ssh://aur@aur.archlinux.org/makedepend.git

Edit the PKGBUILD file. Then run

1updpkgsums

to update the checksums in PKGBUILD. This will automatically download the required software from the internet. Then update the .SRCINFO file like this:

1makepkg --printsrcinfo > .SRCINFO

Build the package with makepkg

1time makepkg

Check the package by installing it with pacman:

1pacman -U /var/cache/aur/makedepend-1.0.7-1-x86_64.pkg.tar.zst

Run the corresponding commands, to see whether everything is as expected. Then check-in to Git:

1git status
2git diff
3git commit -m"Updated to version 1.7.0"
4git push