File aqualung.spec of Package aqualung
%global forgeurl https://github.com/jeremyevans/aqualung
# We need -fcommon for this to build
%define _legacy_common_support 1
Name: aqualung
Version: 2.0
Release: Stan8
Summary: Music Player for GNU/Linux
License: GPL-2.0-or-later
URL: https://aqualung.jeremyevans.net
Source: %{forgeurl}/archive/%{version}/%{name}-%{version}.tar.gz
Source: %{name}.desktop
# autogen.sh
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: pkgconfig
BuildRequires: gettext-devel
# GUI
BuildRequires: atk-devel
BuildRequires: cairo-devel
BuildRequires: fontconfig-devel
BuildRequires: freetype-devel
BuildRequires: glib2-devel
BuildRequires: gtk2-devel
BuildRequires: libpng-devel
BuildRequires: libxml2-devel
BuildRequires: pango-devel
BuildRequires: libpixman-1-0-devel
BuildRequires: zlib-devel
# Desktop
BuildRequires: desktop-file-utils
BuildRequires: libappstream-glib8
# Output
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(jack)
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(samplerate)
# Encode/Decode
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(sndfile)
BuildRequires: pkgconfig(flac)
BuildRequires: pkgconfig(vorbisfile)
BuildRequires: pkgconfig(oggz)
BuildRequires: pkgconfig(speex)
BuildRequires: pkgconfig(mad)
BuildRequires: pkgconfig(libmodplug)
BuildRequires: libmpcdec-devel
BuildRequires: libmp3lame-devel
BuildRequires: pkgconfig(wavpack)
BuildRequires: pkgconfig(lrdf)
# CD
BuildRequires: pkgconfig(libcdio)
BuildRequires: libcdio-paranoia-devel
BuildRequires: pkgconfig(libcddb)
# Others
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: libusb-compat-devel
BuildRequires: libifp-devel
BuildRequires: pkgconfig(lua)
BuildRequires: sed
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: gcc-c++
BuildRequires: appstream-glib
Requires: hicolor-icon-theme
ExclusiveArch: x86_64
%description
Aqualung is an advanced music player originally targeted at the GNU/Linux
operating system. It plays audio CDs, internet radio streams and pod casts as
well as sound files in just about any audio format and has the feature of
inserting no gaps between adjacent tracks.
%prep
%autosetup -p1 -n %{name}-%{version}
# Fix lib64 path
sed -i 's@/usr/lib/@%{_libdir}/@g' src/plugin.c
# Regenerate autotools
./autogen.sh
%build
%configure \
--without-sndio \
--with-oss \
--with-alsa \
--with-jack \
--with-pulse \
--with-src \
--with-sndfile \
--with-flac \
--with-vorbisenc \
--with-speex \
--with-mpeg \
--with-mod \
--with-mpc \
--with-mac \
--with-lavc \
--with-lame \
--with-wavpack \
--with-ladspa \
--with-cdda \
--with-cddb \
--with-ifp \
--with-lua
%make_build
%install
%make_install
desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE1}
for i in 16 24 32 48 64; do
install -Dpm0644 src/img/icon_${i}.png \
%{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png
done
cat <<EOF > %{name}.appdata.xml
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>net.jeremyevans.aqualung</id>
<name>Aqualung</name>
<summary>Advanced music player</summary>
<metadata_license>FSFAP</metadata_license>
<project_license>GPL-2.0-or-later</project_license>
<description>
<p>
Aqualung is an advanced music player originally targeted at the GNU/Linux
operating system. It plays audio CDs, internet radio streams and pod casts as
well as sound files in just about any audio format and has the feature of
inserting no gaps between adjacent tracks.
</p>
</description>
<launchable type="desktop-id">%{name}.desktop</launchable>
<provides>
<binary>aqualung</binary>
</provides>
<content_rating type="oars-1.1"/>
<developer_name>Jeremy Evans</developer_name>
<releases>
<release version="%{version}" date="%(date +%F -r %{SOURCE0})" />
</releases>
<screenshots>
<screenshot type="default">
<caption>Default skin (Music Store builder)</caption>
<image>https://aqualung.jeremyevans.net/images/default.png</image>
</screenshot>
<screenshot>
<caption>Woody skin (File Info and volume calculation)</caption>
<image>https://aqualung.jeremyevans.net/images/woody.png</image>
</screenshot>
<screenshot>
<caption>Metal skin (Playlist featuring Album mode)</caption>
<image>https://aqualung.jeremyevans.net/images/metal.png</image>
</screenshot>
<screenshot>
<caption>Dark skin (LADSPA plugin support)</caption>
<image>https://aqualung.jeremyevans.net/images/dark.png</image>
</screenshot>
<screenshot>
<caption>Plain skin (Settings dialog and album cover)</caption>
<image>https://aqualung.jeremyevans.net/images/plain.png</image>
</screenshot>
<screenshot>
<caption>Ocean skin (Search in Music Store)</caption>
<image>https://aqualung.jeremyevans.net/images/ocean.png</image>
</screenshot>
</screenshots>
<url type="homepage">%{url}</url>
</component>
EOF
install -D -p -m 644 %{name}.appdata.xml %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/%{name}.appdata.xml
%find_lang %{name}
%files -f %{name}.lang
%license COPYING
%doc AUTHORS ChangeLog
%doc %{_datadir}/doc/aqualung/*
%{_datadir}/doc/aqualung/
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_mandir}/man1/%{name}.1*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/metainfo/%{name}.appdata.xml
%changelog