You are not logged in.
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
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
Offline
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
Thank you!
Offline
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@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-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/"
}
Last edited by wmarler (2020-09-12 15:36:41)
Offline
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
Offline
I did! It builds, installs, and works!
Thanks for the review.
Offline
I've tried it with a slightly updated version
Kodi: 18.8
Nextpvr addon: 3.3.21
like so:
# Maintainer: Will Marler <will@wmarler.com>
pkgname=kodi-addon-pvr-nextpvr
pkgver=3.3.21
pkgrel=1
pkgdesc='NextPVR PVR client addon for Kodi'
_koditarget=Leia
_gitname=pvr.nextpvr
_kodiver=18.8
arch=('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=('1f5576070a0bf076d1f28cdd547bc4ff134861c18a71cff7fd036eaacc357707'
'6deb28f725880b1ab6c5920b55ef1190a79b0684ffb30b6e13b199d23a0af296')
build() {
cmake \
-DADDONS_TO_BUILD=pvr.nextpvr \
-DADDONS_SRC_PREFIX=../.. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib/kodi \
-DBUILD_SHARED_LIBS=1 \
-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/"
}
and I get the following error:
[ 27%] Performing patch step for 'tinyxml'
Error: Target (for copy_if_different command) "" is not a directory.
make[2]: *** [depends/CMakeFiles/tinyxml.dir/build.make:122: build/tinyxml/src/tinyxml-stamp/tinyxml-patch] Error 1
make[2]: Leaving directory '/home/primoz/Programi/kodi-addon-pvr-nextpvr/src/build'
make[1]: *** [CMakeFiles/Makefile2:286: depends/CMakeFiles/tinyxml.dir/all] Error 2
make[1]: Leaving directory '/home/primoz/Programi/kodi-addon-pvr-nextpvr/src/build'
make: *** [Makefile:103: all] Error 2
Any help would be apreciated.
Last edited by khartahk (2020-09-25 15:18:09)
Offline
I ran into the same problem.
I was able to build by cloning the repo and following the commands in the readme.md though, so I'm pretty sure the problem is in the arguments to cmake. But I haven't spent the time on it (and in fact never submitted my package to the AUR either)
Offline
If you run "make VERBOSE=1" it should print the command being run, which will give you a better idea of what is failing.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
Thank you, I'll give that a try.
Offline
Ok, I made some progress. Didn't fix anything, but I made some progress.
I was able to build pvr.nextpvr by following the README.md in the git repository, but only for the cloned repos:
1. `git clone --branch Leia https://github.com/xbmc/xbmc.git`
2. `git clone https://github.com/kodi-pvr/pvr.nextpvr.git`
3. `cd pvr.nextpvr && mkdir build && cd build`
4. `cmake -DADDONS_TO_BUILD=pvr.nextpvr -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons`
5. `make`
The resulting built files are located in ../../xbmc/addons/pvr.nextpvr (or in other words: the addons dir of the xbmc repo I just cloned), and copying that directory to /usr/share/kodi/addons/ should be enough to get the addon to run.
Unfortunately when I do that I get a version mismatch, and I'm guessing that's because the version of kodi from the git repo isn't "18.8-1" which is what's in the Arch repo.
When I go to build the addon using the available packages, unzipping kodi-18.8_Leia.tar.gz to 'xbmc' and 'pvr.nextpvr-3.3.21-Leia.tar.gz' to pvr.nextpvr and following the instructions, then I get the build error previously reported:
[ 36%] Performing patch step for 'tinyxml'
Error: Target (for copy_if_different command) "" is not a directory.
make[2]: *** [depends/CMakeFiles/tinyxml.dir/build.make:122: build/tinyxml/src/tinyxml-stamp/tinyxml-patch] Error 1
make[1]: *** [CMakeFiles/Makefile2:258: depends/CMakeFiles/tinyxml.dir/all] Error 2
make: *** [Makefile:103: all] Error 2
Offline
I raised this with the pvr.nextpvr team: https://github.com/kodi-pvr/pvr.nextpvr/issues/151
Offline
emveepee declined to look into this citing Arch linux not being supported, and not knowing how cmake works.
I tried building again using my PKGBUILD from comment #5 and ... this time it didn't work. Same error regarding tinyxml: Error: Target (for copy_if_different command) "" is not a directory.
It looks to me like cmake is generating an eroneous command, but I don't understand where this is coming from. Using make VERBOSE=1 I can see where:
[ 27%] Performing patch step for 'tinyxml'
cd /tmp/makepkg/kodi-addon-pvr-nextpvr/src/build/build/tinyxml/src/tinyxml && /usr/bin/cmake -E copy_if_different /tmp/makepkg/kodi-addon-pvr-nextpvr/src/xbmc-18.8-Leia/cmake/addons/depends/common/tinyxml/CMakeLists.txt /tmp/makepkg/kodi-addon-pvr-nextpvr/src/build/build/tinyxml/src/tinyxml ""
Error: Target (for copy_if_different command) "" is not a directory.
make[2]: *** [depends/CMakeFiles/tinyxml.dir/build.make:122: build/tinyxml/src/tinyxml-stamp/tinyxml-patch] Error 1
make[2]: Leaving directory '/tmp/makepkg/kodi-addon-pvr-nextpvr/src/build'
make[1]: *** [CMakeFiles/Makefile2:286: depends/CMakeFiles/tinyxml.dir/all] Error 2
make[1]: Leaving directory '/tmp/makepkg/kodi-addon-pvr-nextpvr/src/build'
make: *** [Makefile:103: all] Error 2
It looks to me like the "" is spurious, and indeed if I manually copy /tmp/makepkg/kodi-addon-pvr-nextpvr/src/xbmc-18.8-Leia/cmake/addons/depends/common/tinyxml/CMakeLists.txt to /tmp/makepkg/kodi-addon-pvr-nextpvr/src/build/build/tinyxml/src/tinyxml and run make again, the build succeeds.
Does anyone know what is driving cmake on this?
Offline
Welp, I got it building. I can't say I'm thrilled about how: using sed and rm in prepare() to trim out references to the tinyxml cmake dependency on the fly. It works though.
# Maintainer: Will Marler <will@wmarler.com>
pkgname=kodi-addon-pvr-nextpvr
pkgver=3.3.21
pkgrel=1
pkgdesc='NextPVR PVR client addon for Kodi'
_koditarget=Leia
_gitname=pvr.nextpvr
_kodiver=18.8
arch=('x86_64')
url="https://github.com/kodi-pvr/${_gitname}"
license=('GPL2')
groups=('kodi-addons')
makedepends=('cmake' 'kodi-platform' 'git' 'kodi-dev' 'tinyxml')
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=('1f5576070a0bf076d1f28cdd547bc4ff134861c18a71cff7fd036eaacc357707'
'6deb28f725880b1ab6c5920b55ef1190a79b0684ffb30b6e13b199d23a0af296')
prepare() {
#Delete references to tinyxml cmake dependencies in kodi src
cd xbmc-${_kodiver}-${_koditarget}
sed -i -e '1d' cmake/addons/depends/common/kodi-platform/deps.txt
rm -rf cmake/addons/depends/common/tinyxml
}
build() {
mkdir -p "${_gitname}-${pkgver}-${_koditarget}/build"
cd "${_gitname}-${pkgver}-${_koditarget}/build"
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DADDONS_TO_BUILD=${_gitname} \
-DPACKAGE_ZIP=1 \
../../xbmc-${_kodiver}-${_koditarget}/cmake/addons
make
}
package() {
cd "${_gitname}-${pkgver}-${_koditarget}/build"
install -d "${pkgdir}/usr/share/kodi/addons"
mv .install/${_gitname} "${pkgdir}/usr/share/kodi/addons"
}
Offline
I've submitted: https://aur.archlinux.org/packages/kodi … r-nextpvr/
Offline