diff options
author | xiota | 2023-12-19 00:53:39 -0800 |
---|---|---|
committer | xiota | 2023-12-19 00:53:55 -0800 |
commit | c2237e226d3c09ac7c1d08a89dc2a974c7085ff2 (patch) | |
tree | 60ea5f6efad024e97e102f6fbbf5b2d1f7b84d04 | |
parent | 56f2dab35e51695df0fa1b89384967c5343967dd (diff) | |
download | aur-c2237e226d3c09ac7c1d08a89dc2a974c7085ff2.tar.gz |
0.0.95.1.r238: reorganize
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 194 |
3 files changed, 171 insertions, 53 deletions
@@ -1,23 +1,29 @@ pkgbase = quaternion-git - pkgdesc = Qt5-based IM client for the Matrix protocol - pkgver = 0.0.95.1.flatpak.r6.g3a85cc4 + pkgdesc = Qt-based IM client for the Matrix protocol + pkgver = 0.0.95.1.r238.gc074213 pkgrel = 1 - url = https://matrix.org/docs/projects/client/quaternion.html + url = https://github.com/quotient-im/Quaternion + arch = aarch64 arch = i686 arch = x86_64 - license = GPL3 + license = GPL-3.0-or-later + license = LGPL-2.1-or-later makedepends = cmake makedepends = git depends = hicolor-icon-theme depends = qt5-multimedia - depends = qt5-tools - depends = qt5-quickcontrols depends = qt5-quickcontrols2 - depends = qt5-graphicaleffects - optdepends = qtkeychain: Store access tokens in a keyring + depends = qt5-tools + depends = qtkeychain-qt5 + optdepends = qt5-graphicaleffects: Display the conversation history at startup provides = quaternion - source = git+https://github.com/QMatrixClient/Quaternion - source = git+https://github.com/quotient-im/libQuotient + conflicts = quaternion + source = quaternion::git+https://github.com/quotient-im/Quaternion + source = libquotient::git+https://github.com/quotient-im/libQuotient + source = gtad::git+https://github.com/quotient-im/gtad.git + source = doxygen-awesome-css::git+https://github.com/jothepro/doxygen-awesome-css.git + sha256sums = SKIP + sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP 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,56 +1,164 @@ -# Maintainer: morguldir <morguldir@protonmail.com> +# Maintainer: +# Contributor: morguldir <morguldir@protonmail.com> # Contributor: Sefa Eyeoglu <contact@scrumplex.net> # Contributor: Ivan Semkin (ivan at semkin dot ru) # Contributor: Martin Weinelt <hexa@darmstadt.ccc.de> - -_appname=Quaternion -_pkgname=quaternion -pkgname=quaternion-git -pkgver=0.0.95.1.flatpak.r26.gb749844 + +## useful links +# https://matrix.org/ +# https://github.com/quotient-im/Quaternion + +## options +: ${_build_git:=true} + +[[ "${_build_git::1}" == "t" ]] && _pkgtype+="-git" + +## basic info +_pkgname="quaternion" +pkgname="$_pkgname${_pkgtype:-}" +pkgver=0.0.95.1.r238.gc074213 pkgrel=1 -pkgdesc='Qt5-based IM client for the Matrix protocol' -url='https://matrix.org/docs/projects/client/quaternion.html' -arch=('i686' 'x86_64') -license=(GPL3) -depends=(hicolor-icon-theme qt5-multimedia qt5-tools qt5-quickcontrols qt5-quickcontrols2 qt5-graphicaleffects) -makedepends=(cmake git) -optdepends=('qtkeychain: Store access tokens in a keyring') -provides=(quaternion) -source=('git+https://github.com/quotient-im/Quaternion' - 'git+https://github.com/quotient-im/libQuotient') -sha256sums=('SKIP' - 'SKIP') - -pkgver() { - cd "$_appname" - git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +pkgdesc='Qt-based IM client for the Matrix protocol' +url="https://github.com/quotient-im/Quaternion" +license=('GPL-3.0-or-later' 'LGPL-2.1-or-later') +arch=('aarch64' 'i686' 'x86_64') + +## main package +_main_package() { + depends=( + hicolor-icon-theme + qt5-multimedia + qt5-quickcontrols2 + qt5-tools + qtkeychain-qt5 + ) + makedepends=( + cmake + git + ) + optdepends=( + 'qt5-graphicaleffects: Display the conversation history at startup' + ) + + if [ "$pkgname" == "$_pkgname" ] ; then + _main_stable + else + _main_git + fi + +} + +## stable package +_main_stable() { + _pkgsrc="$_pkgname" + source=( + "$_pkgsrc"::"git+https://github.com/quotient-im/Quaternion#tag=${pkgver%%.r*}" + + # submodules for quoternion + "libquotient"::'git+https://github.com/quotient-im/libQuotient' + ) + sha256sums=( + 'SKIP' + + 'SKIP' + ) + + prepare() { + _prepare_submodules_quoternion + } + + pkgver() { + echo "${pkgver%%.r*}" + } +} + +## git package +_main_git() { + provides=("$_pkgname") + conflicts=("$_pkgname") + + _pkgsrc="$_pkgname" + source=( + "$_pkgsrc"::"git+https://github.com/quotient-im/Quaternion" + + # submodules for quoternion + "libquotient"::'git+https://github.com/quotient-im/libQuotient' + + # submodules for libquotient + 'gtad'::'git+https://github.com/quotient-im/gtad.git' + 'doxygen-awesome-css'::'git+https://github.com/jothepro/doxygen-awesome-css.git' + ) + sha256sums=( + 'SKIP' + + 'SKIP' + + 'SKIP' + 'SKIP' + ) + + pkgver() { + cd "$_pkgsrc" + git describe --long --tags --exclude '[a-z]*' --exclude '*[a-z][a-z]*' \ + | sed 's/\([^-]*-g\)/r\1/;s/-/./g' + } + + prepare() { + _prepare_submodules_quoternion + _prepare_submodules_libquotient + } } -prepare() -{ - cd $_appname - git config submodule.lib.url $srcdir/libQuotient - git submodule update +## submodules +_prepare_submodules_quoternion() { + ( + # submodules for quaternion + cd "$_pkgsrc" + local -A _submodules=( + ['libquotient']='lib' + ) + 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 + ) } -build() -{ - mkdir ${_appname}/build_dir -p - cd ${_appname}/build_dir +_prepare_submodules_libquotient() { + ( + # submodules for libquotient + cd "$_pkgsrc/lib" + local -A _submodules=( + ['doxygen-awesome-css']='doxygen-awesome-css' + ['gtad']='gtad/gtad' + ) + 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 + ) +} - cmake .. \ - -DUSE_INTREE_LIBQMC=ON \ - -DCMAKE_INSTALL_PREFIX=$pkgdir/usr \ - -DCMAKE_BUILD_TYPE=Release +## common functions +build() { + local _cmake_options=( + -B build + -S "$_pkgsrc" + -DCMAKE_INSTALL_PREFIX="/usr" + -DCMAKE_BUILD_TYPE=Release + -DUSE_INTREE_LIBQMC=ON + -DBUILD_WITH_QT6=OFF + ) - cmake --build . --target all + cmake "${_cmake_options[@]}" + cmake --build build } - -package() -{ - cd ${_appname} - cmake --install build_dir - rm $pkgdir/usr/share/icons/*/icon-theme.cache +package() { + DESTDIR="${pkgdir:?}" cmake --install build } -# vim:set ts=2 sw=2 et: + +## execute +_main_package |