restructure
This commit is contained in:
parent
ef7661245b
commit
598a10bc28
182 changed files with 342 additions and 336 deletions
|
@ -0,0 +1,51 @@
|
|||
---
|
||||
arch-wiki: https://wiki.archlinux.org/title/PKGBUILD
|
||||
obj: concept
|
||||
---
|
||||
|
||||
# PKGBUILD
|
||||
|
||||
A `PKGBUILD` is a shell script containing the build information required by [Arch Linux](../../../linux/Arch%20Linux.md) packages. [Arch Wiki](https://wiki.archlinux.org/title/PKGBUILD)
|
||||
|
||||
Packages in [Arch Linux](../../../linux/Arch%20Linux.md) are built using the [makepkg](makepkg.md) utility. When [makepkg](makepkg.md) is run, it searches for a PKGBUILD file in the current directory and follows the instructions therein to either compile or otherwise acquire the files to build a package archive (pkgname.pkg.tar.zst). The resulting package contains binary files and installation instructions, readily installable with [pacman](Pacman.md).
|
||||
|
||||
Mandatory variables are `pkgname`, `pkgver`, `pkgrel`, and `arch`. `license` is not strictly necessary to build a package, but is recommended for any PKGBUILD shared with others, as [makepkg](makepkg.md) will produce a warning if not present.
|
||||
|
||||
# Example
|
||||
PKGBUILD:
|
||||
```sh
|
||||
# Maintainer: User <mail>
|
||||
pkgname=NAME
|
||||
pkgver=VERSION
|
||||
pkgrel=1
|
||||
pkgdesc="DESCRIPTION"
|
||||
arch=('x86_64')
|
||||
url=URL
|
||||
license=("MIT")
|
||||
depends=("git")
|
||||
makedepends=("git")
|
||||
source=("FILE_NAME::FILE_URL")
|
||||
sha256sums=("SKIP")
|
||||
|
||||
prepare() {
|
||||
|
||||
}
|
||||
|
||||
pkver() {
|
||||
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$pkgname"
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname"
|
||||
install -Dm755 ./app "$pkgdir/usr/bin/app"
|
||||
}
|
||||
```
|
|
@ -0,0 +1,61 @@
|
|||
---
|
||||
obj: application
|
||||
---
|
||||
# Pacman
|
||||
Pacman is the default [Arch Linux](../../../linux/Arch%20Linux.md) Package Manager
|
||||
|
||||
## Usage
|
||||
Search for a package:
|
||||
```shell
|
||||
pacman -Ss <package>...
|
||||
```
|
||||
|
||||
Update the local package base and upgrade all out-of-date packages:
|
||||
```shell
|
||||
pacman -Suy
|
||||
```
|
||||
|
||||
Install a package:
|
||||
```shell
|
||||
pacman -S <package>...
|
||||
```
|
||||
|
||||
Uninstall a package:
|
||||
```shell
|
||||
pacman -R <package>...
|
||||
```
|
||||
|
||||
Uninstall a package and its depedencies, removing all new orphans:
|
||||
```shell
|
||||
pacman -Rcs <package>...
|
||||
```
|
||||
|
||||
Get information about package:
|
||||
```shell
|
||||
pacman -Si <package>...
|
||||
```
|
||||
|
||||
Install a package from local package file (.tar.xz):
|
||||
```shell
|
||||
pacman -U <file>
|
||||
```
|
||||
|
||||
List explicitly installed packages:
|
||||
```shell
|
||||
pacman -Qe
|
||||
```
|
||||
|
||||
List orphan packages (installed as dependencies and not required anymore):
|
||||
```shell
|
||||
pacman -Qdt
|
||||
```
|
||||
|
||||
List installed packages and versions:
|
||||
```shell
|
||||
pacman -Q
|
||||
```
|
||||
|
||||
Empty the entire pacman cache:
|
||||
```shell
|
||||
pacman -Scc
|
||||
```
|
|
@ -0,0 +1,59 @@
|
|||
---
|
||||
arch-wiki: https://wiki.archlinux.org/title/Makepkg
|
||||
obj: application
|
||||
---
|
||||
|
||||
# makepkg
|
||||
makepkg is a tool for creating [pacman](arch-linux/Pacman.md) packages based on [PKGBUILD](arch-linux/PKGBUILD.md) files.
|
||||
|
||||
## Usage
|
||||
Make a package:
|
||||
```shell
|
||||
makepkg
|
||||
```
|
||||
|
||||
Make a package and install its dependencies:
|
||||
```shell
|
||||
makepkg --syncdeps
|
||||
```
|
||||
|
||||
Make a package, install its dependencies then install it to the system:
|
||||
```shell
|
||||
makepkg --syncdeps --install
|
||||
```
|
||||
|
||||
Make a package, but skip checking the source's hashes:
|
||||
```shell
|
||||
makepkg --skipchecksums
|
||||
```
|
||||
|
||||
Clean up work directories after a successful build:
|
||||
```shell
|
||||
makepkg --clean
|
||||
```
|
||||
|
||||
Verify the hashes of the sources:
|
||||
```shell
|
||||
makepkg --verifysource
|
||||
```
|
||||
|
||||
## Options
|
||||
| Option | Description |
|
||||
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `-A, --ignorearch` | Ignore a missing or incomplete arch field in the build script |
|
||||
| `-c, --clean` | Clean up leftover work files and directories after a successful build |
|
||||
| `-d, --nodeps` | Do not perform any dependency checks. This will let you override and ignore any dependencies required. There is a good chance this option will break the build process if all of the dependencies are not installed |
|
||||
| `-e, --noextract` | Do not extract source files or run the prepare() function (if present); use whatever source already exists in the $srcdir/ directory. This is handy if you want to go into $srcdir/ and manually patch or tweak code, then make a package out of the result. Keep in mind that creating a patch may be a better solution to allow others to use your [PKGBUILD](arch-linux/PKGBUILD.md). |
|
||||
| `--skipinteg` | Do not perform any integrity checks (checksum and [PGP](../../../cryptography/GPG.md)) on source files |
|
||||
| `--skipchecksums` | Do not verify checksums of source files |
|
||||
| `--skippgpcheck` | Do not verify [PGP](../../../cryptography/GPG.md) signatures of source files |
|
||||
| `-i, --install` | Install or upgrade the package after a successful build using [pacman](arch-linux/Pacman.md) |
|
||||
| `-o, --nobuild` | Download and extract files, run the prepare() function, but do not build them. Useful with the `--noextract` option if you wish to tweak the files in $srcdir/ before building |
|
||||
| `-r, --rmdeps` | Upon successful build, remove any dependencies installed by makepkg during dependency auto-resolution and installation |
|
||||
| `-s, --syncdeps` | Install missing dependencies using [pacman](arch-linux/Pacman.md). When build-time or run-time dependencies are not found, [pacman](arch-linux/Pacman.md) will try to resolve them. If successful, the missing packages will be downloaded and installed |
|
||||
| `-C, --cleanbuild` | Remove the $srcdir before building the package |
|
||||
| `--noarchive` | Do not create the archive at the end of the build process. This can be useful to test the package() function or if your target distribution does not use [pacman](arch-linux/Pacman.md) |
|
||||
| `--sign` | Sign the resulting package with [gpg](../../../cryptography/GPG.md) |
|
||||
| `--nosign` | Do not create a signature for the built package |
|
||||
| `--key <key>` | Specify a key to use when signing packages |
|
||||
| `--noconfirm` | (Passed to [pacman](arch-linux/Pacman.md)) Prevent [pacman](arch-linux/Pacman.md) from waiting for user input before proceeding with operations |
|
Loading…
Add table
Add a link
Reference in a new issue