# -------------------------------------------------------------------------------------------------- # File: mp3val.spec # Copyright 🄯 2022 Van de Bugger. # SPDX-License-Identifier: GPL-3.0-or-later # -------------------------------------------------------------------------------------------------- %global _vdb_debug_ 0 Source1000: vdb.lua %include %{S:1000} %global major 0 %global minor 1 %global patch 8 %global rel 0.vdb.2 Name: mp3val Version: %{major}.%{minor}.%{patch} Release: %{rel}%{?dist} Summary: Small, high-speed command-line tool for MPEG audio file validation License: GPLv2+ URL: http://mp3val.sourceforge.net/ Source0: https://sourceforge.net/projects/%{name}/files/%{name}/%{name}%20%{version}/%{name}-%{version}-src.tar.gz Source1: mp3val-0.1.8.vdb.Makefile Patch0: mp3val-0.1.8-error.vdb.patch # Fix error detected by modern compiler. Patch1: mp3val-0.1.8-warnings.vdb.patch # Eliminate bunch of compiler warnings (not all). Patch2: mp3val-0.1.8-exit-status.vdb.patch # Exit with non-zero status in case of errors. Patch3: mp3val-0.1.8-strncpy.vdb.patch # Fix strncpy usage error. Note: exit-status.vdb.patch and strncpy.vdb.patch patch the same # function, so order of patch files is important. BuildRequires: gcc-c++ BuildRequires: make %description %{text -- \ MP3val is a small, high-speed, command-line tool for checking MPEG audio files' integrity. It can be useful for finding corrupted files (e. g. incompletely downloaded, truncated, containing garbage). MP3val is also able to fix most of the problems. The most common MPEG audio file type is MPEG 1 Layer III (mp3), but MP3val supports also other MPEG versions and layers. The tool is also aware of the most common types of tags (ID3v1, ID3v2, APEv2). VdB note: The original source code is patched to let the program return non-zero status code if the program detects any problems in the given mp3 files. } %prep %setup -q -n %{name}-%{version}-src %autopatch -p1 # Make files non-executable: chmod a-x * # Many build platforms set important environment variables (i. e. `CXX`, `CXXFLAGS` to name a few) # in `configure` macro, just before running the `configure` script. If `configure` macro is not # called, all these environment variables left undefined. Even if `configure` macro is called in # the `prep` stage, these environment variables are left undefined in the `build` stage. # To workaround this problem, let's play a trick: First, let's create dummy `configure` script. # Also, `rpmlint` issues a warning "configure-without-libdir-spec". Apostrophes hide `configure` # from `rpmlint`. echo "#!/bin/sh " > ./conf'i'gure chmod a+x ./conf'i'gure %build # Then let's call the `configure` macro in the `build` stage. %{configure} %{make_build} -f %{S:1} %check %install %_install_D -t %{buildroot}%{_bindir} %{name} %_install_D -m u=rw,go=r -t %{buildroot}%{_docdir}/%{name} manual.html %files %{_bindir}/%{name} %doc %dir %{_docdir}/%{name} %doc %{_docdir}/%{name}/* %license COPYING %changelog * Wed Sep 14 2022 Van de Bugger - 0.1.8-0.vdb.2 - Patch exit-status updated to retirn status 1 in case of warnings. * Mon Sep 12 2022 Van de Bugger - 0.1.8-0.vdb.1 - Initial release.