paraphrase-git
LOW
maintainer keshavnrj
0 votes
scanned 2026-10-27 17:48:24.924245
Why flagged
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
Triggered rules
Low
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
PKGBUILD
1
# Maintainer: Keshav Bhatt <keshavnrj@gmail.com>
2
3
pkgname=paraphrase-git
4
_pkgname=paraphrase
5
pkgver=0.1.0.r273.g361a400
6
pkgrel=1
7
pkgdesc="Offline AI grammar checker, rewriter and reply writer that runs on your computer"
8
arch=('x86_64')
9
url="https://github.com/keshavbhatt/paraphrase"
10
license=('GPL-3.0-or-later')
11
depends=(
12
'glibc'
13
'hicolor-icon-theme'
14
'libgcc'
15
'libgomp'
16
'libstdc++'
17
'libxcb'
18
'openssl'
19
'qt6-base'
20
'qt6-svg'
21
'wayland'
22
)
23
makedepends=(
24
'cmake'
25
'git'
26
'ninja'
27
'wayland-protocols'
28
)
29
optdepends=(
30
'qt6-wayland: native Wayland windows'
31
'xdg-desktop-portal: the global shortcut and pasting results back on Wayland'
32
'xdg-desktop-portal-kde: the portals on KDE Plasma'
33
'xdg-desktop-portal-gnome: the portals on GNOME'
34
'kwallet: a key for the opt-in history on KDE'
35
'gnome-keyring: a key for the opt-in history on GNOME'
36
)
37
provides=("${_pkgname}")
38
conflicts=("${_pkgname}")
39
# llama.cpp and yaml-cpp are git submodules, pinned by the main repository.
40
source=(
41
"${_pkgname}::git+https://github.com/keshavbhatt/paraphrase.git"
42
'llama.cpp::git+https://github.com/ggml-org/llama.cpp.git'
43
'yaml-cpp::git+https://github.com/jbeder/yaml-cpp.git'
44
)
45
sha256sums=('SKIP'
46
'SKIP'
47
'SKIP')
48
49
pkgver() {
50
cd "${_pkgname}"
51
# The version in CMakeLists.txt, then the commits since: 0.1.0.r123.gabc1234. Once releases
52
# are tagged (v0.1.0), git describe takes over.
53
if git describe --long --tags --match 'v*' >/dev/null 2>&1; then
54
git describe --long --tags --match 'v*' | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
55
else
56
local version
57
version="$(sed -n 's/^ *VERSION \([0-9.]*\)$/\1/p' CMakeLists.txt | head -n 1)"
58
printf '%s.r%s.g%s' "${version}" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
59
fi
60
}
61
62
prepare() {
63
cd "${_pkgname}"
64
git submodule init
65
git config submodule.third_party/llama.cpp.url "${srcdir}/llama.cpp"
66
git config submodule.third_party/yaml-cpp.url "${srcdir}/yaml-cpp"
67
git -c protocol.file.allow=always submodule update
68
}
69
70
build() {
71
# Source file names in llama.cpp's and yaml-cpp's messages, without the build folder.
72
export CFLAGS+=" -ffile-prefix-map=${srcdir}=."
73
export CXXFLAGS+=" -ffile-prefix-map=${srcdir}=."
74
# llama.cpp is built for this machine's CPU (GGML_NATIVE) and linked into the daemon, so
75
# no libllama or libggml lands in /usr/lib next to the system's own.
76
cmake -B build -S "${_pkgname}" -G Ninja \
77
-DCMAKE_BUILD_TYPE=None \
78
-DCMAKE_INSTALL_PREFIX=/usr \
79
-DPARAPHRASE_BUILD_TESTS=OFF \
80
-Wno-dev
81
cmake --build build
82
}
83
84
package() {
85
DESTDIR="${pkgdir}" cmake --install build
86
# What llama.cpp and yaml-cpp install for developers: the programs are linked statically.
87
rm -rf "${pkgdir}"/usr/include "${pkgdir}"/usr/lib/cmake "${pkgdir}"/usr/lib/pkgconfig
88
find "${pkgdir}"/usr/lib -name '*.a' -delete 2>/dev/null || true
89
find "${pkgdir}"/usr -type d -empty -delete
90
}
91
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-10-27 17:48:24 | Low | 1 |