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