Recently Written · git

sbm

dmenu bookmarks. Instantly fuzzy search thousands of bookmarks and plumb them. LOOKING FOR SUCKLESS SOFTWARE EDITION? GO TO sbm-suckless INSTEAD

git clone https://github.com/equwal/sbm

Log | Files | Refs


packaging/arch/sbm-git/PKGBUILD (2387 bytes)

1 # Maintainer: Spenser Truex <truex@equwal.com>
2 
3 # This is the package that works today: upstream has no release tag yet, so
4 # sbm (the versioned package) has nothing to download.
5 
6 pkgname=sbm-git
7 _pkgname=sbm
8 pkgver=0.3.r0.gUNKNOWN
9 pkgrel=1
10 pkgdesc='Bookmark manager made of POSIX sh scripts, driven by dmenu or fzf (git)'
11 arch=('any')
12 url='https://github.com/equwal/sbm'
13 # See the comment in ../sbm/PKGBUILD: no licence has been chosen upstream yet.
14 license=('SBM_LICENSE_TBD')
15 # makepkg has no "a or b" operator; see ../sbm/PKGBUILD.
16 depends=('dmenu' 'xclip')
17 makedepends=('git' 'make')
18 checkdepends=('shellcheck')
19 optdepends=('fzf: menu on a bare terminal, and an alternative to dmenu'
20             'xsel: clipboard, instead of xclip'
21             'wl-clipboard: clipboard under Wayland, instead of xclip'
22             'curl: page titles for bm --add (bm-title) and dead-link checks (bm-check)'
23             'jq: importing Chromium bookmark files with bm-import'
24             'git: bookmark file history with bm-commit'
25             'xdg-utils: opening URLs with xdg-open')
26 provides=("$_pkgname=$pkgver")
27 conflicts=("$_pkgname")
28 source=("$_pkgname::git+$url.git")
29 sha256sums=('SKIP')
30 
31 pkgver() {
32   cd "$_pkgname"
33   # There are no tags yet, so git describe has nothing to work from. Fall
34   # back to the version in config.mk plus the commit count. Once v0.3 is
35   # tagged the first branch takes over on its own.
36   # The exit status of a pipeline is sed's, which always succeeds: ask git
37   # first, and only then format.
38   if git describe --long --tags >/dev/null 2>&1; then
39     git describe --long --tags | sed 's/^v//; s/\([^-]*-g\)/r/; s/-/./g'
40   else
41     printf '%s.r%s.g%s'       "$(sed -n 's/^VERSION=//p' config.mk)"       "$(git rev-list --count HEAD)"       "$(git rev-parse --short HEAD)"
42   fi
43 }
44 
45 build() {
46   # Nothing is compiled; the package is a set of sh scripts.
47   :
48 }
49 
50 check() {
51   cd "$_pkgname"
52   make check
53 }
54 
55 package() {
56   cd "$_pkgname"
57   make DESTDIR="$pkgdir" PREFIX=/usr install
58 
59   install -Dm644 README -t "$pkgdir/usr/share/doc/$_pkgname"
60   install -Dm644 TODO -t "$pkgdir/usr/share/doc/$_pkgname"
61   install -Dm644 usertags engines -t "$pkgdir/usr/share/doc/$_pkgname/examples"
62 }
63 
64 # Before uploading to the AUR:
65 #   makepkg --printsrcinfo > .SRCINFO
66 # A -git package's .SRCINFO records the pkgver produced by the last local
67 # build, so regenerate it after building.