Template for Building a Package
This template is designed for building packages and can only be used in the obcommunity
repository. If you intend to add a package to obcore
or obextra
, please use the prototype-apkg repository instead. In this guide, we'll use the conky
package as an example, but feel free to replace it with the package you need.
Installation for a New Project
Create a clone
Begin by making a clone of this repository
git clone https://git.obarun.org/pkg/prototype-pkg
Rename the directory to conky and navigate inside it
mv prototype-pkg conky
cd conky
Delete the .git directory
rm -rf .git
Initialize a fresh Git repository
git init --initial-branch=master
Configure the git remote origin
We need to define the remote origin of the repository
git remote add origin ssh://git@git.obarun.org:22023/pkg/obcommunity/conky.git
If you prefer using HTTPS instead of SSH, replace the address with
git remote add origin https://git.obarun.org/pkg/obcommunity/conky.git
trunk
directory
Update the The scripts used to build the project expect to find the PKGBUILD
and necessary files in the trunk directory. Therefore, edit the PKGBUILD
file to fit your project's requirements, along with other files like patches and installation files. Typically, you can find these files on the Archlinux GitLab instance.
Adding, committing and pushing your changes
Check the status of your repository
git status
Next, add your changes
git add .
Commit your changes with an informative message
git commit -m"upgrade: 1.2.6-2"
Finally, push your changes to the remote repository
git push --set-upstream origin master
Make the project publicly accessible
Make sure that the project is publicly accessible. To do so:
Connect to gitlab
obarun instance.
- On the left sidebar, select Search or go to and find your project.
- Select Settings > General.
- Expand Visibility, project features, permissions
- Under Project visibility pick public at drop-down menu.
Triggering the Runner with Tags
The runner
responsible for building the package is activated only when you push tags. You are free to make changes and commit to the repository without triggering the runner, as long as you haven't pushed a tag.
To trigger the runner, create an annotated tag with the following commands
git tag -am"1.2.6-2" 1.2.6-2
Then, push the tag along with your changes using the following command
git push --follow-tags