ahriman.core.support.pkgbuild package
Submodules
ahriman.core.support.pkgbuild.keyring_generator module
- class KeyringGenerator(database: SQLite, sign: GPG, repository_id: RepositoryId, configuration: Configuration, section: str)
Bases:
PkgbuildGenerator
generator for keyring PKGBUILD
- name
repository name
- Type:
str
- packagers
list of packagers PGP keys
- Type:
list[str]
- pkgbuild_license
keyring package license
- Type:
list[str]
- pkgbuild_pkgdesc
keyring package description
- Type:
str
- pkgbuild_pkgname
keyring package name
- Type:
str
- pkgbuild_url
keyring package home page
- Type:
str
- revoked
list of revoked PGP keys
- Type:
list[str]
- trusted
lif of trusted PGP keys
- Type:
list[str]
default constructor
- Parameters:
database (SQLite) – database instance
sign (GPG) – GPG wrapper instance
repository_id (RepositoryId) – repository unique identifier
configuration (Configuration) – configuration instance
section (str) – settings section name
- install() str | None
content of the .install functions
- Returns:
content of the .install functions if any
- Return type:
str | None
- package() str
package function generator
- Returns:
package() function for PKGBUILD
- Return type:
str
- sources() dict[str, Callable[[Path], None]]
return list of sources for the package
- Returns:
map of source identifier (e.g. filename) to its generator function
- Return type:
dict[str, Callable[[Path], None]]
- property license: list[str]
package licenses list
- Returns:
package licenses as PKGBUILD property
- Return type:
list[str]
- property pkgdesc: str
package description
- Returns:
package description as PKGBUILD property
- Return type:
str
- property pkgname: str
package name
- Returns:
package name as PKGBUILD property
- Return type:
str
- property url: str
package upstream url
- Returns:
package upstream url as PKGBUILD property
- Return type:
str
ahriman.core.support.pkgbuild.mirrorlist_generator module
- class MirrorlistGenerator(repository_id: RepositoryId, configuration: Configuration, section: str)
Bases:
PkgbuildGenerator
generator for mirrorlist PKGBUILD
- path
path to mirrorlist relative to /
- Type:
Path
- pkgbuild_license
mirrorlist package license
- Type:
list[str]
- pkgbuild_pkgdesc
mirrorlist package description
- Type:
str
- pkgbuild_pkgname
mirrorlist package name
- Type:
str
- pkgbuild_url
mirrorlist package home page
- Type:
str
- servers
list of mirror servers
- Type:
list[str]
default constructor
- Parameters:
repository_id (RepositoryId) – repository unique identifier
configuration (Configuration) – configuration instance
section (str) – settings section name
- package() str
package function generator
- Returns:
package() function for PKGBUILD
- Return type:
str
- patches() list[PkgbuildPatch]
list of additional PKGBUILD properties
- Returns:
list of patches which generate PKGBUILD content
- Return type:
list[PkgbuildPatch]
- sources() dict[str, Callable[[Path], None]]
return list of sources for the package
- Returns:
map of source identifier (e.g. filename) to its generator function
- Return type:
dict[str, Callable[[Path], None]]
- property license: list[str]
package licenses list
- Returns:
package licenses as PKGBUILD property
- Return type:
list[str]
- property pkgdesc: str
package description
- Returns:
package description as PKGBUILD property
- Return type:
str
- property pkgname: str
package name
- Returns:
package name as PKGBUILD property
- Return type:
str
- property url: str
package upstream url
- Returns:
package upstream url as PKGBUILD property
- Return type:
str
ahriman.core.support.pkgbuild.pkgbuild_generator module
- class PkgbuildGenerator
Bases:
object
main class for generating PKGBUILDs
- PKGBUILD_STATIC_PROPERTIES
(class attribute) list of default pkgbuild static properties
- Type:
list[PkgbuildPatch]
- install() str | None
content of the .install functions
- Returns:
content of the .install functions if any
- Return type:
str | None
- package() str
package function generator
- Returns:
package() function for PKGBUILD
- Return type:
str
- Raises:
NotImplementedError – not implemented method
- patches() list[PkgbuildPatch]
list of additional PKGBUILD properties
- Returns:
list of patches which generate PKGBUILD content
- Return type:
list[PkgbuildPatch]
- sources() dict[str, Callable[[Path], None]]
return list of sources for the package
- Returns:
map of source identifier (e.g. filename) to its generator function
- Return type:
dict[str, Callable[[Path], None]]
- write_install(source_dir: Path) list[PkgbuildPatch]
generate content of install file
- Parameters:
source_dir (Path) – path to directory in which sources must be generated
- Returns:
patch for the pkgbuild if install file exists and empty list otherwise
- Return type:
list[PkgbuildPatch]
- write_pkgbuild(source_dir: Path) None
generate PKGBUILD content to the specified path
- Parameters:
source_dir (Path) – path to directory in which sources must be generated
- write_sources(source_dir: Path) list[PkgbuildPatch]
write sources and returns valid PKGBUILD properties for them
- Parameters:
source_dir (Path) – path to directory in which sources must be generated
- Returns:
list of patches to be applied to the PKGBUILD
- Return type:
list[PkgbuildPatch]
- property license: list[str]
package licenses list
- Returns:
package licenses as PKGBUILD property
- Return type:
list[str]
- property pkgdesc: str
package description
- Returns:
package description as PKGBUILD property
- Return type:
str
- Raises:
NotImplementedError – not implemented method
- property pkgname: str
package name
- Returns:
package name as PKGBUILD property
- Return type:
str
- Raises:
NotImplementedError – not implemented method
- property pkgver: str
package version
- Returns:
package version as PKGBUILD property
- Return type:
str
- property url: str
package upstream url
- Returns:
package upstream url as PKGBUILD property
- Return type:
str