Skip to content

Commit

Permalink
v0.1.0-alpha.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanabx committed May 3, 2024
1 parent 78a280f commit b23e689
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 87 deletions.
60 changes: 29 additions & 31 deletions .rpm/desktop-entry-daemon.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,78 +4,76 @@
# prevent library files from being installed
%global cargo_install_lib 0

%global crate desktop-entry-daemon

%global ver ###
%global commit ###
%global date ###

Name: desktop-entry-daemon
Version: %{ver}~%{date}
Version: v0.1.0-alpha.3
Release: %autorelease
Summary: A daemon for managing temporary desktop entries
Summary: A DBus service to manage freedesktop desktop entries

SourceLicense: Apache-2.0
# FIXME: paste output of %%cargo_license_summary here
License: # FIXME
# 0BSD OR MIT OR Apache-2.0
# Apache-2.0
# Apache-2.0 OR MIT
# Apache-2.0 WITH LLVM-exception
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
# BSD-2-Clause
# BSD-3-Clause
# CC0-1.0 OR Apache-2.0
# MIT
# MIT OR Apache-2.0
# MIT OR Apache-2.0 OR NCSA
# MIT OR Apache-2.0 OR Zlib
# MIT OR Zlib OR Apache-2.0
# MPL-2.0
# Unlicense OR MIT
# Zlib OR Apache-2.0 OR MIT
License: 0BSD OR MIT OR Apache-2.0 AND Apache-2.0 AND Apache-2.0 OR MIT AND Apache-2.0 WITH LLVM-exception AND Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT AND BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 OR Apache-2.0 AND MIT AND MIT OR Apache-2.0 AND MIT OR Apache-2.0 OR NCSA AND MIT OR Apache-2.0 OR Zlib AND MIT OR Zlib OR Apache-2.0 AND MPL-2.0 AND Unlicense OR MIT AND Zlib OR Apache-2.0 OR MIT
# LICENSE.dependencies contains a full license breakdown

URL: https://github.com/ryanabx/desktop-entry-daemon
Source: desktop-entry-daemon-%{ver}.tar.xz
Source: desktop-entry-daemon-%{ver}-vendor.tar.xz
Source: https://github.com/ryanabx/desktop-entry-daemon/archive/refs/tags/%{version}.tar.gz

BuildRequires: cargo-rpm-macros >= 26
BuildRequires: rustc
BuildRequires: cargo
BuildRequires: just

BuildRequires: systemd-rpm-macros

Requires: dbus

%global _description %{expand:
%{summary}.}

%description %{_description}

%prep
%autosetup -n %{crate}-%{ver} -p1 -a1
%cargo_prep -N
cat .vendor/config.toml >> .cargo/config
%autosetup -n %{crate}-%{version} -p1
%cargo_prep

%generate_buildrequires
%cargo_generate_buildrequires

%build
%cargo_build
%{cargo_license_summary}
%{cargo_license} > LICENSE.dependencies
%{cargo_vendor_manifest}

%install
install -Dm0755 target/release/desktop-entry-daemon %{buildroot}/%{_libexecdir}/desktop-entry-daemon
install -Dm0644 profile.d/desktop-entry-daemon.sh %{buildroot}/%{_sysconfdir}/profile.d/desktop-entry-daemon.sh
install -Dm0644 systemd/desktop-entry-daemon.service %{buildroot}/%{_userunitdir}/desktop-entry-daemon.service


%if %{with check}
%check
%cargo_test
%endif

%post
%systemd_post %{name}.service
%systemd_post %{name}-clean.service
%systemd_post desktop-entry-daemon.service

%preun
%systemd_preun %{name}.service
%systemd_preun %{name}-clean.service
%systemd_preun desktop-entry-daemon.service

%postun
%systemd_postun_with_restart %{name}.service
%systemd_postun_with_restart %{name}-clean.service
%systemd_postun_with_restart desktop-entry-daemon.service

%files
%license LICENSE
%license docs/LICENSE
%license LICENSE.dependencies
# %%license cargo-vendor.txt
%doc README.md
%{_libexecdir}/%{name}
%{_userunitdir}/%{name}.service
Expand Down
55 changes: 0 additions & 55 deletions .rpm/setup.sh

This file was deleted.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[package]
name = "desktop-entry-daemon"
authors = ["Ryan Brue"]
authors = ["Ryan Brue <ryanbrue@gmail.com>"]
version = "0.1.0"
license = "Apache-2.0"
repository = "https://github.com/ryanabx/desktop-entry-daemon"
documentation = "https://ryanabx.github.io/desktop-entry-daemon/"
readme = "README.md"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down

0 comments on commit b23e689

Please sign in to comment.