Commit Graph

1163 Commits

Author SHA1 Message Date
Keith Maxwell
40e6e9995b APKBUILD.5: match install_if example to abuild.in
This change makes the example in the description of install_if in the
APKBUILD man page match abuild.in:1791.
2019-06-12 12:24:44 +00:00
Russ
2122fa7476 newapkbuild: use current directory for cmake 2019-06-12 12:21:19 +00:00
tcely
49c7560c86 newapkbuild: quote pkgname and pkgver
These are strings after all and should be quoted even if not strictly necessary because of tradition excluding spaces from package names.
2019-06-12 12:20:35 +00:00
Leo
b743186dfe newapkbuild.in: add default check() for meson packages. 2019-06-12 12:19:58 +00:00
Oliver Smith
da4aca278f Cosmetic: newapkbuild: comment for check sections
Add a '# Check sections' comment, for consistency with the equally
commented build and package sections.
2019-06-12 12:18:59 +00:00
Oliver Smith
635a699365 newapkbuild: fix empty function regression
Since the obsolete 'cd "$builddir"' statements have been removed in [1],
build(), check() and package() can generate empty functions if no build
system is specified or if there is no default for the given build
system. newapkbuild will then fail, as it tries to parse the script it
generated:

$ cd /home/pmos && newapkbuild test
/usr/bin/abuild: /home/pmos/test/APKBUILD: line 18: syntax error: unexpected "}"
$ cat test/APKBUILD
...
build() {
}
...

Fix this by placing ":" in functions that would be empty.

[1]: f83d19ce79
2019-06-12 12:18:59 +00:00
Natanael Copa
8d092443d9 ==== release 3.4.0_rc4 ==== 2019-05-03 19:01:19 +02:00
Natanael Copa
1de902f2fa abuild: fix -openrc to work with multiple subpackages
allow a single APKBUILD have multiple -openrc subpackages.
2019-05-03 18:35:44 +02:00
Leo
f263cb9f49 abuild.in: fix warning with gawk-5.0
awk: cmd. line:1: warning: regexp escape sequence `\#' is not a known regexp operator
2019-04-30 09:35:51 +00:00
Natanael Copa
0a7026a485 ==== release 3.4.0_rc3 ==== 2019-04-30 07:49:03 +00:00
Natanael Copa
cf86b45836 abuild: cleanup default_dbg
Run the loop in a subshell via a pipe so we dont need a subshell for
each iteration.

Use `if ...; then` to make code slightly more readable.

Fix a whitespace before tab while at it.
2019-04-30 07:41:23 +00:00
tcely
acf1fa5553 abuild: default_dbg: do not trigger trap with test failure
Resolves alpinelinux/abuild#71
2019-04-30 07:12:00 +00:00
Leo
ed88353836 abuild.in: remove duplicate options_has call 2019-04-29 21:40:06 +00:00
tcely
5b163c2d58 abuild: default_dbg: eliminate side effects
- do not overwrite variables

srcdir is very important for abuild operation

- quoted various paths
- use a sub-shell to contain directory changing

Resolves alpinelinux/abuild#58
2019-04-29 20:52:23 +00:00
Natanael Copa
dc41c1fc52 ==== release 3.4.0_rc2 ==== 2019-04-29 20:03:20 +00:00
Kevin Daudt
2e77e3390f abuild-clean: add option to make files writable before cleanup
Some projects might leave files which are not writable for the current
user. The cleanup process then fails and leaves files / directories
behind.

This can easily be fixed by making everything writable before removing
the files.

Add the option 'chmod-clean' which does just that.
2019-04-29 19:26:43 +00:00
tcely
1d854182dd abuild: change word choice in comment 2019-04-29 18:44:35 +00:00
Natanael Copa
30a60d4523 abuild: fix whitespace before EOL 2019-04-29 18:43:46 +00:00
Leo
b849aae4b9 abuild: provide a default_static() and static() functions
- Also check for static archives and warn on lack of static subpackage
2019-04-29 18:38:22 +00:00
Ikke
f83d19ce79 newapkbuild: remove obsolete cd statements
Since `$builddir` is officially supported and abuild automatically cd's to `$builddir`, it does not need to be part of the template anymore.
2019-04-29 18:34:03 +00:00
Mike Sullivan
369e7069b8 Revert "abuild: replace command -v with which to fix build issues"
This reverts commit 57f2830739.

https://github.com/alpinelinux/aports/pull/7203 fixes the original problem
2019-04-29 18:33:37 +00:00
Timothy Legge
29bf802907 apkbuild-cpan.in: Update licenses to spdx format and remove redundant directory change 2019-04-29 18:32:46 +00:00
tcely
77746a0c3d abuild-fetch: enable curl certificate verification 2019-04-29 18:31:58 +00:00
tcely
d733d5e570 APKBUILD.5: sort depends_* descriptions 2019-04-29 18:30:55 +00:00
Luca Weiss
915c7d868b functions: adjust armhf triplet
From what I could find, it was changed to -musleabihf during the Alpine
3.6 release cycle but this function was never updated to reflect that
2019-04-29 18:19:25 +00:00
Natanael Copa
c0dc7acee7 Revert "abuild: unset depends for subpackages"
Apparently there are many packages that does soemthing like:

subpackages="$pkgname-foo:_foo"

_foo() {
	depends="$depends something-else"
}

and thus depend on the previous behavior. We need to revert and plan
this better.

This reverts commit 8fbbffd201.
2019-04-25 12:41:22 +00:00
Sören Tempel
ff4f2253c1 APKBUILD.5: document depends_* variables for -doc and -openrc 2019-04-09 18:02:00 +02:00
Sören Tempel
f92353f57b abuild: add depends_libs variable to default_libs()
Other subpackage such as -dev, -doc and even -openrc allow adjusting
depends of the subpackage through such a variable. This is, for
instance, useful to remove a dependency of the origin package from the
-libs subpackage.

While at it document it in APKBUILD(5).
2019-04-09 18:01:44 +02:00
Natanael Copa
e2a012cba6 ==== release 3.4.0_rc1 ==== 2019-04-05 07:11:50 +00:00
Timothy Legge
629a780b1c get and use pkgdesc from cpan api data if the module has no metadata files (returnes unknown) 2019-04-03 16:07:03 +00:00
tcely
801578a06a abuild: -openrc should not inherit depends 2019-04-03 16:06:09 +00:00
Chloe Kudryavtsev
6a6310f030 Add default_cleanup_srcdir
In some cases, a simple rm -rf is not sufficent to clean srcdir.
One such case is the new go module system, that marks everything as
read-only - thus only letting root rm -rf it without a chmod.
There is a command intended to clean them - `go clean -modcache`.
However, for that to work, GOPATH must be defined and existent.
Running chmod for all srcdir cleanups makes no sense, nor does enforcing
root, or putting global overrides just for go.

This patch allows overriding what happens on `cleanup srcdir`, by
overriding cleanup_srcdir, and allows the use of default_cleanup_srcdir.

In our go example, it might be used as such:

cleanup_srcdir() {
	go clean -modcache
	default_cleanup_srcdir
}
2019-04-03 15:59:54 +00:00
Chloe Kudryavtsev
30d296ddb3 Make clean() use cleanup()
Avoid DRY issues, and increase consistency.
2019-04-03 15:57:14 +00:00
Natanael Copa
8fbbffd201 abuild: unset depends for subpackages
make sure that subpackages does not inherit main package's depends.
2019-03-21 13:42:36 +01:00
Natanael Copa
0238acc51d apkbuild-cpan: use $pkgver in source url
replace litteral version string with $pkgver in source url
2019-03-21 12:52:30 +01:00
Natanael Copa
67181962bf apkbuild-cpan: include modules that used to be part of core
we need to check if a given module currently is a part of core. Modules
which have a first_release may have been removed later, for example
Module::Build.
2019-03-21 12:28:11 +01:00
Natanael Copa
122bcd7cb2 apkbuild-cpan: remove prepare function from APKBUILD
the generation of Makefile is comparable with running configure, which
we normally do in the build() function, not in prepare.

also fix some whitespace damamge.
2019-03-21 11:34:06 +01:00
Timothy Legge
ede4203749 apkbuild-cpan.in fix issue with version check 2019-03-20 17:10:15 +00:00
Timothy Legge
422199858c apkbuild-cpan.in fix issues with update, recreate, etc 2019-03-20 17:10:15 +00:00
Timothy Legge
f98db143cb Many of setings should come from module not release api 2019-03-20 17:10:15 +00:00
Timothy Legge
c893530293 Fix for issue with apkbuild-cpan upgrade 2019-03-20 17:10:15 +00:00
Timothy Legge
27c430cc64 Updates for metacpan 2019-03-20 17:10:15 +00:00
Robert Hencke
0126fbdffb abuild-sudo: remove unused variable
This prevents clang from issuing a warning here.
2019-03-14 15:46:11 +01:00
Natanael Copa
0b86c457f3 ==== release 3.3.1 ==== 2019-03-05 11:45:16 +00:00
Oliver Smith
a54d3ba2ae abuild-tar.static: fix undefined reference errors
Link against the same libs as abuild-tar and fix the order of the CC
arguments.
2019-03-05 11:43:50 +00:00
Andrei Belov
2d2be1ca1b abuild-sign: actually catch errors while signing 2019-03-05 11:42:15 +00:00
Mike Sullivan
57f2830739 abuild: replace command -v with which to fix build issues 2019-03-05 11:28:04 +00:00
Carlo Landmeter
0a79fc62c9 Allow forcing of colored output
In some cases (ie drone ci) there is no tty available but its still
possible to display colors in the webui.
2019-02-25 23:10:16 +00:00
Natanael Copa
376ccc5bd6 abuild: add support for pkg-config prefix pcprefix
Fix issue when two -dev packages provides same pkg-config wil but with
different versions. For example libressl-dev and openssl-dev both ships
libssl.pc and libcrypto.pc, which resulted in automatic provides of
pc:libssl and pc:libcrypto.

apk would end up picking libressl-dev over openssl-dev for packages that
had automatic pc:libssl depends (for example libssl2-dev), when
openssl-dev was the one that was used during build.

To fix this we add support for a pcprefix so we can set
pcprefix="libressl:" in libressl APKBUILD which makes libressl-dev
provide pc:libressl:libssl. This is similar to what we do with
sonameprefix.

We do not yet automatically detect when the prefixed variant should be
used so for now we will have to explicitly add libressl-dev.

ref #9959
2019-02-22 13:57:08 +00:00
Natanael Copa
22753f5701 ==== release 3.3.0 ==== 2019-01-23 18:22:31 +00:00