Skip to content

Commit f51f83d

Browse files
Upgrade rust-tiny-dfr to upstream tag v0.3.1
1 parent dcdf911 commit f51f83d

File tree

3 files changed

+107
-53
lines changed

3 files changed

+107
-53
lines changed

rust-tiny-dfr/0002-downgrade-cairo-rs.patch

Lines changed: 0 additions & 24 deletions
This file was deleted.

rust-tiny-dfr/rust-tiny-dfr.spec

Lines changed: 78 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,77 @@
1-
%global forgeurl https://github.com/sharpenedblade/tiny-dfr
2-
%global commit 82d80aef1a6e7ce2c5bd3dd766e6c658ed4a51da
1+
# Generated by rust2rpm 26
2+
%bcond_without check
3+
34
%global crate tiny-dfr
4-
%forgemeta
5-
6-
Name: rust-%{crate}
7-
Version: 0.2.0
8-
Release: 6%{?dist}
9-
Summary: The most basic dynamic function row daemon possible
10-
License: MIT AND Apache-2.0
11-
URL: %{forgeurl}
12-
Source: %{forgesource}
13-
14-
%{?fc39:Patch: 0002-downgrade-cairo-rs.patch}
15-
16-
BuildRequires: rust-packaging >= 23
17-
BuildRequires: systemd-rpm-macros
18-
19-
%description
20-
The most basic dynamic function row daemon possible
21-
22-
License: Apache-2.0 AND BSD-3-Clause AND CC0-1.0 AND ISC AND LGPL-2.1-or-later AND MIT AND MPL-2.0 AND Unicode-DFS-2016 AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT)
23-
24-
%files
5+
6+
Name: rust-tiny-dfr
7+
Version: 0.3.1
8+
Release: 1%{?dist}
9+
Summary: Most basic dynamic function row daemon possible
10+
11+
License: MIT AND Apache-2.0
12+
URL: https://crates.io/crates/tiny-dfr
13+
Source: %{crates_source}
14+
# Manually created patch for downstream crate metadata changes
15+
# * bump cairo-rs dependency from 0.18 to 0.19
16+
# * bump drm dependency from 0.10 to 0.11:
17+
# https://github.com/WhatAmISupposedToPutHere/tiny-dfr/pull/30
18+
# * bump freetype-rs dependency from 0.32 to 0.35
19+
# * restrict librsvg dependency from 2.56 to ~2.58:
20+
# the librsvg crate does not follow SemVer versioning
21+
%if 0%{?fedora} >= 40
22+
Patch: tiny-dfr-fix-metadata.diff
23+
%endif
24+
25+
BuildRequires: cargo-rpm-macros >= 24
26+
BuildRequires: systemd-rpm-macros
27+
28+
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
29+
ExcludeArch: %{ix86}
30+
31+
%global _description %{expand:
32+
The most basic dynamic function row daemon possible.}
33+
34+
%description %{_description}
35+
36+
%package -n %{crate}
37+
Summary: %{summary}
38+
# (Apache-2.0 OR MIT) AND BSD-3-Clause
39+
# (MIT OR Apache-2.0) AND Unicode-DFS-2016
40+
# 0BSD OR MIT OR Apache-2.0
41+
# Apache-2.0
42+
# Apache-2.0 OR MIT
43+
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
44+
# ISC
45+
# LGPL-2.1-or-later
46+
# MIT
47+
# MIT AND Apache-2.0
48+
# MIT OR Apache-2.0
49+
# MIT OR Apache-2.0 OR Zlib
50+
# MIT OR Zlib OR Apache-2.0
51+
# MPL-2.0
52+
# Unlicense OR MIT
53+
# Zlib OR Apache-2.0 OR MIT
54+
License: Apache-2.0 AND BSD-3-Clause AND ISC AND LGPL-2.1-or-later AND MIT AND MPL-2.0 AND Unicode-DFS-2016 AND (Apache-2.0 OR MIT) AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0 OR Zlib) AND (Unlicense OR MIT)
55+
# LICENSE.dependencies contains a full license breakdown
56+
57+
%description -n %{crate} %{_description}
58+
59+
%files -n %{crate}
2560
%license LICENSE
2661
%license LICENSE.material
2762
%license LICENSE.dependencies
2863
%doc README.md
29-
%{_bindir}/%{crate}
64+
%{_bindir}/tiny-dfr
3065
%{_datadir}/%{crate}/
3166
%{_udevrulesdir}/*.rules
3267
%{_unitdir}/*.service
68+
%dir %{_sysconfdir}/%{crate}/
69+
%config(noreplace) %ghost %{_sysconfdir}/%{crate}/config.toml
3370

3471
%prep
35-
%forgeautosetup -p1
72+
%autosetup -n %{crate}-%{version} -p1
3673
%cargo_prep
74+
3775
%generate_buildrequires
3876
%cargo_generate_buildrequires
3977

@@ -44,15 +82,26 @@ License: Apache-2.0 AND BSD-3-Clause AND CC0-1.0 AND ISC AND LGPL-2.1-or-later A
4482

4583
%install
4684
%cargo_install
47-
install -Dpm0644 -t %{buildroot}%{_datadir}/%{crate} share/%{crate}/*
85+
86+
install -Dpm0644 -t %{buildroot}%{_datadir}/%{crate} \
87+
share/%{crate}/*.svg share/%{crate}/config.toml \
88+
install -Ddpm0755 %{buildroot}%{_sysconfdir}/%{crate}
89+
touch %{buildroot}%{_sysconfdir}/%{crate}/config.toml
4890
install -Dpm0644 -t %{buildroot}%{_udevrulesdir} etc/udev/rules.d/*.rules
4991
install -Dpm0644 -t %{buildroot}%{_unitdir} etc/systemd/system/*.service
5092

51-
%post
93+
%post -n %{crate}
5294
%systemd_post %{crate}.service
5395

54-
%preun
96+
%preun -n %{crate}
5597
%systemd_preun %{crate}.service
5698

57-
%postun
99+
%postun -n %{crate}
58100
%systemd_postun_with_restart %{crate}.service
101+
102+
%if %{with check}
103+
%check
104+
%cargo_test
105+
%endif
106+
107+
%changelog
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
--- tiny-dfr-0.3.1/Cargo.toml 1970-01-01T00:00:01+00:00
2+
+++ tiny-dfr-0.3.1/Cargo.toml 2024-07-29T20:38:26+00:00
3+
@@ -32,7 +32,7 @@
4+
version = "1"
5+
6+
[dependencies.cairo-rs]
7+
-version = "0.18"
8+
+version = "0.19"
9+
features = ["freetype"]
10+
default-features = false
11+
12+
@@ -40,7 +40,7 @@
13+
version = "0.11.1"
14+
15+
[dependencies.freetype-rs]
16+
-version = "0.32"
17+
+version = "0.35"
18+
19+
[dependencies.input]
20+
version = "0.8"
21+
@@ -56,7 +56,7 @@
22+
version = "0.2"
23+
24+
[dependencies.librsvg]
25+
-version = "2.57"
26+
+version = "~2.58"
27+
28+
[dependencies.nix]
29+
version = "0.27"

0 commit comments

Comments
 (0)