summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD95
2 files changed, 64 insertions, 39 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 57601c23d6f9..2d5ff2dd5a7f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = otter-browser-git
- pkgdesc = Browser aiming to recreate the best aspects of the classic Opera (12.x) UI using Qt5
- pkgver = 1.0.03.r2358.gb2397dc
+ pkgdesc = Browser recreating the best aspects of the classic Opera interface
+ pkgver = 1.0.03.r2444.g305aeec7
pkgrel = 1
url = https://github.com/OtterBrowser/otter-browser
arch = x86_64
@@ -9,14 +9,14 @@ pkgbase = otter-browser-git
arch = armv6h
arch = armv7h
arch = aarch64
- license = GPL3
+ license = GPL-3.0-or-later
makedepends = cmake
makedepends = git
depends = qt5-multimedia
depends = qt5-svg
depends = qt5-webengine
optdepends = hunspell: for spell checking
- provides = otter-browser
+ provides = otter-browser=1.0.03
conflicts = otter-browser
source = otter-browser::git+https://github.com/OtterBrowser/otter-browser.git
sha256sums = SKIP
diff --git a/PKGBUILD b/PKGBUILD
index 439accf1370b..8bbd9a0d481d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,47 +2,71 @@
# Contributor: m4sk1n <m4sk1n@vivaldi.net>
# Contributor: Christian Hesse <mail@eworm.de>
-_pkgname=otter-browser
-pkgname="$_pkgname-git"
-pkgver=1.0.03.r2358.gb2397dc
+# options
+: ${_build_git:=true}
+
+unset _pkgtype
+[[ "${_build_git::1}" == "t" ]] && _pkgtype+="-git"
+
+# basic info
+_pkgname="otter-browser"
+pkgname="$_pkgname${_pkgtype:-}"
+pkgver=1.0.03.r2444.g305aeec7
pkgrel=1
-pkgdesc='Browser aiming to recreate the best aspects of the classic Opera (12.x) UI using Qt5'
+pkgdesc='Browser recreating the best aspects of the classic Opera interface'
url='https://github.com/OtterBrowser/otter-browser'
-license=('GPL3')
+license=('GPL-3.0-or-later')
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
-depends=(
- 'qt5-multimedia'
- 'qt5-svg'
- 'qt5-webengine'
-)
-makedepends=(
- 'cmake'
-)
-optdepends=(
- 'hunspell: for spell checking'
-)
-
-if [ x"$pkgname" == x"$_pkgname" ] ; then
- # normal package
+# main package
+_main_package() {
+ depends=(
+ 'qt5-multimedia'
+ 'qt5-svg'
+ 'qt5-webengine'
+
+ ## implicit
+ #qt5-base
+ #qt5-declarative
+ )
+ makedepends=(
+ 'cmake'
+ )
+ optdepends=(
+ 'hunspell: for spell checking'
+ )
+
+ if [ "${_build_git::1}" != "t" ] ; then
+ _main_stable
+ else
+ _main_git
+ fi
+}
+
+# stable package
+_main_stable() {
+ : ${_pkgver:=${pkgver%%.r*}}
+
depends+=(
'qt5-xmlpatterns'
)
- _pkgsrc="$_pkgname-${pkgver%%.r*}"
+ _pkgsrc="$_pkgname-${_pkgver:?}"
_pkgext="tar.gz"
- source+=("$_pkgsrc.$_pkgext"::"$url/archive/v${pkgver%%.r*}/$_pkgsrc.$_pkgext")
+ source+=("$_pkgsrc.$_pkgext"::"$url/archive/v$_pkgver/$_pkgsrc.$_pkgext")
sha256sums+=('2b07d22a5d921ec0b3d29a680eb913c3fe0713ca7d10e37873a3802d1a5154a3')
pkgver() {
- echo "${pkgver%%.r*}"
+ echo "${_pkgver:?}"
}
-else
- # git package
+}
+
+# git package
+_main_git() {
makedepends+=('git')
- provides=("$_pkgname")
- conflicts=("$_pkgname")
+ provides+=("$_pkgname=${pkgver%%.r*}")
+ conflicts+=("$_pkgname")
_pkgsrc="$_pkgname"
source+=("$_pkgsrc"::"git+$url.git")
@@ -51,26 +75,24 @@ else
pkgver() {
cd "$_pkgsrc"
- _tag=$(git tag | tail -1)
- if [[ $(vercmp "$_tag" "v1.0.03") -lt 0 ]] ; then
- _tag="v1.0.03"
- fi
-
- _revision=$(git rev-list --count "$_tag"..HEAD)
- _hash=$(git rev-parse --short=7 HEAD)
+ local _tag=$(git tag | sort -rV | head -1)
+ local _revision=$(git rev-list --count --cherry-pick "$_tag"...HEAD)
+ local _hash=$(git rev-parse --short=8 HEAD)
printf '%s.r%s.g%s' \
"${_tag#v}" \
"$_revision" \
"$_hash"
}
-fi
+}
+# common functions
build() {
local _cmake_options=(
-B build
-S "$_pkgsrc"
-DCMAKE_INSTALL_PREFIX='/usr'
+ -Wno-dev
)
cmake "${_cmake_options[@]}"
@@ -80,5 +102,8 @@ build() {
package() {
depends+=('hicolor-icon-theme')
- DESTDIR="${pkgdir:?}" cmake --install build
+ DESTDIR="$pkgdir" cmake --install build
}
+
+# execute
+_main_package