# based on https://gist.githubusercontent.com/sedrubal/617d40deb7452a25d004/raw/828316add9f3e6565ae485d0ca1bdb57edf78910/cava.spec %global gitdate 20160909 %global commit0 0360e8872e405ca1bbd09d290e9e1b87b4be60e4 %global srcurl https://github.com/karlstav/%{name} %global shortcommit0 %(c=%{commit0}; echo ${c:0:7} ) Name: cava Version: 0.4.1 Summary: Console-based Audio Visualizer for ALSA License: MIT URL: https://karlstav.github.io/%{name} %if 0%{?gitdate} Release: 2.%{gitdate}git%{shortcommit0}%{?dist} Source0: %{srcurl}/archive/%{commit0}.tar.gz#/%{name}-%{commit0}.tar.gz %else Release: 2%{?dist} Source0: %{srcurl}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz %endif Patch0: %{name}-nogit.patch BuildRequires: automake autoconf libtool BuildRequires: alsa-lib-devel BuildRequires: ncurses-devel BuildRequires: fftw-devel > 3 # ensure rebuild for an API change with iniparser v4 %if 0%{fedora} <= 25 %global iniparserversion 3.1 %global iniparseroption --enable-legacy_iniparser %else %global iniparserversion 4.0 %endif BuildRequires: iniparser-devel = %{iniparserversion} Requires: iniparser = %{iniparserversion} BuildRequires: chrpath %description C.A.V.A. is a bar spectrum analyzer for audio using ALSA for input. Its frequency range is limited to 50-10,000Hz. The human ear can hear from 20 up to 20,000 Hz (and probably "sense" even higher frequencies), but the frequencies between 50-10,000Hz seem to be the most distinguishable. %prep %if 0%{?gitdate} %autosetup -p1 -n%{name}-%{commit0} # no git command sed -i -r 's:COMMIT:%{shortcommit0}:' configure.ac ./autogen.sh %else %setup -q %endif # unbundle iniparser rm -r iniparser %build %configure --enable-static=no %{?iniparseroption} %make_build VERSION=%{version} %install %make_install chrpath --delete %{buildroot}%{_bindir}/%{name} %files %doc example_files/ %doc README.md todo changelog %license LICENSE %{_bindir}/%{name} %changelog * Sat Sep 10 2016 Raphael Groner - 0.4.1-2.20160909git0360e88 - use recent snapshot from GitHub - unbundle and add support for iniparser v3 - fix summary (upper case ALSA) - shorten description * Tue Jun 14 2016 Raphael Groner - 0.4.1-1.20160413git6ed3387 - prepare for packaging - new version, use git snapshot - try to unbundle iniparser, currently subpackage only with v4.0 * Tue Oct 27 2015 sedrubal - 0.3.5-1 - First build