mirror of
https://github.com/archlinux/aur.git
synced 2026-03-14 23:16:48 +01:00
Initial import: NoteGen v0.22.1
- Add PKGBUILD for source compilation - Add .SRCINFO with package metadata - Maintainer: ChHsich <hsichingchang@gmail.com>
This commit is contained in:
commit
700a8a6873
2 changed files with 92 additions and 0 deletions
24
.SRCINFO
Normal file
24
.SRCINFO
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
pkgbase = note-gen
|
||||
pkgdesc = A cross-platform Markdown note-taking application with AI integration
|
||||
pkgver = 0.22.1
|
||||
pkgrel = 1
|
||||
url = https://github.com/codexu/note-gen
|
||||
arch = x86_64
|
||||
license = MIT
|
||||
makedepends = rust
|
||||
makedepends = cargo
|
||||
makedepends = nodejs
|
||||
makedepends = npm
|
||||
makedepends = pnpm
|
||||
depends = gtk3
|
||||
depends = webkit2gtk-4.1
|
||||
depends = libappindicator-gtk3
|
||||
depends = librsvg
|
||||
depends = libvips
|
||||
provides = note-gen
|
||||
conflicts = note-gen-bin
|
||||
options = !strip
|
||||
source = note-gen-0.22.1.tar.gz::https://github.com/codexu/note-gen/archive/note-gen-v0.22.1.tar.gz
|
||||
sha256sums = SKIP
|
||||
|
||||
pkgname = note-gen
|
||||
68
PKGBUILD
Normal file
68
PKGBUILD
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
# Maintainer: ChHsich <hsichingchang@gmail.com>
|
||||
pkgname=note-gen
|
||||
_pkgname=note-gen
|
||||
pkgver=0.22.1
|
||||
pkgrel=1
|
||||
pkgdesc="A cross-platform Markdown note-taking application with AI integration"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/codexu/note-gen"
|
||||
license=('MIT')
|
||||
depends=('gtk3' 'webkit2gtk-4.1' 'libappindicator-gtk3' 'librsvg' 'libvips')
|
||||
makedepends=('rust' 'cargo' 'nodejs' 'npm' 'pnpm')
|
||||
provides=('note-gen')
|
||||
conflicts=('note-gen-bin')
|
||||
options=('!strip')
|
||||
source=("$pkgname-$pkgver.tar.gz::$url/archive/note-gen-v$pkgver.tar.gz")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
prepare() {
|
||||
cd "$_pkgname-$pkgver"
|
||||
# 设置前端环境
|
||||
export npm_config_build_from_source=true
|
||||
export CARGO_HOME="$srcdir/.cargo"
|
||||
|
||||
# 安装前端依赖
|
||||
pnpm install
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$_pkgname-$pkgver"
|
||||
export CARGO_HOME="$srcdir/.cargo"
|
||||
export npm_config_build_from_source=true
|
||||
|
||||
# 构建前端
|
||||
pnpm build
|
||||
|
||||
# 构建Tauri应用
|
||||
cd src-tauri
|
||||
cargo build --release
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$_pkgname-$pkgver/src-tauri"
|
||||
export CARGO_HOME="$srcdir/.cargo"
|
||||
|
||||
# 安装二进制文件
|
||||
install -Dm755 "target/release/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
|
||||
|
||||
# 安装图标
|
||||
cd ..
|
||||
for size in 32x32 128x128 128x128@2x; do
|
||||
if [ -f "icons/$size.png" ]; then
|
||||
install -Dm644 "icons/$size.png" "$pkgdir/usr/share/icons/hicolor/${size%x*}/apps/$_pkgname.png"
|
||||
fi
|
||||
done
|
||||
|
||||
# 创建桌面入口
|
||||
install -Dm644 "resources/app-icon.png" "$pkgdir/usr/share/pixmaps/$_pkgname.png"
|
||||
cat > "$pkgdir/usr/share/applications/$_pkgname.desktop" << EOF
|
||||
[Desktop Entry]
|
||||
Name=NoteGen
|
||||
Comment=A cross-platform Markdown note-taking application with AI integration
|
||||
Exec=$_pkgname
|
||||
Icon=$_pkgname
|
||||
Type=Application
|
||||
Categories=Office;Utility;TextEditor;
|
||||
StartupNotify=true
|
||||
EOF
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue