chore(CONTRIBUTING.md): prettify with prettier

This commit is contained in:
Yaksh Bariya 2022-10-09 07:42:17 +05:30
parent 23f5e3e9b7
commit 9e87952228
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
1 changed files with 34 additions and 19 deletions

View File

@ -124,7 +124,7 @@ met these conditions:
present ones. present ones.
The more useless packages in repositories, the less overall packaging and The more useless packages in repositories, the less overall packaging and
service quality - *remembering that our resources are limited?* service quality - _remembering that our resources are limited?_
- **Not serving hacking, phishing, spamming, spying, ddos functionality** - **Not serving hacking, phishing, spamming, spying, ddos functionality**
@ -148,6 +148,7 @@ provide some help with fixing your pull request or give some recommendations,
but that DOES NOT mean they will do all work instead of you. but that DOES NOT mean they will do all work instead of you.
**Minimal requirements:** **Minimal requirements:**
- Experience with Linux distribution like Debian (preferred), Arch, Fedora, etc. - Experience with Linux distribution like Debian (preferred), Arch, Fedora, etc.
- Experience with compiling software from source. - Experience with compiling software from source.
- Good shell scripting skills. - Good shell scripting skills.
@ -200,6 +201,7 @@ request with new package. Pay attention to things listed below.
other ways to manipulate content referenced through variables. other ways to manipulate content referenced through variables.
Examples: Examples:
``` ```
TERMUX_PKG_VERSION=1.0 TERMUX_PKG_VERSION=1.0
TERMUX_PKG_SRCURL=https://example.com/archive/package-${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SRCURL=https://example.com/archive/package-${TERMUX_PKG_VERSION}.tar.gz
@ -231,6 +233,7 @@ request with new package. Pay attention to things listed below.
format internals. format internals.
Patch is usually created by Patch is usually created by
``` ```
diff -uNr sourcedir sourcedir.mod > filename.patch diff -uNr sourcedir sourcedir.mod > filename.patch
``` ```
@ -239,23 +242,26 @@ request with new package. Pay attention to things listed below.
Software often relies on paths defined by Filesystem Hierarchy Standard: Software often relies on paths defined by Filesystem Hierarchy Standard:
* `/bin` - `/bin`
* `/etc` - `/etc`
* `/home` - `/home`
* `/run` - `/run`
* `/sbin` - `/sbin`
* `/tmp` - `/tmp`
* `/usr` - `/usr`
* `/var` - `/var`
These paths do not exist in Termux and have been replaced by prefixed These paths do not exist in Termux and have been replaced by prefixed
equivalents. Termux installation prefix is equivalents. Termux installation prefix is
``` ```
/data/data/com.termux/files/usr /data/data/com.termux/files/usr
``` ```
and can be considered as virtual rootfs. and can be considered as virtual rootfs.
Home directory is stored outside of prefix: Home directory is stored outside of prefix:
``` ```
/data/data/com.termux/files/home /data/data/com.termux/files/home
``` ```
@ -278,18 +284,18 @@ request with new package. Pay attention to things listed below.
package builds using GNU Autotools. Therefore you do not need to package builds using GNU Autotools. Therefore you do not need to
specify flags like specify flags like
* `--prefix` - `--prefix`
* `--host` - `--host`
* `--build` - `--build`
* `--disable-nls` - `--disable-nls`
* `--disable-rpath` - `--disable-rpath`
and some others. and some others.
Additional options to `./configure` can be passed through variable Additional options to `./configure` can be passed through variable
`TERMUX_PKG_EXTRA_CONFIGURE_ARGS`. `TERMUX_PKG_EXTRA_CONFIGURE_ARGS`.
*** ---
# Working with packages # Working with packages
@ -301,6 +307,7 @@ are exist package recipes available out-of-box.
## Commit guidelines ## Commit guidelines
A commit message should look something like: A commit message should look something like:
``` ```
<commitType>(<repo>/<package>): (Summary of change(s) made/Short description of the change) <commitType>(<repo>/<package>): (Summary of change(s) made/Short description of the change)
@ -311,9 +318,10 @@ A commit message should look something like:
``` ```
Where: Where:
- `<repo>` may be one of `main`, `root` or `x11`. It is the repository in which the package resides.
Other definition for this property can be done as the name property of the package directory as defined in `repo.json` file after removing the 'termux-' prefix (if any). - `<repo>` may be one of `main`, `root` or `x11`. It is the repository in which the package resides.
- `<package>` is the actual name of the package. Other definition for this property can be done as the name property of the package directory as defined in `repo.json` file after removing the 'termux-' prefix (if any).
- `<package>` is the actual name of the package.
Any line in the commit **should not exceed 80 characters**. In case it does, consider using different wordings or language style which better summarizes the changes done. Any line in the commit **should not exceed 80 characters**. In case it does, consider using different wordings or language style which better summarizes the changes done.
@ -341,6 +349,7 @@ Any line in the commit **should not exceed 80 characters**. In case it does, con
- `ci(action_file_without_extension)`: Any change that affects GitHub Actions yaml file(s) and/or scripts used exclusively by it. - `ci(action_file_without_extension)`: Any change that affects GitHub Actions yaml file(s) and/or scripts used exclusively by it.
Examples of good commit messages: Examples of good commit messages:
1. ``` 1. ```
upgpkg(main/nodejs): upgrade to v18.2.0 upgpkg(main/nodejs): upgrade to v18.2.0
``` ```
@ -399,6 +408,7 @@ In order to encourage new contributors and help them contribute to open source,
#### Notes for merging PRs from command line #### Notes for merging PRs from command line
1. It is recommended to use the [GitHub CLI (`gh`)](https://cli.github.com) in order to fetch the contributor's branch. 1. It is recommended to use the [GitHub CLI (`gh`)](https://cli.github.com) in order to fetch the contributor's branch.
```sh ```sh
gh pr checkout <PR Number> gh pr checkout <PR Number>
``` ```
@ -422,11 +432,13 @@ In order to encourage new contributors and help them contribute to open source,
``` ```
3. Note down the branch name 3. Note down the branch name
```sh ```sh
git branch git branch
``` ```
4. Merge the branch manually 4. Merge the branch manually
```sh ```sh
git switch master git switch master
@ -462,6 +474,7 @@ TERMUX_PKG_DEPENDS="libiconv, ncurses"
``` ```
It can contain some additional variables: It can contain some additional variables:
- `TERMUX_PKG_BUILD_IN_SRC=true` - `TERMUX_PKG_BUILD_IN_SRC=true`
Use this variable if package supports in-tree builds only, for example if Use this variable if package supports in-tree builds only, for example if
@ -570,6 +583,7 @@ Here are few things you may to try:
by patch. by patch.
Regenerate patch file, e.g. with: Regenerate patch file, e.g. with:
``` ```
diff -uNr package-1.0 package-1.0.mod > previously-failed-patch-file.patch diff -uNr package-1.0 package-1.0.mod > previously-failed-patch-file.patch
``` ```
@ -608,7 +622,7 @@ TERMUX_PKG_VERSION=1:5.0.0
``` ```
Note that if you are not @termux collaborator, pull request must contain a Note that if you are not @termux collaborator, pull request must contain a
*description* why you are submitting a package downgrade. All pull requests _description_ why you are submitting a package downgrade. All pull requests
which submit package downgrading without any serious reason will be rejected. which submit package downgrading without any serious reason will be rejected.
## Common build issues ## Common build issues
@ -619,6 +633,7 @@ No files in package. Maybe you need to run autoreconf -fi before configuring?
Means that build system cannot find the Makefile. Depending on project, there Means that build system cannot find the Makefile. Depending on project, there
are some tips for trying: are some tips for trying:
- Set `TERMUX_PKG_BUILD_IN_SRC=true` - applicable to Makefile-only projects. - Set `TERMUX_PKG_BUILD_IN_SRC=true` - applicable to Makefile-only projects.
- Run `./autogen.sh` or `autoreconf -fi` in `termux_step_pre_configure`. This - Run `./autogen.sh` or `autoreconf -fi` in `termux_step_pre_configure`. This
is applicable to projects that use Autotools. is applicable to projects that use Autotools.