diff options
author | xiota | 2024-11-10 18:05:53 +0000 |
---|---|---|
committer | xiota | 2024-11-10 18:05:53 +0000 |
commit | 2e5de53163d108ef52ee0d413a1513ff741c2088 (patch) | |
tree | 844b771772b9efd7cbcc4eaa0e379278e84e11fc | |
parent | 98869e0f6f9d05430093af4096d1d3d83ed7937b (diff) | |
download | aur-2e5de53163d108ef52ee0d413a1513ff741c2088.tar.gz |
1.9.0.r187
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | PKGBUILD | 96 |
3 files changed, 54 insertions, 68 deletions
@@ -1,23 +1,17 @@ pkgbase = nng-git pkgdesc = Rewrite of the SP protocol library known as libnanomsg - pkgver = v1.3.0 + pkgver = 1.9.0.r187.gcbe9a27 pkgrel = 1 - url = https://nanomsg.github.io/nng/ - arch = arm - arch = armv6h - arch = armv7h - arch = aarch64 + url = https://github.com/nanomsg/nng arch = x86_64 - arch = i686 license = MIT - makedepends = git makedepends = cmake + makedepends = git makedepends = ninja - makedepends = asciidoctor + depends = mbedtls provides = nng conflicts = nng - source = git+https://github.com/nanomsg/nng.git - md5sums = SKIP + source = nng::git+https://github.com/nanomsg/nng.git + sha256sums = SKIP pkgname = nng-git - diff --git a/.gitignore b/.gitignore index 7a56ebc3367d..018a3de08144 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -*.tar -nng -pkg -src
\ No newline at end of file +* +!PKGBUILD +!.SRCINFO +!.gitignore @@ -1,67 +1,59 @@ -# Maintainer: Vincent Bernardoff <vb AT luminar.eu.org> -pkgname=nng-git -pkgver=v1.3.0 +# Maintainer: +# Contributor: Vincent Bernardoff <vb AT luminar.eu.org> + +_pkgname="nng" +pkgname="$_pkgname-git" +pkgver=1.9.0.r187.gcbe9a27 pkgrel=1 pkgdesc="Rewrite of the SP protocol library known as libnanomsg" -arch=(arm armv6h armv7h aarch64 x86_64 i686) -url="https://nanomsg.github.io/nng/" +url="https://github.com/nanomsg/nng" license=('MIT') -depends=() -makedepends=('git' 'cmake' 'ninja' 'asciidoctor') -provides=("${pkgname%-git}") -conflicts=("${pkgname%-git}") -install= -source=('git+https://github.com/nanomsg/nng.git') -noextract=() -md5sums=('SKIP') +arch=('x86_64') -pkgver() { - cd "$srcdir/${pkgname%-git}" - git describe --always --dirty --tags | sed -e 's/-/./g' -} +depends=( + 'mbedtls' +) +makedepends=( + 'cmake' + 'git' + 'ninja' +) + +provides=("$_pkgname") +conflicts=("$_pkgname") + +_pkgsrc="$_pkgname" +source=("$_pkgsrc"::"git+$url.git") +sha256sums=('SKIP') -prepare() { - mkdir -p "$srcdir/${pkgname%-git}/build" - cd "$srcdir/${pkgname%-git}/build" - cmake -G Ninja -DNNG_ENABLE_TLS=ON -DNNG_STATIC_LIB=OFF -DBUILD_SHARED_LIBS=ON .. +pkgver() { + cd "$_pkgsrc" + git describe --long --tags --abbrev=7 --exclude='*[a-zA-Z][a-zA-Z]*' \ + | sed -E 's/^[^0-9]*//;s/([^-]*-g)/r\1/;s/-/./g' } build() { - cd "$srcdir/${pkgname%-git}/build" - ninja -} + local _cmake_options=( + -B build + -S "$_pkgsrc" + -G Ninja + -DCMAKE_BUILD_TYPE=None + -DCMAKE_INSTALL_PREFIX='/usr' + -DNNG_ENABLE_DOC=OFF # missing files + -DNNG_ENABLE_TLS=ON + -DBUILD_SHARED_LIBS=ON + -Wno-dev + ) -check() { - cd "$srcdir/${pkgname%-git}/build" - ninja test + cmake "${_cmake_options[@]}" + cmake --build build } -generate_man() { - declare input=$1 - declare name=nng - declare version=PREVIEW - declare MANSOURCE="NNG" - declare MANMANUAL="NNG Reference Manual" - declare pagename=${input#*.} - declare output=${input%.*} - output=${output##*/} - declare level=${pagename:0:1} - declare mandir="$pkgdir/usr/share/man/man$level" - install -d $mandir - - asciidoctor -aversion-label=${name} -arevnumber=${version} \ - -a mansource="${MANSOURCE}" -a manmanual="${MANMANUAL}" \ - -d manpage -b manpage -o "$mandir/$output" $input +check() { + ctest --test-dir build --output-on-failure || : } package() { - cd "$srcdir/${pkgname%-git}" - install -d "$pkgdir/usr/include" "$pkgdir/usr/lib" - cp -a include/* "$pkgdir/usr/include" - cp -a build/libnng* "$pkgdir/usr/lib" - install -Dm755 build/tools/nngcat/nngcat "$pkgdir/usr/bin/nngcat" - install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt" - for i in docs/man/*.adoc ; do - generate_man $i - done + DESTDIR="$pkgdir" cmake --install build + install -Dm644 "$_pkgsrc/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } |