diff options
author | HaroldLoui | 2023-01-24 12:56:50 +0800 |
---|---|---|
committer | HaroldLoui | 2023-01-24 12:56:50 +0800 |
commit | 989381aacc41aea43f6d4f38942213f98c2db40b (patch) | |
tree | 1c8bfa61fe2bb319c4cc20737e949437f94f2043 /PKGBUILD | |
download | aur-989381aacc41aea43f6d4f38942213f98c2db40b.tar.gz |
first commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c948476cea39 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: HaroldLoui<Riven970309@gmail.com> +pkgname=minesweeper-tauri-git +base=minesweeper-tauri +pkgver=0.1.0 +pkgrel=1 +pkgdesc="A minesweeper game follow windowsXP style based on tauri." +arch=('x86_64' 'aarch64') +url="https://github.com/HaroldLoui/minesweeper-tauri" +license=('custom') +depends=('git' 'webkit2gtk' 'libappindicator-gtk3') +makedepends=('cargo-tauri' 'jq' 'rust' 'moreutils') +optdepends=('appmenu-gtk-module: Application Menu GTK+ Module') +source=( + "${base}-${pkgver}-git::git+${url}" + "${base}.desktop" +) + +sha256sums=( + 'SKIP' + '5608145f8050f7794bfd32c9016d2d2f6e0c39cf90e2f244feead154ceca3e60' +) + +prepare(){ + cd $srcdir/${base}-${pkgver}-git + + cd src-tauri + # only build the excutable + jq '.tauri.bundle.active = false' tauri.conf.json|sponge tauri.conf.json + # disable updater + jq '.tauri.updater.active = false' tauri.conf.json|sponge tauri.conf.json +} + +build(){ + cd $srcdir/${base}-${pkgver}-git + cargo-tauri build +} + +package(){ + cd $srcdir/${base}-${pkgver}-git + install -Dm755 src-tauri/target/release/minesweeper -t ${pkgdir}/usr/bin/ + mv ${pkgdir}/usr/bin/minesweeper ${pkgdir}/usr/bin/minesweeper-tauri + + # Icons + install -Dm644 src-tauri/icons/icon.png ${pkgdir}/usr/share/icons/${base}.png + for i in 32x32 128x128; do + install -Dm644 src-tauri/icons/${i}.png \ + "$pkgdir"/usr/share/icons/hicolor/$i/apps/${base}.png + done + + install -Dm644 ${srcdir}/${base}.desktop -t ${pkgdir}/usr/share/applications +}
\ No newline at end of file |