Commit Graph

559 Commits

Author SHA1 Message Date
Leap of Azzam 18fbc56c72 add package: zig
Signed-off-by: Leap of Azzam <leapofazzam@gmail.com>
2022-01-25 20:52:58 +09:00
Ivan Max ece5419863
build-package.sh: setting up to work with pacman (#8451) 2022-01-14 15:16:37 +02:00
Henrik Grimler 150008c502
build-package: import and trust grimler's new gpg key
I missed this and broke the CI build system.
2021-12-08 10:07:21 +01:00
Henrik Grimler af3f791645
build-package: use PACKAGE_FORMAT debian if not specified 2021-10-22 09:27:15 +02:00
Henrik Grimler 26da480d36 build-package: mv code for creating llvm-config
After https://github.com/termux/termux-packages/commit/e34ae5da030d,
llvm-config was created before termux_step_get_dependencies, meaning
that it gets overwritten if libllvm is installed.

Fix this by creating llvm-config in a new function
termux_step_override_config_scripts, that is run right after
termux_step_get_dependencies.
2021-09-17 12:02:53 +02:00
Leonid Pliushch 07852c874b
build-package.sh: allow to select package formats between debian and pacman 2021-09-10 19:55:28 +03:00
YAKSH BARIYA 2d38944910
new package: gn (#7290) 2021-09-03 20:46:03 +03:00
Henrik Grimler 6445645d7e build-package: mv code for setting up src and build to to its own function
%ci:no-build
2021-08-24 21:40:46 +02: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 23530a540c build-package: create timestamp file after get_dependencies
Fixes issue introduced in e34ae5da03.
2021-08-21 22:37:51 +02:00
Lucinda May Phipps e6166f11d0
move termux_step_get_dependencies up one step 2021-08-21 21:25:26 +01:00
Henrik Grimler e34ae5da03 build-package: mv code for getting deps out of step_start_build
Into new function termux_step_get_dependencies.
2021-08-21 20:59:24 +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
Leonid Pliushch 90e2de6fcc
build-package.sh: add hook to prevent execution of sudo
Do not let privileged commands appear in build.sh. Any environment
configuration should be done by scripts like setup-ubuntu.sh. Execution
of arbitrary sudo commands could mess up host system, in case if not
building package in Docker container or VM.
2021-07-07 23:27:54 +03:00
Leonid Pliushch 3337b9ffee
build-package.sh: compatibility with "reproducible builds"
Though git method of getting persistent timestamp won't work in submodules
and snapshots and will fallback to current date.
2021-05-19 13:19:23 +03:00
Leonid Pliushch c9664c11ba
build-package.sh: never use git outside of package build process.
termux-packages is not guaranteed to be always used as git repository.
Relying on git here may lead to issues.

P.S. Avoid unfinished work on master branch!
2021-05-19 13:12:27 +03:00
Henrik Grimler b3b5a3f35f mv checks from termux_step_create_datatar to termux_step_massage
By moving the checks we can make the function more general, and
thereby re-use it for creating subpackages and potentially hostbuild
tools packages.

tests: building libandroid-support and build-essential.
2021-05-16 20:08:37 +02:00
Lucy Phipps d5313fab26
get SOURCE_DATE_EPOCH from git log time
start of work towards reproducible builds
2021-05-11 20:36:23 +01:00
Leonid Pliushch 501ce516cd misc hardcoded home/prefix fixes 2020-10-30 22:48:55 +02:00
Leonid Pliushch 47eca5ed01 build-package.sh: enable offline mode when file ./build-tools/.installed is present
Once ./scripts/setup-offline-bundle.sh was executed, all sources and build tools
should be downloaded and build-package.sh should be able to use them.
2020-10-23 01:57:33 +03:00
Henrik Grimler bafdf9d9c0 Rename termux_extract_src_archive to termux_unpack_src_archive
%ci:no-build
2020-07-21 20:09:38 +02:00
Henrik Grimler b474395f89 build-package.sh: spaces->tab 2020-07-21 10:22:55 +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 2f58b9f435 build-package.sh: add function for setting up GHC 2020-06-20 22:44:13 +03:00
Leonid Pliushch 64ee31c9dc build-package.sh: fix unbound variable error 2020-03-23 23:45:11 +02:00
Leonid Pliushch 2f5b36deb4 build-package.sh: attempt to fix gpg when no tty available 2020-03-21 23:03:43 +02:00
Leonid Pliushch d523f61477 build-package.sh: verify release files with gpg when doing autobuilds (#5062) 2020-03-21 16:30:02 +02:00
Henrik Grimler dbeeaef9c9 build-package: add new function termux_step_create_subpkg_debscripts (#4963)
Makes it possible to create postinst scripts and similar or subpackages as well
2020-02-23 21:30:44 +01:00
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 85462a0042 build-package.sh: use absolute paths when sourcing parts from scripts/build/
+ some fixes for shellcheck.
2019-08-16 23:19:11 +03:00
Leonid Pliushch 18af9577f4 build-package.sh: allow script to be called from any directory 2019-08-16 22:52:18 +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 56ca0f1d06 build-package.sh: for on-device builds value of TERMUX_ARCH should not be overridable
This should be allowed only when cross-compiling.
2019-08-10 01:13:25 +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 4aaba4d074 build-package.sh: allow to build multiple packages at one time
Support for call syntax:

 ./build-package.sh pkg1 pkg2 pkg3 ...
2019-07-20 15:32:54 +03:00
Henrik Grimler 9e4715ee82 build-package: termux_step_license->termux_step_instalL_license 2019-05-19 21:36:30 +03:00
Henrik Grimler 117ecbfb88 build-package: install licenses to $PREFIX/share/$PKG/LICENSE 2019-05-19 21:36:30 +03:00
Fredrik Fornwall 503c204164 protobuf: Update from 3.6.1 to 3.7.1 2019-05-12 00:22:25 +02:00
Leonid Pliushch 918a383d4d build-package.sh: make sure that termux_error_exit() is defined before throwing any errors 2019-04-20 17:28:39 +03:00
Leonid Pliushch 5ec5a1a314 build-package.sh: fix printing of error message when trying to run script on Android device 2019-03-26 01:27:09 +02:00
Henrik Grimler d30227669f build-package: mv code for creating subpackages to new file 2019-03-07 20:35:32 +01:00
Leonid Pliushch 44d28f9f88 build-package.sh: prevent parallel runs in the same environment
Avoid corruption of the build environment if build-package.sh was
executed in 2 parallel sessions.
2019-03-06 17:01:19 +02:00
Leonid Pliushch 3d5d3958a0 build-package.sh: fix sourcing of renamed script 2019-03-03 13:32:22 +02:00
Henrik Grimler 531956ce02 build-package: call termux_get_repo_files in termux_step start_build
Prevents unnecessary re-downloads of repo files.
2019-03-03 13:27:47 +02:00
Henrik Grimler 379f2452f3 build-package: remove termux_step_compare_debs 2019-03-03 01:40:22 +02:00
Henrik Grimler 414820e2d3 build-package.sh: add short descriptions for package hooks 2019-02-27 21:59:08 +02:00
Henrik Grimler 67d79e8b92 build-package: mv termux_step_finish_build to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 90138a3a69 build-package: mv termux_step_compare_debs to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 8be8c3a2d6 build-package: mv termux_step_create_debfile to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 586e8709fd build-package: mv termux_step_create_datatar to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler a30a61d417 build-package: mv termux_step_massage to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 9f5ba4bcc6 build-package: mv termux_step_extract_into_massagedir to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 617764f4f4 build-package: mv termux_step_make_install to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler d0db5e647b build-package: mv termux_step_make to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 46f4e306fd build-package: mv termux_step_configure to scripts/build/configure/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 9e04fe1434 build-package: mv termux_step_configure_meson to scripts/build/configure/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 74f09e886b build-package: mv termux_step_configure_cmake to scripts/build/configure/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 0bb1da3146 build-package: mv termux_step_configure_autotools to scripts/build/configure/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 38d3f22377 build-package: mv termux_step_replace_guess_scripts to scripts/build 2019-02-27 21:59:08 +02:00
Henrik Grimler 5389a1a4e2 build-package: mv termux_step_patch_package to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 63fdeada9b build-package: mv termux_step_setup_toolchain to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 3e088d12f7 build-package: mv termux_step_extract_package to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 0b9109238a build-package: mv termux_step_start_build to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 68166e9b62 build-package: mv termux_step_get_repo_files to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 7ca66e6589 build-package: mv termux_download_deb to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 3e70f419a1 build-package: mv termux_extract_dep_info to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 8ae7c5ef86 build-package: mv termux_step_handle_buildarch to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 063eaac334 build-package: mv termux_setup_variables to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 7eab83459f build-package: mv termux_step_handle_arguments to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler 55e037366d build-package: mv termux_setup_cmake to scripts/build/setup 2019-02-27 21:59:08 +02:00
Henrik Grimler 4df44858f6 build-package: mv termux_setup_meson to scripts/build/setup 2019-02-27 21:59:08 +02:00
Henrik Grimler 6888baf268 build-package: mv termux_setup_ninja to scripts/build/setup 2019-02-27 21:59:08 +02:00
Henrik Grimler 2bd607112b build-package: mv termux_setup_rust to scripts/build/setup 2019-02-27 21:59:08 +02:00
Henrik Grimler 7eb7ad6617 build-package: mv termux_setup_golang to scripts/build/setup 2019-02-27 21:59:08 +02:00
Henrik Grimler a927332bd9 build-package: mv termux_download to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler f36687b8e7 build-package: mv termux_step_host_build to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler d159e59699 build-package: mv termux_step_handle_hostbuild to scripts/build/ 2019-02-27 21:59:08 +02:00
Henrik Grimler c0b579ed14 build-package: mv termux_error_exit to scripts/build/ 2019-02-27 21:59:08 +02:00
its-pointless 8658a01e74 should be disabled by default... 2019-02-27 01:49:43 +02:00
Leonid Pliushch 1631d65ff1 termux-elf-cleaner: update to v1.3 2019-02-26 01:23:27 +02:00
Leonid Pliushch 0f0e28c628 build-package.sh: fix unbound variable error
Error was:
./build-package.sh: line 578: _SUBPKG_DEPENDS: unbound variable
2019-02-26 00:40:20 +02:00
Wetitpig cc966aac6d Avoid no subpackage error 2019-02-26 00:38:38 +02:00
Leonid Pliushch 7fbb16f59a Revert "build-package.sh: fix fast-build failure in case subpackages are not defined" 2019-02-26 00:37:56 +02:00
Leonid Pliushch 5648cb4b64 build-package.sh: fix fast-build failure in case subpackages are not defined 2019-02-25 17:37:37 +02:00
Fredrik Fornwall 605e0d1d78 Use dupbuild=warn when building with ninja
Fixes build breakage on at least doxygen after updating to ninja 1.9.
2019-02-24 22:26:55 +01:00
Henrik Grimler 581bcc9b13 termux_step_compare_debs: also compare all subpackages 2019-02-24 21:07:31 +02:00
Henrik Grimler e704ab0334 build-package.sh: also download subpackages dependencies
Also use uppercase for some more variables
2019-02-24 21:07:31 +02:00
its-pointless 0320a92780 fix ndk versions 2019-02-24 20:39:35 +02:00
its-pointless c1b65a538e version names change 2019-02-24 20:39:35 +02:00
its-pointless 50decd816b r19b update 2019-02-24 20:39:35 +02:00
Fredrik Fornwall e520dfbe12 Initial changes for NDK r19 support 2019-02-24 20:39:35 +02:00
Joakim 899e1c7890 ninja: Update from 1.8.2 to 1.9.0 and switch to posix_spawn from Bionic 9. 2019-02-24 20:35:10 +02:00
Henrik Grimler 44a41a2bc0 build-package.sh: handle | in TERMUX_PKG_DEPENDS when fast building 2019-02-23 14:13:35 +02:00
Leonid Pliushch 41f8bc259c build-package.sh: fix handling quiet builds
Recent changes to this script set $TERMUX_QUIET_BUILD to false which made
all builds quiet by default due to the way how this variable was handled.
2019-02-21 02:42:26 +02:00
Henrik Grimler dc81f64e49 build-package.sh: fix TERMUX_REPO_URL 2019-02-17 15:30:58 +01:00
Henrik Grimler 07656065e3 build-package.sh: handle Release.gpg and get deb path from Package
This makes it possible to download .debs from dl.bintray.com/xeffyr
2019-02-16 18:55:15 +01:00
Henrik Grimler a66a7a78b8 build-package.sh: set TERMUX_NO_CLEAN to false per default
Ensures -i builds are run in fresh environments
2019-02-16 16:31:06 +01:00