summaryrefslogtreecommitdiff
blob: 2cb7f69c2ea66dcd6c44656e1a923411dd3dad68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
==ABOUT==
g-common is a package which is used to install packages which are not in the ebuild format as described in the Package Manager Specification, using "repository drivers" which read non-ebuild repositories and translate them into PMS-style data. Usage of these drivers is transparent and users shouldn't need to deal with these, except to install them.

==USAGE==
If you're using a package manager which has integrated support for g-common, please refer to your package manager's instructions. Package managers known to have g-common integration:
- Portage (you can use layman to add repositories)
If you're not using such a package manager, create a new local overlay, cd into it and execute:
# g-common . sync <driver name> <remote repository uri>
where:
- . is the current directory
- <driver name> is the name of the driver used to sync the repository
- <remote repository uri> is the uri to the repository you'd like to sync
Now you can generate an ebuild tree using:
# g-common . generate-tree

==DEVELOPMENT OF G-COMMON REPOSITORY DRIVERS==
g-common drivers are executables called as the following system call:
# <driver executable> <local overlay> <action> [arguments ...]
where:
- <driver executable> is the driver's executable's name
- <local overlay> is the location where the driver can store data in a dot-prepended directory as needed
- <action> is the action g-common wishes the driver to execute
- [arguments ...] is an optional list of arguments
Requiredly supported actions are:
- sync <uri> : download new data from the remote repository
- generate-metadata : generate any PMS-style files from the previously downloaded files before ebuilds are written by g-common
- list-packages : list all packages in a <category>/<package> <version> format (one package per line)
- list-categories : lists all the names of categories, one per line
- package <category>/<package> <version> : return a key=value list of settings for some package, no quotes, to be parsed by "export" line by line
- any PMS-supported phase (src_prepare, pkg_unpack, pkg_postinst, etc..) : executes whatever needs to happen in that PMS phase. The environment variables are filled according with the package that's being built. Nonzero return code results in a die of the ebuild