]>
Commit | Line | Data |
---|---|---|
2abc4a81 JP |
1 | Summary: A fast, cross-platform, OpenGL terminal emulator |
2 | Name: alacritty | |
3 | Version: 0.7.1 | |
4 | Release: 1 | |
5 | License: Apache v2.0 | |
6 | Group: Applications | |
7 | Source0: https://github.com/alacritty/alacritty/archive/v%{version}/%{name}-%{version}.tar.gz | |
8 | # Source0-md5: e4d0ac610b4e768102962ddac0c6a53b | |
9 | # cd alacritty-%{version} | |
10 | # cargo vendor | |
11 | # cd .. | |
12 | # tar cJf alacritty-crates-%{version}.tar.xz alacritty-%{version}/{vendor,Cargo.lock} | |
13 | Source1: %{name}-crates-%{version}.tar.xz | |
14 | # Source1-md5: 1279949ca954cd8219740baaa94c1bc5 | |
15 | URL: https://github.com/alacritty/alacritty | |
16 | BuildRequires: cargo | |
17 | BuildRequires: rpmbuild(macros) >= 1.752 | |
18 | BuildRequires: rust | |
19 | BuildRequires: tar >= 1:1.22 | |
20 | BuildRequires: xz | |
21 | Requires(post,postun): desktop-file-utils | |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %description | |
25 | Alacritty is a modern terminal emulator that comes with sensible | |
26 | defaults, but allows for extensive configuration. By integrating with | |
27 | other applications, rather than reimplementing their functionality, it | |
28 | manages to provide a flexible set of features with high performance. | |
29 | ||
30 | %package -n bash-completion-alacritty | |
31 | Summary: Bash completion for alacritty command line | |
32 | Summary(pl.UTF-8): Bashowe dopełnianie linii poleceń programu alacritty | |
33 | Group: Applications/Shells | |
34 | Requires: %{name} = %{version}-%{release} | |
35 | Requires: bash-completion >= 2.0 | |
36 | %{?noarchpackage} | |
37 | ||
38 | %description -n bash-completion-alacritty | |
39 | Bash completion for alacritty command line. | |
40 | ||
41 | %description -n bash-completion-alacritty -l pl.UTF-8 | |
42 | Bashowe dopełnianie linii poleceń programu alacritty. | |
43 | ||
44 | %package -n fish-completion-alacritty | |
45 | Summary: fish-completion for alacritty | |
46 | Summary(pl.UTF-8): Uzupełnianie nazw w fish dla alacritty | |
47 | Group: Applications/Shells | |
48 | Requires: %{name} = %{version}-%{release} | |
49 | Requires: fish | |
50 | %{?noarchpackage} | |
51 | ||
52 | %description -n fish-completion-alacritty | |
53 | fish-completion for alacritty. | |
54 | ||
55 | %description -n fish-completion-alacritty -l pl.UTF-8 | |
56 | Pakiet ten dostarcza uzupełnianie nazw w fish dla alacritty. | |
57 | ||
58 | %package -n zsh-completion-alacritty | |
59 | Summary: ZSH completion for alacritty command line | |
60 | Summary(pl.UTF-8): Dopełnianie linii poleceń programu alacritty dla powłoki ZSH | |
61 | Group: Applications/Shells | |
62 | Requires: %{name} = %{version}-%{release} | |
63 | Requires: zsh | |
64 | %{?noarchpackage} | |
65 | ||
66 | %description -n zsh-completion-alacritty | |
67 | ZSH completion for alacritty command line. | |
68 | ||
69 | %description -n zsh-completion-alacritty -l pl.UTF-8 | |
70 | Dopełnianie linii poleceń programu alacritty dla powłoki ZSH. | |
71 | ||
72 | %prep | |
73 | %setup -q -b1 | |
74 | ||
75 | # use our offline registry | |
76 | export CARGO_HOME="$(pwd)/.cargo" | |
77 | ||
78 | mkdir -p "$CARGO_HOME" | |
79 | cat >.cargo/config <<EOF | |
80 | [source.crates-io] | |
81 | registry = 'https://github.com/rust-lang/crates.io-index' | |
82 | replace-with = 'vendored-sources' | |
83 | ||
84 | [source.vendored-sources] | |
85 | directory = '$PWD/vendor' | |
86 | EOF | |
87 | ||
88 | %build | |
89 | export CARGO_HOME="$(pwd)/.cargo" | |
90 | ||
91 | cargo -v build --release --frozen | |
92 | ||
93 | %install | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1,%{_desktopdir},%{_datadir}/metainfo,%{_pixmapsdir},%{bash_compdir},%{fish_compdir},%{zsh_compdir}} | |
97 | ||
98 | cp -p target/release/alacritty $RPM_BUILD_ROOT%{_bindir} | |
99 | cp -p extra/alacritty.man $RPM_BUILD_ROOT%{_mandir}/man1/alacritty.1 | |
100 | cp -p extra/completions/_alacritty $RPM_BUILD_ROOT%{zsh_compdir}/_alacritty | |
101 | cp -p extra/completions/alacritty.bash $RPM_BUILD_ROOT%{bash_compdir}/alacritty | |
102 | cp -p extra/completions/alacritty.fish $RPM_BUILD_ROOT%{fish_compdir}/alacritty.fish | |
103 | cp -p extra/linux/Alacritty.desktop $RPM_BUILD_ROOT%{_desktopdir}/Alacritty.desktop | |
104 | cp -p extra/linux/io.alacritty.Alacritty.appdata.xml $RPM_BUILD_ROOT%{_datadir}/metainfo | |
105 | cp -p extra/logo/alacritty-term.svg $RPM_BUILD_ROOT%{_pixmapsdir}/Alacritty.svg | |
106 | ||
107 | %clean | |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
110 | %post | |
111 | %update_desktop_database | |
112 | ||
113 | %postun | |
114 | %update_desktop_database_postun | |
115 | ||
116 | %files | |
117 | %defattr(644,root,root,755) | |
118 | %doc README.md | |
119 | %attr(755,root,root) %{_bindir}/alacritty | |
120 | %{_mandir}/man1/alacritty.1* | |
121 | %{_desktopdir}/Alacritty.desktop | |
122 | %{_datadir}/metainfo/io.alacritty.Alacritty.appdata.xml | |
123 | %{_pixmapsdir}/Alacritty.svg | |
124 | ||
125 | %files -n bash-completion-alacritty | |
126 | %defattr(644,root,root,755) | |
127 | %{bash_compdir}/alacritty | |
128 | ||
129 | %files -n fish-completion-alacritty | |
130 | %defattr(644,root,root,755) | |
131 | %{fish_compdir}/alacritty.fish | |
132 | ||
133 | %files -n zsh-completion-alacritty | |
134 | %defattr(644,root,root,755) | |
135 | %{zsh_compdir}/_alacritty |