From c43aed2fcd4687050cedf01df0a2d80c5915d872 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Sun, 9 Jun 2024 02:02:49 +0200 Subject: [PATCH] Junk --- makefile | 14 ++++++++++ packaging/iced-demo.desktop | 11 ++++++++ packaging/iced-demo.svg | 17 ++++++++++++ packaging/iced_demo.spec | 53 +++++++++++++++++++++++++++++++++++++ 4 files changed, 95 insertions(+) create mode 100644 packaging/iced-demo.desktop create mode 100644 packaging/iced-demo.svg create mode 100644 packaging/iced_demo.spec diff --git a/makefile b/makefile index 3a226f9..d9a6715 100644 --- a/makefile +++ b/makefile @@ -1,6 +1,8 @@ PROJECT = $(shell basename $(CURDIR)) GITHASH = $(shell git rev-parse --short HEAD) +PROJ_NAME = iced-demo + debug: cargo run @@ -26,3 +28,15 @@ sign: release source-release publish: sign scp $(PROJECT)_$(GITHASH).tar.gz* $(PROJECT)_$(GITHASH)_source.tar.gz* server:/public/$(PROJECT)/ + +#cp packaging/$(PROJ_NAME).svg ~/.local/share/icons/ +install: release + install -Dm755 target/release/$(PROJECT) ~/.local/bin/$(PROJ_NAME) + cp packaging/$(PROJ_NAME).desktop ~/.local/share/applications/ + update-desktop-database ~/.local/share/applications/ + +uninstall: + rm -f ~/.local/bin/$(PROJ_NAME) + rm -f ~/.local/share/applications/$(PROJ_NAME).desktop + rm -f ~/.local/share/icons/$(PROJ_NAME).svg + update-desktop-database ~/.local/share/applications/ diff --git a/packaging/iced-demo.desktop b/packaging/iced-demo.desktop new file mode 100644 index 0000000..938a9e9 --- /dev/null +++ b/packaging/iced-demo.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Name=Iced Demo +GenericName=Iced Demo +Comment=Iced Demo is a simple demo application +Categories=Utility +Path=/home/imbus/.local/bin +Exec=iced-demo +Icon=/home/imbus/.local/share/icons/iced-demo.svg +Terminal=false +Keywords=demo diff --git a/packaging/iced-demo.svg b/packaging/iced-demo.svg new file mode 100644 index 0000000..c56707a --- /dev/null +++ b/packaging/iced-demo.svg @@ -0,0 +1,17 @@ + + + + + desktop + Created with Sketch Beta. + + + + + + + + + + + \ No newline at end of file diff --git a/packaging/iced_demo.spec b/packaging/iced_demo.spec new file mode 100644 index 0000000..eabb17f --- /dev/null +++ b/packaging/iced_demo.spec @@ -0,0 +1,53 @@ +# Generated by rust2rpm 26 +%bcond_without check + +# prevent library files from being installed +%global cargo_install_lib 0 + +Name: iced_demo +Version: 0.1.0 +Release: %autorelease +Summary: A demo application using the Iced toolkit + +SourceLicense: MIT +# FIXME: paste output of %%cargo_license_summary here +License: MIT +# LICENSE.dependencies contains a full license breakdown + +URL: https://git.silversoft.se/Imbus/iced_demo +Source: %{url}/archive/%{version}.tar.gz + +BuildRequires: cargo-rpm-macros >= 26 + +%global _description %{expand: +%{summary}.} + +%description %{_description} + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build +%{cargo_license_summary} +%{cargo_license} > LICENSE.dependencies + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%files +%license LICENSE.md +%license LICENSE.dependencies +%{_bindir}/iced_demo + +%changelog +%autochangelog