Skip to content

Commit

Permalink
chore(CONTRIBUTING.md): prettify with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
thunder-coding committed Oct 9, 2022
1 parent 73a0ec5 commit dac2045
Showing 1 changed file with 34 additions and 19 deletions.
53 changes: 34 additions & 19 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ met these conditions:
present ones.

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**

Expand All @@ -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.

**Minimal requirements:**

- Experience with Linux distribution like Debian (preferred), Arch, Fedora, etc.
- Experience with compiling software from source.
- Good shell scripting skills.
Expand Down Expand Up @@ -200,6 +201,7 @@ request with new package. Pay attention to things listed below.
other ways to manipulate content referenced through variables.

Examples:

```
TERMUX_PKG_VERSION=1.0
TERMUX_PKG_SRCURL=https://example.com/archive/package-${TERMUX_PKG_VERSION}.tar.gz
Expand Down Expand Up @@ -231,6 +233,7 @@ request with new package. Pay attention to things listed below.
format internals.

Patch is usually created by

```
diff -uNr sourcedir sourcedir.mod > filename.patch
```
Expand All @@ -239,23 +242,26 @@ request with new package. Pay attention to things listed below.

Software often relies on paths defined by Filesystem Hierarchy Standard:

* `/bin`
* `/etc`
* `/home`
* `/run`
* `/sbin`
* `/tmp`
* `/usr`
* `/var`
- `/bin`
- `/etc`
- `/home`
- `/run`
- `/sbin`
- `/tmp`
- `/usr`
- `/var`

These paths do not exist in Termux and have been replaced by prefixed
equivalents. Termux installation prefix is

```
/data/data/com.termux/files/usr
```

and can be considered as virtual rootfs.

Home directory is stored outside of prefix:

```
/data/data/com.termux/files/home
```
Expand All @@ -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
specify flags like

* `--prefix`
* `--host`
* `--build`
* `--disable-nls`
* `--disable-rpath`
- `--prefix`
- `--host`
- `--build`
- `--disable-nls`
- `--disable-rpath`

and some others.

Additional options to `./configure` can be passed through variable
`TERMUX_PKG_EXTRA_CONFIGURE_ARGS`.

***
---

# Working with packages

Expand All @@ -301,6 +307,7 @@ are exist package recipes available out-of-box.
## Commit guidelines

A commit message should look something like:

```
<commitType>(<repo>/<package>): (Summary of change(s) made/Short description of the change)
Expand All @@ -311,9 +318,10 @@ A commit message should look something like:
```

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).
- `<package>` is the actual name of the package.

- `<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).
- `<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.

Expand Down Expand Up @@ -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.

Examples of good commit messages:

1. ```
upgpkg(main/nodejs): upgrade to v18.2.0
```
Expand Down Expand Up @@ -399,6 +408,7 @@ In order to encourage new contributors and help them contribute to open source,
#### 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.

```sh
gh pr checkout <PR Number>
```
Expand All @@ -422,11 +432,13 @@ In order to encourage new contributors and help them contribute to open source,
```

3. Note down the branch name

```sh
git branch
```

4. Merge the branch manually

```sh
git switch master

Expand Down Expand Up @@ -462,6 +474,7 @@ TERMUX_PKG_DEPENDS="libiconv, ncurses"
```

It can contain some additional variables:

- `TERMUX_PKG_BUILD_IN_SRC=true`

Use this variable if package supports in-tree builds only, for example if
Expand Down Expand Up @@ -570,6 +583,7 @@ Here are few things you may to try:
by patch.

Regenerate patch file, e.g. with:

```
diff -uNr package-1.0 package-1.0.mod > previously-failed-patch-file.patch
```
Expand Down Expand Up @@ -608,7 +622,7 @@ TERMUX_PKG_VERSION=1:5.0.0
```

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.

## Common build issues
Expand All @@ -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
are some tips for trying:

- Set `TERMUX_PKG_BUILD_IN_SRC=true` - applicable to Makefile-only projects.
- Run `./autogen.sh` or `autoreconf -fi` in `termux_step_pre_configure`. This
is applicable to projects that use Autotools.
Expand Down

0 comments on commit dac2045

Please sign in to comment.