Commit Graph

59 Commits

Author SHA1 Message Date
Aditya Alok
3a1acb712b feat(build scripts): allow packages to define extra static split patterns
- add variable `TERMUX_PKG_STATICSPLIT_EXTRA_PATTERNS`

Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
2022-03-09 10:01:57 +09:00
Henrik Grimler
b79db7ce73
Revert "[TEMP] download deps from grimler.se instead of packages.termux.org"
This reverts commit 5b432ffbbc.
2022-03-07 14:40:40 +01:00
Henrik Grimler
5b432ffbbc
[TEMP] download deps from grimler.se instead of packages.termux.org
Fosshost mirror is down at the moment.
2022-03-04 08:26:51 +01:00
Henrik Grimler
e37646a3ae
Revert "[TEMP] download deps from grimler.se instead of packages.termux.org"
This reverts commit 7850c1d98b.
2022-02-25 08:27:38 +01:00
Henrik Grimler
7850c1d98b
[TEMP] download deps from grimler.se instead of packages.termux.org
Fosshost mirror is down at the moment.
2022-02-24 14:11:43 +01:00
Henrik Grimler
42b4712c15
step_setup_variables: fix warning about undefined TERMUX_MAIN_PACKAGE_FORMAT 2022-02-19 14:41:19 +05:30
Maxython
465159a72e
build-package.sh: change logic for package manager selection to be more stable
termux_step_setup_variables: added logic with TERMUX_PACKAGE_FORMAT
for easier compilation.
2022-02-11 22:38:40 +01:00
Henrik Grimler
ed351084a0
termux_step_setup_variables: no need to check termux-{games,science}
Since these repositories have been merged into the main repository
there is no need to check them for dependencies.
2021-12-05 13:18:21 +01:00
Henrik Grimler
96dd5b5f96
Remove unstable-repo from list of repos
It has been merged with main repo so no need to look for package
dependencies in it.
2021-11-14 20:58:36 +01:00
Leonid Pliushch
6572b28692
build-package.sh: introduce TERMUX_PKG_NO_SHEBANG_FIX
This variable will disable shebang fixing during massage step. Normally
such fix shouldn't be disabled, but there are packages where it causes
a huge overhead and is not needed anyway.

Packages that are known to be affected by overhead and take long time
for building:

 * papirus-icon-theme from x11-packages
2021-10-25 12:52:36 +03:00
Leonid Pliushch
653d72b8cf
build-package.sh: use cloudflare-backed package host 2021-10-08 23:54:38 +03:00
Ivan Max
5465f29528
build-package.sh: introduce TERMUX_PKG_GROUPS for pacman packaging format (#7609)
This metadata field allows to define groups to which the given packages belong.

See https://wiki.archlinux.org/title/Pacman#Installing_package_groups
2021-09-28 12:48:55 +03:00
Leonid Pliushch
07852c874b
build-package.sh: allow to select package formats between debian and pacman 2021-09-10 19:55:28 +03:00
Henrik Grimler
ecd214881a build-package: add new arg -c for "continue build"
As replacement for TERMUX_PKG_QUICK_REBUILD. Running
./build-package.sh -c <package> starts a build for <package>, but does
not extract and patch the source from scratch. Instead it sets up the
build variables and starts from termux_step_make.

When working on a big package that can take hours to build it is
convenient to be able to build until there is an error, then apply
some new patch (manually) to the source, and then continue from where
the build failed.
2021-08-24 21:40:46 +02:00
Henrik Grimler
2c70621a98 build-package: rename TERMUX_DEBUG to TERMUX_DEBUG_BUILD
To make it more self-explanatory.
2021-08-21 20:55:57 +02:00
Henrik Grimler
ea1772da55 termux_step_setup_variables: sort variables alphabetically 2021-08-21 20:54:44 +02:00
Leonid Pliushch
c9e8d1cb2b
build-package.sh: use packages.termux.org when running with -I/-i options 2021-06-03 14:59:39 +03:00
Leonid Pliushch
5c45d87234
build-package.sh: use Github Pages repositories for Unstable/X11 packages 2021-05-10 21:01:21 +03:00
Leonid Pliushch
a92e355891
build-package.sh: use grimler.se mirrors for unstable & x11 repos
Use non-IPFS repositories for fetching dependencies when building packages.
This is required at least for CI as gateways seem to block requests due to
either rate limit or restriction for usage by cloud platforms.
2021-04-30 16:29:45 +03:00
Leonid Pliushch
107c098419
build-package.sh: try dweb.link ipfs gateway for x11 & unstable repositories 2021-04-28 14:16:17 +03:00
Henrik Grimler
e460d1f1aa termux_step_setup_variables: use grimler.se for main repo
CI seem to fail quite often due to timeout when downloading from IPFS
host. Switch to grimler.se for now.
2021-03-12 16:19:40 +01:00
Leonid Pliushch
00c96411be
build-package.sh: switch from {unstable,x11}.termux-mirror.ml to IPFS links 2021-02-10 15:03:57 +02:00
Leonid Pliushch
aadee78eed
scripts: prepare for Bintray deprecation
Use termux.org as main repo host.

grimler.se / *.termux-mirror.ml for others.
2021-02-08 12:56:54 +02:00
Leonid Pliushch
37375312b9
explicitly set maintainer for each package
In issue https://github.com/termux/termux-packages/issues/6160 I have found
that community repo "its-pointless.github.io" specifies us as maintainer
for its packages. This is NOT TRUE and potentially misleads people using
these packages.

Now TERMUX_PKG_MAINTAINER will contain a default value which is neutral
and not specify maintainer. So all packages now have to override it to
the correct value.

[skip ci]
%ci:no-build
2020-12-20 15:16:34 +02:00
Leonid Pliushch
a4263115fc termux_step_setup_variables.sh: no need to override home/prefix for on-device builds 2020-10-30 21:48:26 +02:00
Leonid Pliushch
7f8ee49bfc termux_step_setup_variables.sh: no need to attempt to set default prefix/home, they are set by properties.sh now 2020-10-30 21:46:29 +02:00
Leonid Pliushch
195314fe20 setup-offline-bundle.sh: add support for downloading package sources 2020-10-23 00:27:56 +03:00
Leonid Pliushch
c80220e31d build-package.sh: make it possible to disable termux-elf-cleaner
Just set TERMUX_PKG_NO_ELF_CLEANER=true in build.sh.
2020-10-01 19:34:19 +03:00
Henrik Grimler
8cff1c6d4f termux_step_setup_variables: spaces->tab 2020-07-21 10:27:54 +02:00
Henrik Grimler
4e902a41a5 building packages: create termux_step_get_source function
Calls termux_git_clone_src if TERMUX_PKG_SRCURL ends with .git, and
termux_download_src_archive and termux_extract_src_archive otherwise.
termux_step_extract_package has been split up into the latter two
functions.

termux_step_post_extract_package has been renamed to
termux_step_post_get_source to reflect these changes.
2020-07-21 10:14:00 +02:00
Leonid Pliushch
19df87391a Revert "build-package.sh: fast builds (-i/-I): disable X11 repository temporarily"
This reverts commit 03c1693f0994b6be6fe29e5832ce27270fa1c329.
2020-06-23 15:25:11 +03:00
Leonid Pliushch
6d40bba10d build-package.sh: fast builds (-i/-I): disable X11 repository temporarily 2020-06-22 20:02:07 +03:00
Leonid Pliushch
9c9e7f65b8 update maintainer info
Specifying Termux org members is more correct as we don't have repo-specific
maintainers for termux-packages.

DEB control field specification doesn't allow to specify multiple people as
package maintainers. Value "Termux members @termux" will be used as default
for that field which can be overridden on per-package basis if needed.

%ci:no-build
2020-05-13 11:05:52 +03:00
Leonid Pliushch
fb16d92527 Revert "build-package.sh: download dependency packages from mirror instead of Bintray"
This reverts commit f679a18402681a15c60f8f9b8b9c82843a041917.
2020-04-25 02:28:35 +03:00
Leonid Pliushch
9954394e75 build-package.sh: download dependency packages from mirror instead of Bintray
Avoid redundant traffic for Bintray repos when doing fast builds (-i/-I).
2020-03-21 15:47:48 +02:00
Butta
3af25bc2a9 Introduce TERMUX_PKG_QUICK_REBUILD
This new variable is extremely useful when iterating on creating a large package,
as otherwise you have to wipe the source and rebuild each time you make a mistake
with the patches or build.sh script.

Simply set TERMUX_PKG_QUICK_REBUILD=true in build.sh if a build fails and then the
TERMUX_PKG_SRCDIR and TERMUX_PKG_BUILDDIR will not be touched when you rebuild,
including that the patches will not be applied again. When you're done iterating,
diff for any new patches, save them, and remove this variable before rebuilding
from scratch, hopefully for the last time. ;)

An example is shown for the giant libllvm package, where other modifications are
also excluded if this variable is set.
2020-02-15 13:38:30 +05:30
Henrik Grimler
ab2a3b70f0 build-package.sh: add TERMUX_PKG_SERVICE_SCRIPT var and build script
termux_step_install_service_scripts is run after
termux_step_post_make_install and loops over the new array
TERMUX_PKG_SERVICE_SCRIPT to add service scripts for termux-services.

The service scripts are usually only a one-liner so we might just as
well define it in a variable like TERMUX_PKG_SERVICE_SCRIPT.

TERMUX_PKG_SERVICE_SCRIPT should be an array on the format
("daemon-name" 'script to execute' "another daemon" 'multi\n line\n script'),
i.e. it should be of even length with name + script where the script
part preferably is within single quotes (to avoid accidental expansion
of for example $HOME).
2020-01-05 15:00:15 +01:00
Leonid Pliushch
ddf7066863 build-package.sh: fix url for unstable & x11 packages 2019-11-17 14:56:25 +02:00
Leonid Pliushch
5493481c5c build-package.sh: better support for metapackages 2019-08-14 20:29:58 +03:00
Leonid Pliushch
52ceb56d3f build-package.sh: more fixes 2019-08-13 02:03:52 +03:00
Leonid Pliushch
d08dc0fa13 build-package.sh: use text-based comparsion in conditionals instead of exit-code based 2019-08-13 02:03:47 +03:00
Leonid Pliushch
c352216c63 packages: standardize values of several control variables for build.sh
Variables

 TERMUX_PKG_PLATFORM_INDEPENDENT
 TERMUX_DEBUG
 TERMUX_PKG_HAS_DEBUG
 TERMUX_PKG_ESSENTIAL
 TERMUX_SUBPKG_ESSENTIAL
 TERMUX_PKG_NO_STATICSPLIT
 TERMUX_PKG_BUILD_IN_SRC
 TERMUX_PKG_FORCE_CMAKE
 TERMUX_PKG_HOSTBUILD

should not accept arbitrary values for marking them "enabled". Instead
they should accept boolean values which makes them easier to handle and
also makes their meaning clear.

build-package.sh should make decision based on variable's value but not on
whether it is set or empty.

%ci:no-build
2019-08-12 18:49:13 +03:00
Leonid Pliushch
13f0811d76 build-package.sh: on-device builds without termux-exec are unsupported 2019-08-10 02:01:22 +03:00
Leonid Pliushch
a2b2c75806 build-package.sh: for on-device builds use device-specific default value for maintainer 2019-08-10 01:23:17 +03:00
Leonid Pliushch
328a9303bd build-package.sh: prefix and home shouldn't be overridable for on-device builds
And set TERMUX_NO_CLEAN to true for on-device builds as well.
2019-08-10 01:18:42 +03:00
Leonid Pliushch
ba62c10575 build-package.sh: source properties.sh before handling command line arguments
Fixes problem when it is not possible to override TERMUX_ARCH set in ~/.termuxrc.
2019-08-10 01:04:46 +03:00
Leonid Pliushch
e303212ae5 enable on-device builds
Partial compatibility for on-device builds.

There is no guarantee that it will be possible to build all available
packages and built packages will have same reliability that cross-compiled
but should solve "self-hosting" problems as much as possible.
2019-08-08 16:58:34 +03:00
Leonid Pliushch
6e70277fb3 no more develsplit + provide static libraries as separate package
%ci:no-build
2019-07-28 21:17:12 +03:00
Henrik Grimler
83177e08e3 termux_step_install_license: use license file from $TERMUX_PKG_LICENSE_FILE if specified
Otherwise use the licenses specified in $TERMUX_PKG_LICENSE
2019-05-19 21:36:30 +03:00
Leonid Pliushch
d850d1a4f1 build-package.sh: introduce field "Pre-Depends"
Required in rare cases where package update may break package manager during
installation process.

See https://www.debian.org/doc/debian-policy/ch-relationships.html for
more information.
2019-05-06 20:38:12 +03:00