packaging/macports/Portfile (3251 bytes)
1 # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 2 3 PortSystem 1.0 4 PortGroup github 1.0 5 6 github.setup equwal sbm 0.3 v 7 categories www 8 platforms any 9 supported_archs noarch 10 maintainers {equwal.com:truex @equwal} 11 12 description Bookmark manager made of POSIX sh scripts, driven by fzf 13 14 long_description sbm keeps bookmarks in one tab separated file: URL, \ 15 description, tags. bm picks one with fzf and opens it, \ 16 copies it, edits it or deletes it. Text that is no \ 17 bookmark is opened as an address or searched for on the \ 18 web. The rest are small filters over bookmark lines: \ 19 bm-import, bm-check, bm-html, bm-migrate, bm-title and \ 20 bm-commit. Everything is POSIX sh and POSIX utilities; \ 21 nothing is compiled. 22 23 homepage https://github.com/equwal/sbm 24 25 # Upstream has not chosen a licence yet and ships no LICENSE file. Replace 26 # SBM_LICENSE_TBD with a name from 27 # https://trac.macports.org/wiki/PortfileRecipes#license 28 # "port lint" rejects the token, which is intended. 29 license SBM_LICENSE_TBD 30 31 # No release tag exists yet, so there is nothing to hash. Replace all three 32 # tokens at once by running: port -v checksum sbm 33 checksums rmd160 SBM_RMD160_TBD \ 34 sha256 SBM_SHA256_TBD \ 35 size SBM_SIZE_TBD 36 37 # dmenu is an X11 program; on macOS fzf is the practical menu, so it is the 38 # only hard runtime dependency. bm picks fzf on its own when there is no 39 # display. 40 depends_run port:fzf 41 42 use_configure no 43 44 # Nothing is compiled; the upstream "all" target only prints a reminder. 45 build {} 46 47 # destroot.destdir already carries DESTDIR=${destroot}. PREFIX has to be on 48 # the command line: config.mk assigns it plainly, and a plain assignment in a 49 # makefile wins over the environment. 50 destroot.args PREFIX=${prefix} 51 52 post-destroot { 53 xinstall -d ${destroot}${prefix}/share/doc/${name} 54 xinstall -m 0644 -W ${worksrcpath} README TODO \ 55 ${destroot}${prefix}/share/doc/${name} 56 57 xinstall -d ${destroot}${prefix}/share/examples/${name} 58 xinstall -m 0644 -W ${worksrcpath} usertags engines \ 59 ${destroot}${prefix}/share/examples/${name} 60 } 61 62 # The suite scripts the menu, the clipboard and curl, so it needs no display 63 # and no network. "make check" is not used: it also runs shellcheck when one 64 # happens to be installed, which would make the result depend on the host. 65 test.run yes 66 test.cmd /bin/sh 67 test.target 68 test.args test/run.sh 69 70 notes " 71 bm does not auto-detect the macOS clipboard or opener. Set them yourself: 72 73 export SBM_COPY=pbcopy 74 export SBM_PASTE=pbpaste 75 export SBM_OPEN=open 76 77 The menu is fzf. dmenu needs X11 and is not installed by this port. 78 79 Example tag and search-engine files are in 80 ${prefix}/share/examples/${name}; copy them to ~/.local/share/sbm/ if you 81 want them. 82 83 Optional: jq, for importing Chromium JSON bookmark files with bm-import. 84 curl and git come with macOS and the Command Line Tools. 85 "