Initial version

This commit is contained in:
SelfRef 2024-10-06 17:55:03 +02:00
commit 04285bcee2
4 changed files with 96 additions and 0 deletions

25
.SRCINFO Normal file
View file

@ -0,0 +1,25 @@
pkgbase = jan
pkgdesc = Jan is an open source alternative to ChatGPT that runs 100% offline on your computer (stable version)
pkgver = 0.5.6
pkgrel = 1
url = https://jan.ai/
arch = x86_64
license = AGPL-3.0
makedepends = git
makedepends = nodejs
makedepends = npm
makedepends = yarn
makedepends = libxcrypt-compat
depends = nss
depends = atk
depends = libcups
depends = gtk3
depends = alsa-lib
provides = jan
conflicts = jan
source = jan::git+https://github.com/janhq/jan.git#tag=v0.5.6
source = jan.desktop
sha256sums = SKIP
sha256sums = 689c50321d61f2c40a275c004865e9956501038782867bbe73e9d42128f40048
pkgname = jan

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
*/
*.pkg.tar.zst

59
PKGBUILD Normal file
View file

@ -0,0 +1,59 @@
# Maintainer: SelfRef <arch@selfref.dev>
_basename=jan
pkgname=${_basename}
pkgver=0.5.6
pkgrel=1
pkgdesc="Jan is an open source alternative to ChatGPT that runs 100% offline on your computer (stable version)"
url="https://jan.ai/"
arch=('x86_64')
license=('AGPL-3.0')
source=(
"$_basename::git+https://github.com/janhq/jan.git#tag=v$pkgver"
'jan.desktop'
)
sha256sums=('SKIP'
'689c50321d61f2c40a275c004865e9956501038782867bbe73e9d42128f40048')
provides=("$_basename")
conflicts=("$_basename")
depends=(
'nss'
'atk'
'libcups'
'gtk3'
'alsa-lib'
)
makedepends=(
'git'
'nodejs'
'npm'
'yarn'
'libxcrypt-compat'
)
prepare() {
cd "$_basename"
[ -f electron/package.json ] && sed -i '/"build:linux"/s/-l deb -l AppImage/-l --dir/' electron/package.json
}
build() {
cd "$_basename"
export YARN_CACHE_FOLDER="$srcdir"/yarn-cache
make build
}
package() {
# Desktop file
install -Dm644 ../jan.desktop "$pkgdir"/usr/share/applications/jan.desktop
# Application files
cd "$_basename"/electron
install -dm755 "$pkgdir"/opt/Jan
cp -r dist/linux-unpacked/* "$pkgdir"/opt/Jan/
# Icon files
cd icons
[ -f icon.png ] && install -Dm644 icon.png "$pkgdir"/usr/share/icons/hicolor/512x512/apps/jan.png
[ -f icon-tray.png ] && install -Dm644 icon-tray.png "$pkgdir"/usr/share/icons/hicolor/16x16/apps/jan.png
[ -f icon-tray@2x.png ] && install -Dm644 icon-tray@2x.png "$pkgdir"/usr/share/icons/hicolor/32x32/apps/jan.png
}

10
jan.desktop Normal file
View file

@ -0,0 +1,10 @@
[Desktop Entry]
Name=Jan
Exec=/opt/Jan/jan %U
Terminal=false
Type=Application
Icon=jan
StartupWMClass=Jan
Comment=Use offline LLMs with your own data. Run open source models like Llama2 or Falcon on your internal computers/servers.
MimeType=x-scheme-handler/jan;
Categories=Utility;