diff options
author | xiota | 2023-11-23 16:03:52 -0800 |
---|---|---|
committer | xiota | 2023-11-23 16:05:04 -0800 |
commit | cb27b1f7734fbf6d6d5901a937d46cc8b9cfb74e (patch) | |
tree | 3ff889911c88d7f0bf18aff017a86fb9eb361184 | |
parent | a20a367e4ffb59f2cb684f6f0b9afb3c9bfc1d60 (diff) | |
download | aur-cb27b1f7734fbf6d6d5901a937d46cc8b9cfb74e.tar.gz |
update depends, pkgver(), build(), package()
add git submodules
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 134 |
3 files changed, 121 insertions, 46 deletions
@@ -1,33 +1,34 @@ pkgbase = nextcloud-client-git pkgdesc = Nextloud client for linux - pkgver = 3.4.0.rc2.r181.gc69cecced + pkgver = 3.10.1.r224.gbfb016c28 pkgrel = 1 - url = https://nextcloud.com/ + url = https://github.com/nextcloud/desktop arch = i686 arch = x86_64 license = GPL2 + makedepends = cmocka makedepends = doxygen makedepends = extra-cmake-modules + makedepends = git makedepends = python-sphinx makedepends = qt5-tools - makedepends = git - makedepends = cmocka + depends = inkscape + depends = karchive5 + depends = libcloudproviders depends = openssl - depends = sqlite - depends = qtkeychain + depends = qt5-graphicaleffects + depends = qt5-quickcontrols2 depends = qt5-svg depends = qt5-webengine - depends = xdg-utils depends = qt5-webkit - depends = libcloudproviders - depends = qt5-graphicaleffects - depends = qt5-quickcontrols2 depends = qt5-websockets - depends = inkscape - optdepends = kio: integration with Dolphin + depends = qtkeychain-qt5 + depends = sqlite + depends = xdg-utils + optdepends = kio5: integration with Dolphin optdepends = nemo-python: integration with Nemo - optdepends = python-nautilus: integration with Nautilus optdepends = python-caja: integration with Caja + optdepends = python-nautilus: integration with Nautilus provides = mirall provides = mirall-git provides = owncloud-client @@ -39,6 +40,8 @@ pkgbase = nextcloud-client-git conflicts = owncloud-client-git backup = etc/Nextcloud/sync-exclude.lst source = nextcloud-client::git+https://github.com/nextcloud/desktop.git + source = dschmidt.libcrashreporter-qt::git+https://github.com/dschmidt/libcrashreporter-qt.git + sha256sums = SKIP sha256sums = SKIP pkgname = nextcloud-client-git diff --git a/.gitignore b/.gitignore index 05c6d4d4c97b..018a3de08144 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ * -!.gitignore -!.SRCINFO !PKGBUILD +!.SRCINFO +!.gitignore @@ -1,53 +1,125 @@ -# Maintainer: Michael Riegert <michael at eowyn net> +# Maintainer: +# Contributor: Michael Riegert <michael at eowyn net> # Contributor: Danilo Kuehn <dk at nogo-software dot de> -pkgname=nextcloud-client-git -_name=${pkgname/\-git/} -pkgver=3.4.0.rc2.r181.gc69cecced +_pkgname="nextcloud-client" +pkgname="$_pkgname-git" +pkgver=3.10.1.r224.gbfb016c28 pkgrel=1 pkgdesc="Nextloud client for linux" -arch=('i686' 'x86_64') -url="https://nextcloud.com/" +#url="https://nextcloud.com/" +url="https://github.com/nextcloud/desktop" license=('GPL2') -depends=(openssl sqlite qtkeychain qt5-svg qt5-webengine xdg-utils qt5-webkit - libcloudproviders qt5-graphicaleffects qt5-quickcontrols2 qt5-websockets inkscape) -makedepends=(doxygen extra-cmake-modules python-sphinx qt5-tools git cmocka) +arch=('i686' 'x86_64') + +depends=( + inkscape + karchive5 + libcloudproviders + openssl + qt5-graphicaleffects + qt5-quickcontrols2 + qt5-svg + qt5-webengine + qt5-webkit + qt5-websockets + qtkeychain-qt5 + sqlite + xdg-utils +) +makedepends=( + cmocka + doxygen + extra-cmake-modules + git + python-sphinx + qt5-tools +) optdepends=( - 'kio: integration with Dolphin' - 'nemo-python: integration with Nemo' - 'python-nautilus: integration with Nautilus' - 'python-caja: integration with Caja' + 'kio5: integration with Dolphin' + 'nemo-python: integration with Nemo' + 'python-caja: integration with Caja' + 'python-nautilus: integration with Nautilus' ) provides=('mirall' 'mirall-git' 'owncloud-client' 'nextcloud-client') conflicts=('mirall-git' 'owncloud-client' 'owncloud-client-ngs' 'nextcloud-client' 'owncloud-client-git') backup=('etc/Nextcloud/sync-exclude.lst') -source=("${_name}::git+https://github.com/nextcloud/desktop.git") -sha256sums=('SKIP') + +_pkgsrc="$_pkgname" +source=( + "$_pkgsrc"::"git+https://github.com/nextcloud/desktop.git" + 'dschmidt.libcrashreporter-qt'::'git+https://github.com/dschmidt/libcrashreporter-qt.git' +) +sha256sums=( + 'SKIP' + 'SKIP' +) pkgver() { - cd ${srcdir}/${_name} - git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' + cd "$_pkgsrc" + + local _file='VERSION.cmake' + + local _ver_major=$( + grep -E 'MIRALL_VERSION_MAJOR\s+([0-9]+)' "$_file" \ + | sed -E 's@^.*MIRALL_VERSION_MAJOR\s+([0-9]+).*$@\1@' + ) + local _ver_minor=$( + grep -E 'MIRALL_VERSION_MINOR\s+([0-9]+)' "$_file" \ + | sed -E 's@^.*MIRALL_VERSION_MINOR\s+([0-9]+).*$@\1@' + ) + local _version=$( + git tag -l "v${_ver_major:?}.${_ver_minor:?}.[0-9]" | sort -h | tail -1 + ) + local _revision=$( + git rev-list --count ${_version:?}..HEAD + ) + local _hash=$( + git rev-parse --short HEAD + ) + + printf '%s.r%s.g%s' \ + "${_version#v}" \ + "${_revision:?}" \ + "${_hash:?}" } +_prepare_nextcloud_client() ( + cd "${srcdir:?}/$_pkgsrc" + local -A _submodules=( + ['dschmidt.libcrashreporter-qt']='src/3rdparty/libcrashreporter-qt' + ) + _submodule_update +) + prepare() { - cd ${srcdir}/${_name} - if [[ -n "${_version}" ]]; then - git checkout "v${_version}" - fi - git submodule update --init --recursive - mkdir -p build + _submodule_update() { + local key; + for key in ${!_submodules[@]} ; do + git submodule init "${_submodules[${key}]}" + git submodule set-url "${_submodules[${key}]}" "${srcdir}/${key}" + git -c protocol.file.allow=always submodule update "${_submodules[${key}]}" + done + } + + _prepare_nextcloud_client } build() { - cd ${srcdir}/${_name}/build - cmake .. -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DCMAKE_BUILD_TYPE="Release" \ - -DWITH_DOC=FALSE - make + local _cmake_options=( + -B build + -S "$_pkgsrc" + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_INSTALL_PREFIX='/usr' + -DCMAKE_INSTALL_LIBDIR='lib' + -DWITH_DOC=FALSE + -Wno-dev + ) + + cmake "${_cmake_options[@]}" + cmake --build build } package() { - cd ${srcdir}/${_name}/build - make DESTDIR=${pkgdir} install + DESTDIR="${pkgdir:?}" cmake --install build } |