%global commit c7f6056fdd34e125bf6f705759a9c04bb9d65c20 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global commitdate 20180101 Name: undistract-me Version: 0 Release: 1.%{commitdate}git%{shortcommit}%{?dist} Summary: Notifies you when long-running terminal commands complete License: MIT URL: https://github.com/jml/undistract-me Source0: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz BuildArch: noarch Requires: /bin/sh Requires: pulseaudio-utils Requires: sound-theme-freedesktop Requires: xorg-x11-utils %description %{summary}. %prep %autosetup -p1 -n %{name}-%{commit} %build # Nothing to do %install mkdir -p %{buildroot}%{_datadir}/%{name} install -pm 0644 long-running.bash preexec.bash %{buildroot}%{_datadir}/%{name}/ mkdir -p %{buildroot}%{_sysconfdir}/profile.d install -pm 644 undistract-me.sh %{buildroot}%{_sysconfdir}/profile.d/ %files %doc README.md %license LICENSE %{_datadir}/%{name}/ %{_sysconfdir}/profile.d/undistract-me.sh %changelog * Thu Jan 25 2018 Robert-André Mauchin - 0-1.20180101gitc7f6056 - Initial package