This guide provides a step-by-step tutorial on how to create, build, and upload a package to the Arch User Repository (AUR). Follow along to learn the entire process from setting up SSH keys to publishing your package.
Step 1: Set Up SSH Keys for AUR Access
Before you can push to the AUR, you need to set up SSH authentication.
|
|
Copy the output and add it to your AUR account under the SSH key section.
To verify SSH connectivity:
|
|
If successful, you should see a welcome message.
Step 2: Create and Structure Your AUR Package
Now, create a directory for your package:
|
|
Create the PKGBUILD
file:
|
|
Edit PKGBUILD
with the following template:
|
|
Step 3: Generate .SRCINFO
Generate the .SRCINFO
file:
|
|
Step 4: Initialize Git and Push to AUR
Now, initialize the Git repository and push the package to AUR.
|
|
Step 5: Install and Test the AUR Package
Once your package is uploaded, install it using an AUR helper like yay
or paru
:
|
|
Or manually clone and build:
|
|
Additional Notes
- If you update your package, bump the
pkgver
, regenerate.SRCINFO
, commit, and push the changes. - Use
makepkg -cf
to test builds before uploading. - Ensure all dependencies are correctly listed.