2023-07-29 15:00:29 +02:00
|
|
|
---
|
|
|
|
title: PKGBUILD
|
|
|
|
visible: true
|
|
|
|
---
|
|
|
|
|
|
|
|
[toc]
|
|
|
|
|
|
|
|
_TODO:_ patching
|
|
|
|
https://wiki.archlinux.org/index.php?title=Patching_packages&useskinversion=1
|
|
|
|
|
2023-11-09 20:06:51 +01:00
|
|
|
Get hashsums:
|
2023-07-29 15:00:29 +02:00
|
|
|
|
2023-11-09 20:06:51 +01:00
|
|
|
[shuser]
|
|
|
|
|
|
|
|
```
|
|
|
|
makepkg -g
|
|
|
|
```
|
|
|
|
|
|
|
|
[/shuser]
|
|
|
|
|
|
|
|
Build package:
|
|
|
|
|
|
|
|
[shuser]
|
|
|
|
|
|
|
|
```
|
|
|
|
makepkg
|
|
|
|
```
|
|
|
|
|
|
|
|
[/shuser]
|
2023-07-29 15:00:29 +02:00
|
|
|
|
|
|
|
Build package with AUR dependencies:
|
2023-11-09 20:06:51 +01:00
|
|
|
_Officially, AUR-helpers are not recommended and AUR-dependencies should be downloaded manually_
|
2023-07-29 15:00:29 +02:00
|
|
|
|
2023-11-09 20:06:51 +01:00
|
|
|
[shuser]
|
2023-07-29 15:00:29 +02:00
|
|
|
|
2023-11-09 20:06:51 +01:00
|
|
|
```
|
|
|
|
paru -U
|
|
|
|
```
|
|
|
|
|
|
|
|
[/shuser]
|
|
|
|
|
|
|
|
Afterwards install with `paru -U <package>.tar.zst`
|
|
|
|
|
|
|
|
Install dependencies:
|
|
|
|
|
|
|
|
[shuser]
|
|
|
|
|
|
|
|
```
|
|
|
|
makepkg -s
|
|
|
|
```
|
|
|
|
|
|
|
|
[/shuser]
|
|
|
|
|
|
|
|
Install package after successful build:
|
|
|
|
|
|
|
|
[shuser]
|
|
|
|
|
|
|
|
```
|
|
|
|
makepkg -i
|
|
|
|
```
|
|
|
|
|
|
|
|
[/shuser]
|
2023-07-29 15:00:29 +02:00
|
|
|
|
|
|
|
Just extract package and run `prepare()`
|
|
|
|
`--nobuild`
|
|
|
|
|
|
|
|
Don't extract package and don't run `prepare()`
|
|
|
|
`--noextract`
|
|
|
|
|
2023-11-09 20:06:51 +01:00
|
|
|
Create SRCINFO
|
|
|
|
|
|
|
|
[shuser]
|
|
|
|
|
|
|
|
```
|
|
|
|
makepkg --printsrcinfo > .SRCINFO
|
|
|
|
```
|
|
|
|
|
|
|
|
[/shuser]
|
2023-07-29 15:00:29 +02:00
|
|
|
|
|
|
|
Using paru to build package in clean chroot for testing
|
|
|
|
https://old.reddit.com/r/archlinux/comments/tkeuy5/using_paru_u_chroot_to_build_a_pkgbuild_in_a/
|
|
|
|
|
|
|
|
## Upload new package
|
|
|
|
|
|
|
|
Initialise new repo with `master` branch
|
|
|
|
|
|
|
|
[shuser]
|
|
|
|
|
|
|
|
```
|
|
|
|
git -c init.defaultbranch=master init
|
|
|
|
```
|
|
|
|
|
|
|
|
[/shuser]
|
|
|
|
|
|
|
|
Add remote for AUR and fetch to initialise
|
|
|
|
|
|
|
|
[shuser]
|
|
|
|
|
|
|
|
```
|
|
|
|
git remote add aur ssh://aur@aur.archlinux.org/[PKGBASE].git
|
|
|
|
git fetch aur
|
|
|
|
```
|
|
|
|
|
|
|
|
[/shuser]
|