# Detect the distribution in use %global __despace head -n 1 | tr -d '[:space:]' | sed -e 's/[(].*[)]//g' %global __lower4 cut -c 1-4 | tr '[:upper:]' '[:lower:]' %global __distfile %([ -f /etc/SuSE-release ] && echo /etc/SuSE-release || echo /etc/redhat-release) %global __distinit %(sed -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' %{__distfile} | %{__despace} | %{__lower4}) %global __distvers %(sed -e 's/.* release \\([^. ]*\\).*/\\1/' %{__distfile} | %{__despace}) # Identify Alma, CentOS, CentOS Stream and Rocky Linux as rhel %if "%{__distinit}" == "a" || "%{__distinit}" == "c" || "%{__distinit}" == "cl" || "%{__distinit}" == "cs" || "%{__distinit}" == "rl" %global __distinit rhel %endif # Dist tag for Fedora is still "fc" %if "%{__distinit}" == "f" %global __distinit fc %endif Summary: Low complexity and fast waveform coder Name: shorten Version: 3.6.1 Release: 5.%{__distinit}%{__distvers} License: Freeware with further limitations URL: http://www.etree.org/shnutils/shorten/ Source0: http://etree.org/shnutils/shorten/dist/src/shorten-%{version}.tar.gz Patch0: shorten-3.6.1-warnings.patch BuildRequires: coreutils BuildRequires: gcc BuildRequires: make Conflicts: perl-WWW-Shorten %description shorten is a low complexity and fast waveform coder (i.e. audio compressor), originally written by Tony Robinson at SoftSound. It can operate in both lossy and lossless modes. %prep %setup -q # Get rid of shedloads of warnings %patch -P 0 %build %configure make %{?_smp_mflags} %install make install DESTDIR="%{buildroot}" %check make check %files %license doc/LICENSE %doc AUTHORS ChangeLog doc/TODO doc/tr156.ps NEWS README %{_bindir}/shorten %{_mandir}/man1/shorten.1* %changelog * Thu Mar 30 2023 Paul Howarth - 3.6.1-5 - Avoid deprecated patch syntax - Use %%license unconditionally * Thu Aug 10 2017 Paul Howarth - 3.6.1-4 - Add patch to remove lots of warnings with recent gcc versions - Drop support for EOL distributions prior to F-13 - Drop BuildRoot: and Group: tags - Drop explicit buildroot cleaning in %%install section - Drop explicit %%clean section * Tue Aug 2 2016 Paul Howarth - 3.6.1-3 - Specify build requirements - Drop %%defattr, redundant since rpm 4.4 - Use %%license where possible * Tue Aug 2 2011 Paul Howarth - 3.6.1-2 - Fix dist tag for CentOS 6 and Scientific Linux * Fri Jun 10 2011 Paul Howarth - 3.6.1-1 - Initial RPM version