From fc22b5c807a71be7e701685755cc7929fa97c58c Mon Sep 17 00:00:00 2001 From: Fabio Lenherr / DashieTM Date: Sat, 4 Nov 2023 12:51:30 +0100 Subject: [PATCH] feat: Add .desktop files and add PKGBUILD for arch --- .gitignore | 3 +++ PKGBUILD | 20 ++++++++++++++++++++ flatpak/org.xetibo.ReSet.desktop | 11 +++++++++++ flatpak/org.xetibo.ReSet.json | 4 +++- reset.desktop | 11 +++++++++++ 5 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 PKGBUILD create mode 100644 flatpak/org.xetibo.ReSet.desktop create mode 100644 reset.desktop diff --git a/.gitignore b/.gitignore index c419cfc..e5e5c40 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,9 @@ debug/ target/ flatpak/build flatpak/.flatpak-builder +flatpak/export +flatpak/reset.flatpak +pkg/ # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..a661e3f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,20 @@ +# Maintainer: Fabio Lenherr + +pkgname=reset +pkgver=0.1 +pkgrel=1 +arch=('x86_64') +pkgdir="/usr/bin/${pkgname}" +pkgdesc="A wip universal Linux settings application." +depends=('rust' 'gtk4' 'dbus' 'gendesk') + +build() { + cargo build --release +} + +package() { + cd .. + install -Dm755 target/release/"$pkgname" "$pkgdir"/usr/bin/"$pkgname" + install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop" + install -Dm644 "src/resources/icons/ReSet.svg" "$pkgdir/usr/share/pixmaps/ReSet.svg" +} diff --git a/flatpak/org.xetibo.ReSet.desktop b/flatpak/org.xetibo.ReSet.desktop new file mode 100644 index 0000000..66c6f12 --- /dev/null +++ b/flatpak/org.xetibo.ReSet.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=ReSet +GenericName=SettingsApplication +GenericName[de]=SettingsApplikation +Exec=reset +Terminal=false +Type=Application +Keywords=settings;gtk; +Icon=org.xetibo.ReSet +Categories=Utility;GTK; +StartupNotify=false diff --git a/flatpak/org.xetibo.ReSet.json b/flatpak/org.xetibo.ReSet.json index 46ecc1d..1c4ace1 100644 --- a/flatpak/org.xetibo.ReSet.json +++ b/flatpak/org.xetibo.ReSet.json @@ -27,7 +27,9 @@ "build-commands": [ "cargo --offline fetch --manifest-path Cargo.toml --verbose", "cargo --offline build --release --verbose", - "install -Dm755 ./target/release/reset -t /app/bin/" + "install -Dm755 ./target/release/reset -t /app/bin/", + "install -Dm644 ./src/resources/icons/ReSet.svg /app/share/icons/hicolor/scalable/apps/org.xetibo.ReSet.svg", + "install -Dm644 ./flatpak/org.xetibo.ReSet.desktop /app/share/applications/org.xetibo.ReSet.desktop" ], "sources": [ { diff --git a/reset.desktop b/reset.desktop new file mode 100644 index 0000000..fd723ca --- /dev/null +++ b/reset.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=ReSet +GenericName=SettingsApplication +GenericName[de]=SettingsApplikation +Exec=reset +Terminal=false +Type=Application +Keywords=settings;gtk; +Icon=ReSet +Categories=Utility;GTK; +StartupNotify=false