Commit Graph

1725 Commits

Author SHA1 Message Date
Timo Teräs ec11f495cd abuild: add an option to keep all directories
This is mainly needed for alpine-baselayout which creates all
directories, and most of them are empty. The code in question
would remove directories we explicitly want alpine-baselayout
to create and own.
2024-03-22 21:56:14 +02:00
Sertonix 8588378efa checkapk: new arch can cause old apk missing 2024-03-13 11:14:34 +00:00
Hugo Osvaldo Barrera 2e987e10ff Remove deprecated option from abuild man page
Using this flag yields:

  >>> ERROR: : Use newapkbuild to create new aports
2024-03-13 11:12:15 +00:00
Natanael Copa 8da2501613 abuild: warn for more version suffixes
give a warning when version suffix a<digit>/b<digit> probably should be
_alpha<digit>/_beta<digit>.

ref: https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10972#note_380899
2024-03-13 11:57:50 +01:00
Sertonix 648529aa35 abuild: remove duplicate SOURCE_DATE_EPOCH from .PKGINFO 2024-03-06 13:05:10 +00:00
Sertonix f63c117df6 abuild: avoid variables in sed pattern 2024-03-05 11:59:10 +00:00
Jingyun Hua e3ba1238d3 abuild.in: update autoconf test for loongarch64 2024-03-05 11:56:33 +00:00
Hugo Osvaldo Barrera 1861b23f0c Remove --recursive from abump --help
This flag does not exist.
2024-03-05 11:27:52 +00:00
Hugo Osvaldo Barrera 06ee1d3cfb .editorconfig: add yml rules
While editing .gitlab-ci.yml, my editor kept indenting to tabs due to
the override for [*]. This retains the existing style.
2024-03-05 11:03:27 +00:00
Celeste 19bebd8497 apkbuild-cpan.in: use distribution name cached in %distfiles
instead of sending a duplicate query to metacpan

follow up from what was done in
e448c9a452
2024-03-05 11:01:27 +00:00
Timothy Legge 5710eefb63 apkbuild-cpan.in: remove perl-dev package wherever it occurs
if the package does not have any xs files and the old APKBUILD data is used

The regex to get perl-dev wherever it might occur was breaking my head
2024-03-05 11:01:27 +00:00
Timothy Legge b0fb5c7038 apkbuild-cpan.in: don't add perl-dev if its not needed on recreate 2024-03-05 11:01:27 +00:00
Sertonix 4ae1b39910 abuild: fix quote handling in check_license 2024-02-12 12:39:17 +01:00
Celeste 39c2b44c63 apkbuild-pypi.in: add option to use project homepage as url=
instead of pypi.org page
2024-02-02 02:51:27 +00:00
Celeste 9e336571e1 apkbuild-pypi.in: fixes #10129 move _pkgreal and comment
this makes it easier to see the maintainer line in
an unexpanded diff that shows a three-line context
2024-02-02 02:51:27 +00:00
Celeste 49983f5af5 apkbuild-pypi.in: fix a number of uninitialized value warnings 2024-02-02 02:51:27 +00:00
Celeste fb262fad5e apkbuild-pypi.in: redefine builddir if not based on $_pkgreal 2024-02-02 02:51:27 +00:00
Celeste db578302aa apkbuild-pypi.in: clean up read_assignments_from_file
also, keep the comment associated with provides & replaces, and
return early to avoid running APKBUILD-specific regex matches
2024-02-02 02:51:27 +00:00
Celeste bc4efd7f0c apkbuild-pypi.in: keep options and patches (copied from apkbuild-cpan)
thanks @timlegge for working out how to make this work in apkbuild-cpan
2024-02-02 02:51:27 +00:00
Celeste 9b513da2f4 apkbuild-pypi.in: keep old dependencies during recreate
unless py3-gpep517 or py3-pytest is missing, then
add that in as the template generated uses it.

To force dependencies to be recalculated, use
`recreate deps`.
2024-02-02 02:51:27 +00:00
Celeste a9e956dc16 apkbuild-pypi.in: move requires_dist parsing code to its own function
also, use regex from https://peps.python.org/pep-0508/#names
to parse valid pypi package names in requires_dist
2024-02-02 02:51:26 +00:00
Celeste 9e416f782a apkbuild-pypi.in: keep old license, url, pkgname/desc during recreate 2024-02-02 02:51:26 +00:00
Celeste d05bc1a4af apkbuild-pypi.in: change position of replaces/provides in template
Most Python aports put replaces/provides
between `builddir` and `build()`.

Follow this convention, so they don't change
position when running `apkbuild-pypi recreate`.
2024-02-02 02:51:26 +00:00
Celeste fc863565f1 apkbuild-pypi.in: update url generated in template 2024-02-02 02:51:26 +00:00
Celeste 32c0815828 apkbuild-pypi.in: switch to pypi.org
pypi.python.org now redirects to it
2024-02-02 02:51:26 +00:00
Celeste 81fb95d31a apkbuild-pypi.in: format depends and checkdepends
with `format_depends` function
taken from `apkbuild-cpan.in`
2024-02-02 02:51:26 +00:00
Celeste 250412d18c apkbuild-pypi.in: use pypi json in get_deps
the old method of calling
`python3 ./setup.py --requires`
doesn't seem to be working anymore
2024-02-02 02:51:26 +00:00
Celeste 54550dc597 apkbuild-pypi.in: use $pkgver in source
regex taken from `apkbuild-cpan.in`
2024-02-02 02:51:26 +00:00
Celeste 11c96f25d6 apkbuild-pypi.in: add -pyc subpackage to template 2024-02-02 02:51:26 +00:00
Celeste ad9324fd52 apkbuild-pypi.in: use gpep517 in template
copied from `newapkbuild.in`, should work
even without a `pyproject.toml` due to the
`setuptools.build_meta:__legacy__` backend
2024-02-02 02:51:26 +00:00
Celeste 4a55e30881 apkbuild-pypi.in: remove depends="python3" from template
it is automatically traced since 6806a0d39b
2024-02-02 02:51:26 +00:00
Celeste 157e390ffa apkbuild-pypi.in: create pretty urls in get_source 2024-02-02 02:51:26 +00:00
Timothy Legge 60c00a4d39 apkbuild-cpan.in: Remmove unnecessary/unused code
Should have been removed in:
27c430cc64
2024-02-01 22:08:23 -04:00
Timothy Legge 99cda3db69 apkbuild-cpan.in: fix uninitialized value when running with no parameters
by applying Celeste's suggested fix
2024-02-01 22:08:23 -04:00
Timothy Legge 1dd67c1beb apkbuild-cpan.in: remove unnecessary pragmas 2024-02-01 22:08:17 -04:00
Timothy Legge 9cde1ad278 apkbuild-cpan.in: Standardize the source and patches output 2024-02-01 07:35:23 -04:00
Celeste 0ad7489969 apkbuild-cpan.in: move code that queries metacpan into its own function
this piece of code was repeated in multiple places, so factor it out
2024-01-31 19:29:56 -04:00
Timothy Legge 726e37920c apkbuild-cpan.in: fix read_assignments_from_file
remove unnecessary regex in functions

Return early if not processing an APKBUILD file

and fix undefined variable of there are no patches
2024-01-30 23:05:45 -04:00
Celeste 1c017bb5d5 apkbuild-cpan.in: add newline after inserting *depends=
Upon `apkbuild-cpan upgrade`, an aport without any
checkdepends would get a line like this inserted:
`checkdepends=""subpackages="$pkgname-doc"`

which would then be deleted by the substitution
that removes empty variables, so the net result
is an APKBUILD with the subpackages field removed.

Inserting a newline results in `checkdepends=""`
being a line all by itself, which then gets
correctly removed by the empty variables regex.
2024-01-28 02:50:25 +00:00
Timothy Legge b0f60ee85a apkbuild-cpan.in: fixes #10129 move _pkgreal and comment 2024-01-27 12:10:06 -04:00
Celeste 28edb26d5b apkbuild-cpan.in: fix empty lines in recreated depends variables
this is a preliminary attempt at fixing #10126, however, i think
the whole logic around recreating depends should be reviewed and
improved, as we may want to carry over all the depends from the
old APKBUILD, and not just the non-perl libs, as the old depends
may be compensating for something not declared in the META file.
2024-01-26 22:33:02 -04:00
Celeste b48c12ea86 apkbuild-cpan.in: do not increase number of spaces in options_comment
the regex used to match options_comment in read_assignments_from_file
starts matching immediately after the closing double quote (it does
not remove the prefixing space), so without this change, a new space
is inserted by the template upon each `recreate`.
2024-01-26 21:37:18 -04:00
Celeste 6a8a61f9d8 apkbuild-cpan.in: find Build.PL using glob() in update_functions sub
this is more consistent with the method we use to
find Build.PL / Makefile.PL in the do_depends sub
2024-01-26 21:37:18 -04:00
Celeste 1c771b0d6a apkbuild-cpan.in: keep arch of old APKBUILD
also, prevent removal of `arch=""` line,
which is sometimes used for disabled aports
2024-01-26 21:37:18 -04:00
Celeste ef6aef38b1 apkbuild-cpan.in: sort & de-duplicate dependencies 2024-01-26 21:37:18 -04:00
Celeste 41a36bca95 apkbuild-cpan.in: move .pod files to the -doc subpackage
this `doc()` function is copied from main/perl/APKBUILD
2024-01-26 21:37:18 -04:00
Celeste 3336955a4a apkbuild-cpan.in: update $package_mappings 2024-01-26 21:37:18 -04:00
Celeste fe072f9866 apkbuild-cpan.in: fix empty directories
by not installing .packlist and perllocal.pod.

The call to find -delete has been removed as
the modifications to build() have covered
almost all cases, so deleting .packlist and
perllocal.pod manually is no longer necessary.

Also, increment template version from 3
to 4 to allow easy identification of
aports that have this change applied.
2024-01-26 21:37:18 -04:00
Celeste 7101d6164a apkbuild-cpan.in: also attempt to generate MYMETA from running Build.PL 2024-01-26 21:37:18 -04:00
Celeste 1753907af0 apkbuild-cpan.in: fix use of uninitialized value $1 2024-01-26 21:37:18 -04:00