Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More build tips #1013

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/src/build_tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,21 @@ In addition to the standard Unix tools, in the build environment there are some
```sh
update_configure_scripts --reconf
```

## Get inspiration from apk's build scripts

You can find the build scripts for Alpine packages here: [here](https://git.alpinelinux.org/aports/tree/) (usually in the folders main, community, or testing). These build scripts are not written for cross-compilation; however, they can contain helpful ideas and patches.

## Open draft pull requests before asking questions

It's easier to stay on the same page if maintainers can run your build script, even if it is incomplete. Use another build script as a template and fill in as much information as you can. Don't forget to add the [hash](#What-are-those-numbers-in-the-list-of-sources?-How-do-I-get-them?), otherwise CI won't run.

## Make your script work for different versions

To make it easier to update the version:

- Replace the version number with * when changing directories, e.g. `cd my-package-*`
- Interpolate version number into urls, for example, `"http://...my-package-$(version).tar.gz"`. You can also use just parts of the version number, like `"http://...my-package-$(version.major).$(version.minor).tar.gz"`.