diff options
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 41 |
3 files changed, 46 insertions, 14 deletions
@@ -1,18 +1,19 @@ pkgbase = r-httpuv pkgdesc = HTTP and WebSocket Server Library pkgver = 1.6.5 - pkgrel = 1 + pkgrel = 2 url = https://cran.r-project.org/package=httpuv arch = i686 arch = x86_64 - license = GPL2 - license = GPL3 - makedepends = make - depends = r>=2.15.1 - depends = r-rcpp>=1.0.7 + license = GPL + checkdepends = r-curl + checkdepends = r-testthat + checkdepends = r-websocket + depends = libuv + depends = r-rcpp depends = r-r6 depends = r-promises - depends = r-later>=0.8.0 + depends = r-later depends = zlib optdepends = r-testthat optdepends = r-callr diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..018a3de08144 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +* +!PKGBUILD +!.SRCINFO +!.gitignore @@ -1,26 +1,53 @@ +# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com> # Contributor: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com _cranname=httpuv _cranver=1.6.5 pkgname=r-${_cranname,,} pkgver=${_cranver//[:-]/.} -pkgrel=1 +pkgrel=2 pkgdesc="HTTP and WebSocket Server Library" arch=(i686 x86_64) url="https://cran.r-project.org/package=${_cranname}" -license=(GPL2 GPL3) -depends=('r>=2.15.1' 'r-rcpp>=1.0.7' r-r6 r-promises 'r-later>=0.8.0' zlib) -makedepends=(make) -optdepends=(r-testthat r-callr r-curl r-websocket) +license=(GPL) +depends=( + libuv + r-rcpp + r-r6 + r-promises + r-later + zlib +) +checkdepends=(r-curl r-testthat r-websocket) +optdepends=( + r-testthat + r-callr + r-curl + r-websocket +) source=("https://cran.r-project.org/src/contrib/${_cranname}_${_cranver}.tar.gz") sha256sums=('f5f63629ca5e9d0e396a89982d95b5286726c0cb425166f35a3ad32a60a79156') +prepare() { + # build against system libuv + sed -i -e 's|PKG_LIBS = ./libuv/.libs/libuv.a|PKG_LIBS = -luv|' \ + -e 's|-Ilibuv/include ||' \ + -e 's|$(SHLIB): libuv/.libs/libuv.a|$(SHLIB):|' \ + "${_cranname}/src/Makevars" +} + build() { - R CMD INSTALL ${_cranname}_${_cranver}.tar.gz -l "${srcdir}" + mkdir -p build + R CMD INSTALL "${_cranname}" -l "${srcdir}/build" +} + +check() { + cd "${_cranname}/tests" + R_LIBS="${srcdir}/build" LC_TIME=C NOT_CRAN=true Rscript --vanilla testthat.R } package() { install -dm0755 "${pkgdir}/usr/lib/R/library" - cp -a --no-preserve=ownership "${_cranname}" "${pkgdir}/usr/lib/R/library" + cp -a --no-preserve=ownership "build/${_cranname}" "${pkgdir}/usr/lib/R/library" } |