Commit Graph

59 Commits

Author SHA1 Message Date
Natanael Copa
51830efbb5 newapkbuild: fix checksums to be last in ABPKUILD
ref https://github.com/alpinelinux/abuild/pull/42
2018-10-03 10:50:25 +00:00
prspkt
9aef4769d1 newapkbuild: use https for sourceforge download links 2018-09-24 21:43:49 +02:00
Jakub Jirutka
1820691b94 newapkbuild: fix default check function for python3
`setup.py check` does not run package tests, it performs just some check
of the package metadata. The correct command is `setup.py test`.
2018-07-29 16:21:29 +02:00
Oliver Smith
a68354ebc5 newapkbuild: check arguments and improve usage()
Changes:
* argument sanity checks:
  * `PKGNAME[-PKGVER] | SRCURL`
    * check if missing
    * check if specified more than once (see below)
  * specifying more than one buildtype flag
  * `-n` (set pkgname) without using SRCURL as last argument
  * `-s` (sourceforge source) without using PKGNAME as last argument
* Typo fix: exist -> exists
* `usage()`:
  * always print PKGNAME and PKGDESC (instead of NAME and DESC,
    NAME was used in one place and PKGNAME in another)
  * link to <https://spdx.org/licenses/>
  * `-m` (meson) flag was missing in short usage line at the top
  * indicate that the buildtypes are exclusive
  * `-c` flag: remove "to new directory" wording to make the
    message shorter (this should be obvious)
  * remove empty line at the end

NOTE: Before this commit, the `PKGNAME[-PKGVER] | SRCURL` was allowed
to be specified more than once, and the code looped over the arguments.
But this was not documented in `usage()` and had unexpected results:

```
$ newapkbuild first second third
$ tree
.
___ first
    ___ APKBUILD
    ___ first
    ___ ___ APKBUILD
    ___ ___ first
    ___ ___ ___ APKBUILD
    ___ ___ ___ src
    ___ ___ src
    ___ src
```
2018-06-21 15:30:58 +00:00
A. Wilcox
75b8cacaf0 newapkbuild: move checksum call to after fetch
unpack will no longer unpack without a checksum, even with -f.  This
means that newapkbuild will not be able to deduce what kind of build
system is contained within, so the templates for CMake, Perl, etc are
never used.

This patch ensures checksumming is done right after fetch, so that
unpack works properly.
2018-05-24 17:58:55 +02:00
A. Wilcox
db5ca2996a newapkbuild: fix typo 2018-05-24 17:58:55 +02:00
Jakub Jirutka
6c2fc64d74 newapkbuild: create check() function 2018-05-07 22:33:12 +02:00
Jakub Jirutka
1264917824 newapkbuild: change python to python3 2018-05-07 22:22:26 +02:00
Oliver Smith
d007f7967c newapkbuild: fix typo 2017-12-30 10:46:02 +01:00
Sören Tempel
800e4a8187 newapkbuild.in: fix package_meson by escaping $pkgdir 2017-10-28 10:35:16 +02:00
A. Wilcox
83f37d0076 newapkbuild: use make 'package' phase for CMake as well 2017-10-19 13:25:24 +02:00
Sören Tempel
17eb90499e newapkbuild: always set makedepends in newaport 2017-10-19 10:49:39 +02:00
Sören Tempel
22fe641721 newapkbuild: add command line flag for cmake to getopts
It is documented in the help output but didn't work because getopts(1)
didn't check for that option. I am assuming the person who added cmake
support simply forgot to adjust the getopts line.
2017-10-19 10:42:11 +02:00
Sören Tempel
f91242fe39 newapkbuild: add support for meson 2017-10-19 10:40:28 +02:00
A. Wilcox
0296de9cd1 newapkbuild: detect CMakeLists.txt file for CMake
Some CMake packages do not have cmake/ directory, but all have
CMakeLists.txt present in the root directory.
2017-09-28 10:01:10 +03:00
A. Wilcox
27005a2cb0 newapkbuild: fix usage output 2017-06-23 11:27:41 +03:00
Jakub Jirutka
5dfb7a3634 newapkbuild: fix build_cmake template - escape parameters 2017-05-19 21:19:00 +02:00
Sören Tempel
c95263d877 remove explicit || return 1 from all sample APKBUILDs
Those statement are no longer needed because abuild now runs with
`set -e` by default.

See also: 36d5193776
2017-04-05 10:30:44 +00:00
Jakub Jirutka
948fedc5f7 indent heredocs when possible 2016-08-23 00:09:06 +02:00
Jakub Jirutka
e8508f7b18 add .editorconfig and fix code formatting 2016-08-20 16:16:37 +02:00
Sören Tempel
4bfb5c8fc1 newapkbuild: redirect find(1) stderr to /dev/null
If $sdir is not defined find writes an error message to stderr. For
example when running:

	newapkbuild -n foo -a foo

You will see a find error message because no source url was provided.
This commit silences any find error message. An alternative solution
would be to not invoke find unless $sdir is set.
2016-06-20 11:15:42 +02:00
Jakub Jirutka
8919e1eee8 newapkbuild: remove trailing spaces 2016-06-13 22:49:27 +02:00
Jakub Jirutka
1647fef93a newapkbuild: add empty line after builddir= and quote whole value 2016-06-13 22:43:27 +02:00
Jakub Jirutka
a3ce23dd53 newapkbuild: omit depends_dev if no *.h or *.hpp file found 2016-06-13 12:37:20 +00:00
Jakub Jirutka
630c244cfe newapkbuild: fix undefined variable $_builddir 2016-06-13 12:37:20 +00:00
Natanael Copa
270e5337e7 newapkbuild: rename _builddir to builddir
the _builddir should never been used bu abuild due to the _ prefix.
2016-03-23 10:08:00 +00:00
Michael Zuo
d1ab7ed40f newapkbuild: remove default prepare()
Do not add prepare() to new APKBUILDs in the future, as this
functionality is superseded by the addition of the default prepare
patcher in abuild.
2016-02-22 14:05:25 +02:00
Natanael Copa
d9eba16d35 newapkbuild: dont set CXX/C COMPILER
cmake is normally able to figure it out and setting them may break
ccache.
2015-11-30 07:26:56 +00:00
Natanael Copa
8638dacee0 newapkbuild: do not add --infodir
normally not used
2015-11-30 07:26:56 +00:00
Bartłomiej Piotrowski
e1d64f4b0e newapkbuild: *.la files are removed by default 2015-09-15 20:58:46 +02:00
Isaac Dunham
582b477817 newapkbuild: add CMake support.
This is a first try that *might* work for cross-compiling packages with
an absolute bare minimum of requirements, if you're lucky.
I can't debug that part further, but the references should help with it.
2015-05-27 07:03:35 +00:00
Natanael Copa
ad9db219b8 fix permissions 2014-03-31 11:49:48 +00:00
Natanael Copa
60dda6785f newapkbuild: detect github archives 2013-11-21 09:21:50 +00:00
Natanael Copa
beb15ad8ba newapkbuild: cosmetic fix for help message 2013-10-25 08:14:10 +00:00
Natanael Copa
4757588caf functions: rename abuild_ver to program_version 2013-10-25 07:26:22 +00:00
Natanael Copa
1822f3f624 functions: rename prog to program 2013-10-25 07:24:46 +00:00
Natanael Copa
6a0db56693 newapkbuild: add --build and --host options 2013-08-01 12:32:27 +00:00
Dubiousjim
ef9fb52908 various: use long options, rework usages 2013-07-09 06:59:30 +00:00
Dubiousjim
db1314ac55 various: move conf-loading and i/o to functions 2013-07-09 06:44:01 +00:00
Dubiousjim
811a215018 various: tweak opening comments, whitespace
Also remove incomplete efforts at listing "Depends on: ..."
2013-07-08 14:49:36 +00:00
Natanael Copa
e23f733ad9 newapkbuild: https is also an url 2013-02-20 09:56:24 +00:00
Natanael Copa
bdace10aa6 newapkbuild: add -n option for setting name
So we can set pkgname if it differs from download archive name
2011-12-21 16:57:09 +01:00
Natanael Copa
9947fdfafa newapkbuild: use -y for python instead of -q 2011-06-28 07:21:36 +00:00
Natanael Copa
15718f9cf9 newapkbuild: build and package sections for 'make' buildtype
This buildtype is when there is a simple Makefile only.
2011-06-28 07:20:11 +00:00
Natanael Copa
91c0772347 newapkbuild: not only autotools packages can have init.d scripts 2011-06-28 07:14:02 +00:00
Natanael Copa
b0b66ea098 newapkbuild: rename config_* functions to build_*
We call make as well as needed so build_* is better function name.
2011-06-28 07:11:02 +00:00
Fabian Affolter
50dd6eab65 Added python as a new template
With -q ('-q' for the moment, please change that) a template
APKBUILD file for a python module is created. 'depends' and
'makedepends' are filled with standard values.
2011-06-28 07:02:36 +00:00
Natanael Copa
ac830aeb87 newapkbuild: fix previous commit 2011-06-06 08:28:31 +00:00
Natanael Copa
a94ef4776a newapkbuild: remove libtool archives 2011-06-03 14:20:08 +00:00
Natanael Copa
50cfdd620a newapkbuild: assume perl package if package name starts with perl- 2011-03-17 10:51:07 +00:00