Hi,
please see some comments below.
On Wed, Jan 23, 2019 at 4:11 PM Alex Raschi <raschi.alex@gmail.com> wrote:
> * move a dir in -doc subpackage too> ---> testing/luakit/APKBUILD | 28 +++++++++++++------> testing/luakit/tests.patch | 55 ++++++++++++++++++++++++++++++++++++++> 2 files changed, 75 insertions(+), 8 deletions(-)> create mode 100644 testing/luakit/tests.patch>> diff --git a/testing/luakit/APKBUILD b/testing/luakit/APKBUILD> index d0cbf548d0..17ad52bb03 100644> --- a/testing/luakit/APKBUILD> +++ b/testing/luakit/APKBUILD> @@ -2,18 +2,18 @@> # Maintainer:> pkgname=luakit> pkgver=2.1> -pkgrel=0> +pkgrel=1> pkgdesc="Fast, small, webkit based browser framework extensible by Lua"> -url="https://github.com/luakit/luakit"> +url="https://luakit.github.io/"> arch="all !s390x" # luajit is missing for s390x> -license="GPL-3.0"> -depends="lua5.1-filesystem lua5.1-luassert"> -depends_dev=""> +license="GPL-3.0-or-later"> +depends="gsettings-desktop-schemas lua5.1-filesystem"> makedepends="webkit2gtk-dev luajit-dev"> -install=""> +checkdepends="xvfb luacheck lua5.1-luassert"> subpackages="$pkgname-doc"> source="$pkgname-$pkgver.tar.gz::> https://github.com/$pkgname/$pkgname/archive/$pkgver.tar.gz> - config-mk.patch"> + config-mk.patch> + tests.patch"> builddir="$srcdir/$pkgname-$pkgver">> build() {> @@ -21,10 +21,22 @@ build() {> make PREFIX=/usr USE_LUAJIT=1 DEVELOPMENT_PATHS=0> }>> +check() {> + cd "$builddir"> + make run-tests> +}> +>
The tests seem to use the local display server rathen than xvfb. They will
fail on the headless systems like the buildboxes.
> package() {> cd "$builddir"> make PREFIX=/usr DESTDIR="$pkgdir" install> }>> +doc() {> + mkdir -p "$subpkgdir"/usr/share/luakit> + mv "$pkgdir"/usr/share/luakit/doc "$subpkgdir"/usr/share/luakit> + default_doc> +}> +>
You can avoid defining a custom doc() function. Just move
usr/share/luakit/doc/* into "$pkgdir"/usr/share/doc/$pkgname/.
This is the approach been used so far to move stuff in doc subpkg.
Thanks!
/eo
Hi
> The tests seem to use the local display server rathen than xvfb. They
will
> fail on the headless systems like the buildboxes.
Prior to submitting the patch i tried running the tests on a standard
alpine chroot
(X wasn't running on the chroot and neither on the host) and they succeded.
I basically stopped X server and ran them from tty.
I don't know if there is a way to force it to use xvfb even when there is
another X
server running. I will do some research, but they should work on headless.
> You can avoid defining a custom doc() function. Just move
usr/share/luakit/doc/* into "$pkgdir"/usr/share/doc/$pkgname/.
> This is the approach been used so far to move stuff in doc subpkg.
Thanks for tip!
On Tue, Feb 5, 2019 at 1:13 PM Leonardo Arena <rnalrd@gmail.com> wrote:
> Hi,>> please see some comments below.>> On Wed, Jan 23, 2019 at 4:11 PM Alex Raschi <raschi.alex@gmail.com> wrote:>>> * move a dir in -doc subpackage too>> --->> testing/luakit/APKBUILD | 28 +++++++++++++------>> testing/luakit/tests.patch | 55 ++++++++++++++++++++++++++++++++++++++>> 2 files changed, 75 insertions(+), 8 deletions(-)>> create mode 100644 testing/luakit/tests.patch>>>> diff --git a/testing/luakit/APKBUILD b/testing/luakit/APKBUILD>> index d0cbf548d0..17ad52bb03 100644>> --- a/testing/luakit/APKBUILD>> +++ b/testing/luakit/APKBUILD>> @@ -2,18 +2,18 @@>> # Maintainer:>> pkgname=luakit>> pkgver=2.1>> -pkgrel=0>> +pkgrel=1>> pkgdesc="Fast, small, webkit based browser framework extensible by Lua">> -url="https://github.com/luakit/luakit">> +url="https://luakit.github.io/">> arch="all !s390x" # luajit is missing for s390x>> -license="GPL-3.0">> -depends="lua5.1-filesystem lua5.1-luassert">> -depends_dev="">> +license="GPL-3.0-or-later">> +depends="gsettings-desktop-schemas lua5.1-filesystem">> makedepends="webkit2gtk-dev luajit-dev">> -install="">> +checkdepends="xvfb luacheck lua5.1-luassert">> subpackages="$pkgname-doc">> source="$pkgname-$pkgver.tar.gz::>> https://github.com/$pkgname/$pkgname/archive/$pkgver.tar.gz>> - config-mk.patch">> + config-mk.patch>> + tests.patch">> builddir="$srcdir/$pkgname-$pkgver">>>> build() {>> @@ -21,10 +21,22 @@ build() {>> make PREFIX=/usr USE_LUAJIT=1 DEVELOPMENT_PATHS=0>> }>>>> +check() {>> + cd "$builddir">> + make run-tests>> +}>> +>>>> The tests seem to use the local display server rathen than xvfb. They will> fail on the headless systems like the buildboxes.>>>>> package() {>> cd "$builddir">> make PREFIX=/usr DESTDIR="$pkgdir" install>> }>>>> +doc() {>> + mkdir -p "$subpkgdir"/usr/share/luakit>> + mv "$pkgdir"/usr/share/luakit/doc "$subpkgdir"/usr/share/luakit>> + default_doc>> +}>> +>>>>> You can avoid defining a custom doc() function. Just move> usr/share/luakit/doc/* into "$pkgdir"/usr/share/doc/$pkgname/.> This is the approach been used so far to move stuff in doc subpkg.>>> Thanks!>> /eo>