Skip to content

Commit f8d8685

Browse files
committed
add CONTRIBUTING.md
Signed-off-by: Mattéo Rossillol‑‑Laruelle <[email protected]>
1 parent 64e3c09 commit f8d8685

File tree

1 file changed

+100
-0
lines changed

1 file changed

+100
-0
lines changed

CONTRIBUTING.md

+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Contributing to Beatussum's Gentoo overlay
2+
3+
First, thanks for wanting to contribute to my overlay.
4+
5+
## Table of contents
6+
7+
- [Table of contents](#table-of-contents)
8+
- [How to contribute?](#how-to-contribute)
9+
- [General guidelines](#general-guidelines)
10+
- [What is specific to this overlay](#what-is-specific-to-this-overlay)
11+
- [Documentation files](#documentation-files)
12+
- [EAPI](#eapi)
13+
- [Ebuilds without test](#ebuilds-without-test)
14+
- [Extra variables](#extra-variables)
15+
- [Keywords](#keywords)
16+
- [Live ebuilds](#live-ebuilds)
17+
- [Metadata file](#metadata-file)
18+
- [Non-binary packages](#non-binary-packages)
19+
- [Package removal](#package-removal)
20+
- [Patch files](#patch-files)
21+
- [Prebuilt packages](#prebuilt-packages)
22+
- [Version bumps](#version-bumps)
23+
24+
## How to contribute?
25+
26+
### General guidelines
27+
28+
This overlay respects the same rules and coding styles as [the main Gentoo repository](https://github.com/gentoo/gentoo/).
29+
It is recommended therefore to consult the section _Maintain ebuilds_ of [the page _Contribute to Gentoo_](https://www.gentoo.org/get-involved/contribute/); in particular, the following pages must be read
30+
31+
- [Basic guide to writing ebuilds](https://wiki.gentoo.org/wiki/Basic_guide_to_write_Gentoo_Ebuilds),
32+
- and [The Gentoo Developer Manual](https://devmanual.gentoo.org/).
33+
34+
### What is specific to this overlay?
35+
36+
#### Documentation files
37+
38+
All documentation files should be included.
39+
If some files need additionnal build process, they should be added only when the `doc` USE flag enabled.
40+
41+
#### EAPI
42+
43+
Only `EAPI=8` is allowed.
44+
45+
#### Ebuilds without test
46+
47+
If an ebuild does not have test, it should specify `RESTRICT="test"`.
48+
49+
#### Extra variables
50+
51+
Variable should be written using [snake case](https://en.wikipedia.org/wiki/Snake_case).
52+
53+
Extra variable defined as global variable should be uppercase.
54+
If this variable _override_ an other variable among [these ones](https://devmanual.gentoo.org/ebuild-writing/variables/), it should be prefixed by `MY_`, e.g. `MY_PN="${PN^^}"`.
55+
56+
Local variable should be lowercase and be declared as `local`, e.g. `local my_local_variable`.
57+
58+
#### Keywords
59+
60+
Only [AMD64](https://fr.wikipedia.org/wiki/AMD64) is supported in this overlay, i.e. `KEYWORDS="~amd64"` or `RESTRICT="-* ~amd64"`.
61+
62+
#### Live ebuilds
63+
64+
If you want to provide a live version of an ebuild, it is recommended to have the same ebuild for the latest version and the live one with the following pattern:
65+
66+
```ebuild
67+
if [[ "${PV}" = 9999 ]]; then
68+
inherit git-r3
69+
EGIT_REPO_URI="<git URI>"
70+
else
71+
SRC_URI="<src URI>"
72+
KEYWORDS="~amd64"
73+
fi
74+
```
75+
76+
`9999` must be replaced by the appropriate format, e.g. the live version of an ebuild with the version `19700101` should be `99999999`.
77+
78+
#### Metadata file
79+
80+
The metadata file should provide as many elements as possible, in particular, `<upstream>` should be as complete as possible.
81+
82+
#### Non-binary packages
83+
84+
If a package does not include binary files, the ebuild should include `RESTRICT="binchecks test"` and `<stabilize-allarches/>` in the metadata.xml file.
85+
86+
#### Package removal
87+
88+
If a package need to be removed, it has to be masked **15 days** before.
89+
90+
#### Patch files
91+
92+
Patch files should be created with `git format-patch`.
93+
94+
#### Prebuilt packages
95+
96+
Prebuilt packages should include in their ebuild `QA_PREBUILT` and, according to the redistribution rules, `RESTRICT="bindist mirror"`.
97+
98+
#### Version bumps
99+
100+
Versions bumps or rebumps should replace the previous version for the current `SLOT`.

0 commit comments

Comments
 (0)