aboutsummaryrefslogtreecommitdiff
path: root/linux/makepkg/PKGBUILD
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-07-17 15:35:43 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-07-17 15:35:43 +0200
commitf143900bd3db40a5e908f8e0e40557346f908592 (patch)
tree1c41776f670e1e8db1d22726f07b418e4808fded /linux/makepkg/PKGBUILD
parentAdd vendor.cmake (diff)
downloadsmolbote-f143900bd3db40a5e908f8e0e40557346f908592.tar.xz
Switch vcs to git
Diffstat (limited to 'linux/makepkg/PKGBUILD')
-rw-r--r--linux/makepkg/PKGBUILD105
1 files changed, 41 insertions, 64 deletions
diff --git a/linux/makepkg/PKGBUILD b/linux/makepkg/PKGBUILD
index cd21909..872476e 100644
--- a/linux/makepkg/PKGBUILD
+++ b/linux/makepkg/PKGBUILD
@@ -1,9 +1,15 @@
# Maintainer: Aqua-sama <aqua@iserlohn-fortress.net>
pkgname=smolbote-hg
+pkgdesc='Yet another no-frills browser'
+
pkgver=0
pkgrel=1
-pkgdesc='Yet another no-frills browser'
+_tag=""
+_describe=""
+_commit=""
+_branch=""
+
url="https://neueland.iserlohn-fortress.net/smolbote"
arch=('x86_64')
@@ -12,94 +18,65 @@ license=('GPL3')
# -hg replace the old -git package
replaces=('smolbote-git')
-depends=('qt5-webengine>=5.10.1' 'boost-libs>=1.66.0')
+depends=('qt5-webengine>=5.11.0' 'boost-libs>=1.66.0')
optdepends=('firejail: launch a sandboxed instance')
-makedepends=('mercurial' 'cmake' 'pkg-config' 'go-md2man')
+makedepends=('git' 'cmake' 'pkg-config' 'go-md2man')
# this is the central repository
-source=("smolbote-hg::hg+https://neueland.iserlohn-fortress.net/smolbote.hg")
-# if you're test building, you might want to hg serve your own repo
-#source=("smolbote-hg::hg+http://localhost:8000")
+source=("git+https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote.git")
sha512sums=('SKIP')
validgpgkeys=(# Aqua-sama <aqua@iserlohn-fortress.net>
BB1C090188E3E32B375C13FD095DE26BC16D2E98)
prepare() {
- # go into src/smolbote-hg
- cd smolbote-hg
-
- msg2 "Verifying integrity"
- # get commit id
- _node="$(hg log -r tip --template='{node}')"
- # download checksums and signature
- curl -O https://neueland.iserlohn-fortress.net/smolbote/integrity/$_node \
- -O https://neueland.iserlohn-fortress.net/smolbote/integrity/$_node.sig
- # verify signature and files
- gpg --verify $_node.sig
- sha512sum --check --quiet $_node
+ cd smolbote
+ _tag=$(git describe --tags --abbrev=0)
+ _describe=$(git describe --tags)
+ _commit=$(git rev-parse HEAD)
+ _branch=$(git rev-parse --abbrev-ref HEAD)
}
pkgver() {
- cd smolbote-hg
- printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
+ cd smolbote
+ git describe --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
- # clean build folder
- # src/smolbote-hg-r000.123456789012
- rm -rf "$pkgname-$pkgver"
- mkdir "$pkgname-$pkgver"
- cd "$pkgname-$pkgver"
-
- msg2 "Building smolbote"
- # CMake Options
- # Build Type
- # Debug builds don't have install rules.
- _cmake_options="-DCMAKE_BUILD_TYPE=Release"
-
- # Install Prefix
- # Where should the binary be installed? In this case /usr/local.
- _cmake_options="$_cmake_options -DCMAKE_INSTALL_PREFIX=$pkgdir/usr/local"
-
- # Compiler
- # Flavour: no need to change the compiler, gcc works just fine
- _cmake_options="$_cmake_options -DCMAKE_C_COMPILER=/usr/bin/clang"
- _cmake_options="$_cmake_options -DCMAKE_CXX_COMPILER=/usr/bin/clang++"
-
- # Use libc++ instead of libstdc++
- # Flavour, also requires clang
- #_cmake_options="$_cmake_options -DUseLibCpp=On"
-
- # Flavour: add some KF5 effects
- # this requires 'extra-cmake-modules'
- #_cmake_options="$_cmake_options -DPlasma=On"
-
- # Generate Makefile
- cmake $_cmake_options "$srcdir/smolbote-hg"
+ # generate makefile
+
+ # option default
+ # -DQtDeprecatedWarnings On
+ # -DUseLibCpp Off
+ # -DTests Off
+ # -DPlasma Off
+
+ cmake -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=$pkgdir/usr/local \
+ -DVerTag=$_tag \
+ -DVerDescribe=$_describe \
+ -DVerCommit=$_commit \
+ -DVerBranch=$_branch \
+ $srcdir/smolbote
# Build
- make
-
- msg2 "Generating manpage"
- go-md2man -in $srcdir/smolbote-hg/linux/man/smolbote.md -out smolbote.7
- gzip smolbote.7
+ #make
}
package() {
- cd "$pkgname-$pkgver"
-
# Install
- make install
+ #make install
# icon and .desktop
- install -Dm644 "${srcdir}/smolbote-hg/data/poi.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/poi.svg"
- install -Dm644 "${srcdir}/smolbote-hg/linux/poi.desktop" "${pkgdir}/usr/share/applications/poi.desktop"
+ #install -Dm644 "${srcdir}/smolbote-hg/data/poi.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/poi.svg"
+ #install -Dm644 "${srcdir}/smolbote-hg/linux/poi.desktop" "${pkgdir}/usr/share/applications/poi.desktop"
# firejail profile
- install -Dm644 "${srcdir}/smolbote-hg/data/poi.profile" "${pkgdir}/usr/local/lib/smolbote/poi.profile"
+ #install -Dm644 "${srcdir}/smolbote-hg/data/poi.profile" "${pkgdir}/usr/local/lib/smolbote/poi.profile"
- # man page
- install -Dm644 smolbote.7.gz $pkgdir/usr/local/man/man7/smolbote.7.gz
+ msg2 "Install manpage"
+ go-md2man -in $srcdir/linux/man/smolbote.md -out smolbote.7
+ gzip smolbote.7
+ #install -Dm644 smolbote.7.gz $pkgdir/usr/local/man/man7/smolbote.7.gz
}