# Status: active
# Tag: Sequencer, MIDI
# Type: Standalone
# Category: Audio, Sequencer, MIDI

Name: seq66
Version: 0.99.16
Release: 1%{?dist}
Summary: MIDI sequencer
License: GPL
URL: https://github.com/ahlstromcj/seq66
ExclusiveArch: x86_64 aarch64

Vendor:       Audinux
Distribution: Audinux

Source0: https://github.com/ahlstromcj/seq66/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
# Patch0: seq66_fix_liblo.patch

BuildRequires: gcc gcc-c++
BuildRequires: make
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: git
BuildRequires: qtchooser
BuildRequires: qt5-linguist
BuildRequires: qt5-qttools
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtdeclarative-devel
BuildRequires: alsa-lib-devel
BuildRequires: liblo-devel
BuildRequires: libglvnd-devel
BuildRequires: rtmidi-devel
BuildRequires: portmidi-devel
BuildRequires: pkgconfig(jack)
BuildRequires: desktop-file-utils

%description
Seq66 is a MIDI sequencer and live-looper with a hardware-sampler-like
grid-pattern interface, sets and playlists for song management, a scale
and chord-aware piano-roll interface, song editor for creative composition,
and control via MIDI automation for live performance.
Mute-groups enable/disable multiple patterns with one keystroke or
MIDI control.
Supports NSM (Non Session Manager) on Linux; can also run headless.
It does not support audio samples, just MIDI.

Seq66 is a major refactoring of Sequencer64/Kepler34, rebooting Seq24
with modern C++ and new features. Linux users can build this application
from the source code. See the INSTALL file; it has notes on many types on
installation. Windows users can get an installer package on GitHub or build
it with Qt Creator. Provides a comprehensive PDF user-manual.

%prep
%autosetup -n %{name}-%{version}

mkdir -p .local/bin
ln -s /usr/bin/qmake-qt5 .local/bin/qmake
ln -s /usr/bin/moc-qt5 .local/bin/moc
ln -s /usr/bin/uic-qt5 .local/bin/uic
ln -s /usr/bin/rcc-qt5 .local/bin/rcc
ln -s /usr/bin/lupdate-qt5 .local/bin/lupdate
ln -s /usr/bin/lrelease-qt5 .local/bin/lrelease

sed -i -e "s|2\.72|2\.71|g" configure.ac
%build

%set_build_flags

%if 0%{?fedora} >= 38
export CXXFLAGS="-std=c++11 -include cstdint $CXXFLAGS"
%endif

export PATH=.local/bin:$PATH

./bootstrap

%configure --enable-cli
%make_build

%install

%make_install

install -m 755 -d %{buildroot}/%{_datadir}/icons/%{name}/
install -m 644 -p desktop/seq66.xpm %{buildroot}/%{_datadir}/icons/%{name}/
install -m 755 -d %{buildroot}/%{_datadir}/applications/
install -m 644 -p data/share/applications/seq66.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop

desktop-file-install                         \
  --add-category="Audio;AudioVideo"	     \
  --delete-original                          \
  --dir=%{buildroot}%{_datadir}/applications \
    %{buildroot}/%{_datadir}/applications/%{name}.desktop

%check
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop

%files
%doc ChangeLog INSTALL NEWS README.md RELNOTES ROADMAP.md TODO
%{_bindir}/*
%{_datadir}/*
%{_includedir}/*
%{_libdir}/*

%changelog
* Tue Dec 03 2024 Yann Collette <ycollette.nospam@free.fr> - 0.99.16-1
- update 0.99.16-1

* Wed Oct 30 2024 Yann Collette <ycollette.nospam@free.fr> - 0.99.15-1
- update 0.99.15-1

* Sat Aug 24 2024 Yann Collette <ycollette.nospam@free.fr> - 0.99.14-1
- update 0.99.14-1

* Tue Aug 06 2024 Yann Collette <ycollette.nospam@free.fr> - 0.99.13-1
- update 0.99.13-1

* Sat Jan 13 2024 Yann Collette <ycollette.nospam@free.fr> - 0.99.12-1
- update 0.99.12-1

* Tue Dec 05 2023 Yann Collette <ycollette.nospam@free.fr> - 0.99.11-1
- update 0.99.11-1

* Thu Oct 26 2023 Yann Collette <ycollette.nospam@free.fr> - 0.99.10-1
- update 0.99.10-1

* Sun Sep 24 2023 Yann Collette <ycollette.nospam@free.fr> - 0.99.9-1
- update 0.99.9-1

* Sun Aug 27 2023 Yann Collette <ycollette.nospam@free.fr> - 0.99.8-1
- update 0.99.8-1

* Wed Jul 19 2023 Yann Collette <ycollette.nospam@free.fr> - 0.99.7-1
- update 0.99.7-1

* Sun Jul 02 2023 Yann Collette <ycollette.nospam@free.fr> - 0.99.6-1
- update 0.99.6-1

* Sat May 20 2023 Yann Collette <ycollette.nospam@free.fr> - 0.99.5-1
- update 0.99.5-1

* Sun Apr 30 2023 Yann Collette <ycollette.nospam@free.fr> - 0.99.4-1
- update 0.99.4-1

* Thu Apr 20 2023 Yann Collette <ycollette.nospam@free.fr> - 0.99.3-1
- update 0.99.3-1

* Mon Mar 20 2023 Yann Collette <ycollette.nospam@free.fr> - 0.99.2-1
- update 0.99.2-1

* Mon Jul 11 2022 Yann Collette <ycollette.nospam@free.fr> - 0.98.9.1-1
- initial version