summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 66c52f90fffa6a620e016406020c92879d6deabf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Maintainer: Tony Lambiris <tony@libpcap.net>

pkgname=albert-git
_pkgname=${pkgname%-git}
pkgver=0.20.14.r13.gee101532
pkgrel=1
pkgdesc="A sophisticated standalone keyboard launcher"
arch=('x86_64')
url="https://github.com/albertlauncher"
license=('GPL')
depends=('hicolor-icon-theme' 'qt6-scxml' 'qt6-svg')
makedepends=('cmake' 'git' 'libqalculate' 'muparser' 'pybind11' 'python')
optdepends=('libqalculate: calculator plugin'
            'muparser: another calculator plugin'
            'python: python extension'
            'python-urllib3: python web plugins')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("mirrors/albert::git+https://github.com/albertlauncher/albert.git"
        "mirrors/plugins::git+https://github.com/albertlauncher/plugins.git"
        "mirrors/python::git+https://github.com/albertlauncher/python.git"
        "mirrors/qhotkey::git+https://github.com/Skycoder42/QHotkey.git")
sha512sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP')

pkgver() {
  cd "$srcdir/albert"

  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g'
}

prepare() {
  mkdir -p build

  cd "$srcdir/albert"
  git submodule sync
  git submodule update --init --recursive --remote

  git config submodule.plugins.url "$srcdir/plugins"
  git -c protocol.file.allow=always submodule update plugins

  git config submodule.lib/QHotkey.url "$srcdir/qhotkey"
  git -c protocol.file.allow=always submodule update lib/QHotkey

  cd "$srcdir/albert/plugins"
  git submodule init
  git config submodule.python/plugins.url "$srcdir/python"
  git -c protocol.file.allow=always submodule update python/plugins
}

build() {
  cd build

  cmake ../$_pkgname \
    -DCMAKE_BUILD_TYPE=MinSizeRel \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS=ON \
    -DQHOTKEY_INSTALL=OFF \
    -DBUILD_WIDGETSBOXMODEL=ON \
    -DBUILD_APPLICATIONS_XDG=ON \
    -DBUILD_CALCULATOR=ON \
    -DBUILD_CHROMIUM=ON \
    -DBUILD_DEBUG=OFF \
    -DBUILD_FILES=ON \
    -DBUILD_HASH=ON \
    -DBUILD_PYTHON=ON \
    -DBUILD_SNIPPETS=ON \
    -DBUILD_SSH=ON \
    -DBUILD_SYSTEM=ON \
    -DBUILD_TEMPLATE=OFF \
    -DBUILD_TERMINAL=ON \
    -DBUILD_URLHANDLER=ON \
    -DBUILD_WEBSEARCH=ON

  make
}

package() {
  cd build

  make DESTDIR="$pkgdir/" install

  # remove some trash
  rm -r "$pkgdir/usr/share/albert/python/plugins/.archive"
  rm -r "$pkgdir/usr/share/albert/python/plugins/.git"*
}

# vim:set ts=2 sw=2 et: