You are not logged in.

#1 2020-04-16 23:30:23

wmarler
Member
From: Denver, CO
Registered: 2015-04-18
Posts: 14

PKGBUILD review request: kodi-addon-pvr-nextpvr

My first PKGBUILD. Is this good to be submitted to the AUR?

How do I fix namcap's warning about the sources? Or is it not important?

% namcap PKGBUILD 
PKGBUILD (kodi-addon-pvr-nextpvr) W: Non-unique source name (3.3.19-Leia.tar.gz). Use a unique filename.
PKGBUILD (kodi-addon-pvr-nextpvr) W: Non-unique source name (18.6-Leia.tar.gz). Use a unique filename.

The PKGBUILD itself:

# Maintainer: Will Marler <will@wmarler.com>
pkgname=kodi-addon-pvr-nextpvr
pkgver=3.3.19
pkgrel=1
pkgdesc='NextPVR PVR client addon for [Kodi]'
_koditarget=Leia
_gitname=pvr.nextpvr
_kodiver=18.6
arch=('armv7h' 'i686' 'x86_64')
url="https://github.com/kodi-pvr/${_gitname}"
license=('GPL2')
groups=('kodi')
makedepends=('cmake' 'kodi-platform' 'git' )
depends=('kodi')
provides=('kodi-addon-pvr-nextpvr')
source=("https://github.com/kodi-pvr/${_gitname}/archive/${pkgver}-${_koditarget}.tar.gz"
        "https://github.com/xbmc/xbmc/archive/${_kodiver}-${_koditarget}.tar.gz"
)
sha256sums=('5f1b7fa00d7248fa840a0e7574bb7714867bff4ad81ceb8ed33cb3aa6d5ccbe9'
            '47e6d7d4e01dbda92ff83a3e141ac43003e918133e78b3a4b79faff65184711c')
 
build() {
    mkdir -p "pvr.nextpvr-${pkgver}-${_koditarget}/build"
    cd "pvr.nextpvr-${pkgver}-${_koditarget}/build"
 
    cmake \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_INSTALL_LIBDIR=/usr/lib/kodi \
        -DCMAKE_BUILD_TYPE=Release \
        -DBUILD_SHARED_LIBS=1 \
        -DADDONS_TO_BUILD=pvr.nextpvr \
        -DADDONS_SRC_PREFIX=../.. \
        ../../xbmc-${_kodiver}-${_koditarget}/cmake/addons
    make
}
       
package() {
    cd "pvr.nextpvr-${pkgver}-${_koditarget}/build"
    install -d "${pkgdir}/usr"
    mv .install/lib "${pkgdir}/usr/"
    mv .install/share "${pkgdir}/usr/"
}

Thanks in advance,

Last edited by wmarler (2020-04-16 23:48:39)

Offline

#2 2020-04-16 23:39:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 23,441
Website

Re: PKGBUILD review request: kodi-addon-pvr-nextpvr

Read the Big Red Warning.

Get rid of the provides variable, and remove the self-referential name in the description.

Also please update your title to indicate the package rather than repeating twice something that already has little information as that's what this sub forum is for.

Last edited by Trilby (2020-04-17 00:23:43)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#3 2020-04-17 00:21:28

loqs
Member
Registered: 2014-03-06
Posts: 10,586

Re: PKGBUILD review request: kodi-addon-pvr-nextpvr

Slightly shorter version of build() and package()

build() {
    cmake \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_INSTALL_LIBDIR=/usr/lib/kodi \
        -DCMAKE_BUILD_TYPE=Release \
        -DBUILD_SHARED_LIBS=1 \
        -DADDONS_TO_BUILD=pvr.nextpvr \
        -DADDONS_SRC_PREFIX=. \
        -B build \
        xbmc-${_kodiver}-${_koditarget}/cmake/addons
    make -C build
}
       
package() {
    install -d "${pkgdir}/usr"
    mv build/.install/lib "${pkgdir}/usr/"
    mv build/.install/share "${pkgdir}/usr/"
}

Offline

#4 2020-04-17 01:35:35

wmarler
Member
From: Denver, CO
Registered: 2015-04-18
Posts: 14

Re: PKGBUILD review request: kodi-addon-pvr-nextpvr

Thank you!

Offline

#5 2020-04-17 03:31:39

wmarler
Member
From: Denver, CO
Registered: 2015-04-18
Posts: 14

Re: PKGBUILD review request: kodi-addon-pvr-nextpvr

Trilby wrote:

remove the self-referential name in the description

Sure, do you have a suggestion/preference? I was following the convention of the other kodi addons in the AUR

Suggestions incorporated:

# Maintainer: Will Marler <will@marler.com>
pkgname=kodi-addon-pvr-nextpvr
pkgver=3.3.19
pkgrel=1
pkgdesc='NextPVR PVR client addon for Kodi'
_koditarget=Leia
_gitname=pvr.nextpvr
_kodiver=18.6
arch=('armv7h' 'i686' 'x86_64')
url="https://github.com/kodi-pvr/${_gitname}"
license=('GPL2')
groups=('kodi-addons')
makedepends=('cmake' 'kodi-platform' 'git' 'kodi-dev')
depends=('kodi')
source=("$pkgname-$pkgver.tar.gz::https://github.com/kodi-pvr/${_gitname}/archive/${pkgver}-${_koditarget}.tar.gz"
        "kodi-${_kodiver}_${_koditarget}.tar.gz::https://github.com/xbmc/xbmc/archive/${_kodiver}-${_koditarget}.tar.gz"
)
sha256sums=('5f1b7fa00d7248fa840a0e7574bb7714867bff4ad81ceb8ed33cb3aa6d5ccbe9'
            '47e6d7d4e01dbda92ff83a3e141ac43003e918133e78b3a4b79faff65184711c')
build() {
    cmake \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_INSTALL_LIBDIR=/usr/lib/kodi \
        -DCMAKE_BUILD_TYPE=Release \
        -DBUILD_SHARED_LIBS=1 \
        -DADDONS_TO_BUILD=pvr.nextpvr \
        -DADDONS_SRC_PREFIX=../.. \
        -B build \
        xbmc-${_kodiver}-${_koditarget}/cmake/addons
    make -C build
}
       
package() {
    install -d "${pkgdir}/usr"
    mv build/.install/lib "${pkgdir}/usr/"
    mv build/.install/share "${pkgdir}/usr/"
}

Offline

#6 2020-04-17 03:33:00

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 23,441
Website

Re: PKGBUILD review request: kodi-addon-pvr-nextpvr

Sorry, scratch that bit of advice.  I'm not familiar with Kodi - that approach does seem to be the de-facto standard and makes sense in hindsight.  The rest is looking good (though I didn't test it out).

Last edited by Trilby (2020-04-17 03:33:42)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#7 2020-04-17 03:35:47

wmarler
Member
From: Denver, CO
Registered: 2015-04-18
Posts: 14

Re: PKGBUILD review request: kodi-addon-pvr-nextpvr

I did! It builds, installs, and works!

Thanks for the review.

Offline

Board footer

Powered by FluxBB