summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Schyska <paul@schyska.net>2019-06-09 18:30:42 +0200
committerChristian Duerr <chrisduerr@users.noreply.github.com>2019-06-09 16:30:42 +0000
commit55d346c7d44215c51187cafcac79e3504209f942 (patch)
tree72b74be3a1a7ead98d0e08884898829cb5d95c14
parentbc2c34eb7f9eea251822d94ea534a1d2de03c5a1 (diff)
downloadalacritty-55d346c7d44215c51187cafcac79e3504209f942.tar.gz
alacritty-55d346c7d44215c51187cafcac79e3504209f942.zip
Add RPM spec for building in COPR
-rw-r--r--.copr/Makefile14
-rw-r--r--extra/linux/redhat/alacritty.spec56
2 files changed, 70 insertions, 0 deletions
diff --git a/.copr/Makefile b/.copr/Makefile
new file mode 100644
index 00000000..5be246cd
--- /dev/null
+++ b/.copr/Makefile
@@ -0,0 +1,14 @@
+version := $(shell rpmspec -q --srpm --qf "%{version}\n" extra/linux/redhat/alacritty.spec)
+commands = git
+
+srpm: $(commands)
+ $(eval top := $(shell mktemp -d))
+ mkdir -p "$(top)/SOURCES"
+ git archive HEAD --output "$(top)/SOURCES/alacritty-$(version).tar" --prefix "alacritty-$(version)/"
+ rpmbuild -bs "$(spec)" --define "_topdir $(top)" --define "_srcrpmdir $(outdir)"
+ rm -rf "$(top)"
+
+$(commands):
+ command -v $@ &> /dev/null || dnf -y install $@
+
+.PHONY: srpm $(commands)
diff --git a/extra/linux/redhat/alacritty.spec b/extra/linux/redhat/alacritty.spec
new file mode 100644
index 00000000..1a59fa5e
--- /dev/null
+++ b/extra/linux/redhat/alacritty.spec
@@ -0,0 +1,56 @@
+Name: alacritty
+Version: 0.3.2
+Release: 1%{?dist}
+Summary: A cross-platform, GPU enhanced terminal emulator
+License: ASL 2.0
+URL: https://github.com/jwilm/alacritty
+VCS: https://github.com/jwilm/alacritty.git
+Source: alacritty-%{version}.tar
+
+BuildRequires: rust >= 1.32.0
+BuildRequires: cargo
+BuildRequires: cmake
+BuildRequires: freetype-devel
+BuildRequires: fontconfig-devel
+BuildRequires: libxcb-devel
+BuildRequires: desktop-file-utils
+BuildRequires: python36
+
+%description
+Alacritty is a terminal emulator with a strong focus on simplicity and
+performance. With such a strong focus on performance, included features are
+carefully considered and you can always expect Alacritty to be blazingly fast.
+By making sane choices for defaults, Alacritty requires no additional setup.
+However, it does allow configuration of many aspects of the terminal.
+
+%prep
+%setup -q -n alacritty-%{version}
+
+%build
+cargo build --release
+
+%install
+install -p -D -m755 target/release/alacritty %{buildroot}%{_bindir}/alacritty
+install -p -D -m644 extra/linux/alacritty.desktop %{buildroot}%{_datadir}/applications/alacritty.desktop
+install -p -D -m644 extra/logo/alacritty-term.svg %{buildroot}%{_datadir}/pixmaps/Alacritty.svg
+install -p -D -m644 alacritty.yml %{buildroot}%{_datadir}/alacritty/alacritty.yml
+tic -xe alacritty,alacritty-direct \
+ extra/alacritty.info -o %{buildroot}%{_datadir}/terminfo
+install -p -D -m644 extra/completions/alacritty.bash %{buildroot}%{_datadir}/bash-completion/completions/alacritty
+install -p -D -m644 extra/completions/_alacritty %{buildroot}%{_datadir}/zsh/site-functions/_alacritty
+install -p -D -m644 extra/completions/alacritty.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/alacritty.fish
+install -p -D -m644 extra/alacritty.man %{buildroot}%{_mandir}/man1/alacritty.1
+
+%check
+desktop-file-validate %{buildroot}%{_datadir}/applications/alacritty.desktop
+
+%files
+%{_bindir}/alacritty
+%{_datadir}/applications/alacritty.desktop
+%{_datadir}/pixmaps/Alacritty.svg
+%{_datadir}/alacritty/alacritty.yml
+%{_datadir}/terminfo/a/alacritty*
+%{_datadir}/bash-completion/completions/alacritty
+%{_datadir}/zsh/site-functions/_alacritty
+%{_datadir}/fish/vendor_completions.d/alacritty.fish
+%{_mandir}/man1/alacritty.1*