| 1 | %global out out123
|
|---|
| 2 | %global fmt fmt123
|
|---|
| 3 | %global syn syn123
|
|---|
| 4 |
|
|---|
| 5 | Name: mpg123
|
|---|
| 6 | Version: 1.30.1
|
|---|
| 7 | Release: 1%{?dist}
|
|---|
| 8 | Summary: Real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3
|
|---|
| 9 | License: LGPLv2+
|
|---|
| 10 | URL: https://mpg123.org
|
|---|
| 11 | %if !0%{?os2_version}
|
|---|
| 12 | Source0: %{url}/download/%{name}-%{version}.tar.bz2
|
|---|
| 13 | %else
|
|---|
| 14 | %scm_source github https://github.com/TeLLie/%{name}-os2 %{version}-os2
|
|---|
| 15 | %endif
|
|---|
| 16 |
|
|---|
| 17 | BuildRequires: autoconf
|
|---|
| 18 | BuildRequires: automake
|
|---|
| 19 | BuildRequires: gcc
|
|---|
| 20 | BuildRequires: libtool
|
|---|
| 21 | BuildRequires: make
|
|---|
| 22 | %if !0%{?os2_version}
|
|---|
| 23 | BuildRequires: pkgconfig(alsa)
|
|---|
| 24 | %endif
|
|---|
| 25 |
|
|---|
| 26 | Requires: %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|---|
| 27 |
|
|---|
| 28 | %if 0%{?fedora}
|
|---|
| 29 | %global enable_jack 1
|
|---|
| 30 | %global enable_portaudio 1
|
|---|
| 31 | %endif
|
|---|
| 32 |
|
|---|
| 33 | %global _summary %{summary}
|
|---|
| 34 |
|
|---|
| 35 | %global _description \
|
|---|
| 36 | Real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (most \
|
|---|
| 37 | commonly MPEG 1.0 layer 3 aka MP3), as well as re-usable decoding and output \
|
|---|
| 38 | libraries.
|
|---|
| 39 |
|
|---|
| 40 | %description %{_description}
|
|---|
| 41 |
|
|---|
| 42 | %package plugins-pulseaudio
|
|---|
| 43 | Summary: Pulseaudio output plug-in for %{name}
|
|---|
| 44 | %if !0%{?os2_version}
|
|---|
| 45 | BuildRequires: pkgconfig(libpulse-simple)
|
|---|
| 46 | %endif
|
|---|
| 47 | Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|---|
| 48 | %if 0%{?fedora} || 0%{?rhel} >= 8
|
|---|
| 49 | Supplements: (mpg123%{?_isa} and pulseaudio%{?_isa})
|
|---|
| 50 | %endif
|
|---|
| 51 |
|
|---|
| 52 | %description plugins-pulseaudio %{_description}
|
|---|
| 53 |
|
|---|
| 54 | Pulseaudio output plug-in.
|
|---|
| 55 |
|
|---|
| 56 | %if 0%{?enable_jack}
|
|---|
| 57 | %package plugins-jack
|
|---|
| 58 | Summary: JACK output plug-in for %{name}
|
|---|
| 59 | BuildRequires: pkgconfig(jack)
|
|---|
| 60 | Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|---|
| 61 | %if 0%{?fedora} || 0%{?rhel} >= 8
|
|---|
| 62 | Supplements: (mpg123%{?_isa} and jack-audio-connection-kit%{?_isa})
|
|---|
| 63 | %endif
|
|---|
| 64 | Obsoletes: %{name}-plugins-extras < 1.23.4-1
|
|---|
| 65 |
|
|---|
| 66 | %description plugins-jack %{_description}
|
|---|
| 67 |
|
|---|
| 68 | JACK output plug-in.
|
|---|
| 69 | %endif
|
|---|
| 70 |
|
|---|
| 71 | %if 0%{?enable_portaudio}
|
|---|
| 72 | %package plugins-portaudio
|
|---|
| 73 | Summary: PortAudio output plug-in for %{name}
|
|---|
| 74 | BuildRequires: pkgconfig(portaudio-2.0)
|
|---|
| 75 | Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|---|
| 76 | %if 0%{?fedora} || 0%{?rhel} >= 8
|
|---|
| 77 | Supplements: (mpg123%{?_isa} and portaudio%{?_isa})
|
|---|
| 78 | %endif
|
|---|
| 79 |
|
|---|
| 80 | %description plugins-portaudio %{_description}
|
|---|
| 81 |
|
|---|
| 82 | PortAudio output plug-in.
|
|---|
| 83 | %endif
|
|---|
| 84 |
|
|---|
| 85 | %package libs
|
|---|
| 86 | Summary: %{_summary}
|
|---|
| 87 | Provides: lib%{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|---|
| 88 | Provides: lib%{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|---|
| 89 | Obsoletes: lib%{name} < 1.23.4-1
|
|---|
| 90 |
|
|---|
| 91 | %description libs %{_description}
|
|---|
| 92 |
|
|---|
| 93 | %package devel
|
|---|
| 94 | Summary: %{_summary}
|
|---|
| 95 | %if !0%{?os2_version}
|
|---|
| 96 | BuildRequires: /usr/bin/doxygen
|
|---|
| 97 | %else
|
|---|
| 98 | BuildRequires: /@unixroot/usr/bin/doxygen.exe
|
|---|
| 99 | %endif
|
|---|
| 100 | Requires: %{name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|---|
| 101 | Provides: lib%{name}-devel = %{?epoch:%{epoch}:}%{version}-%{release}
|
|---|
| 102 | Provides: lib%{name}-devel%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|---|
| 103 | Obsoletes: lib%{name}-devel < 1.23.4-1
|
|---|
| 104 | Obsoletes: %{name}-libs-devel < 1.23.8-3
|
|---|
| 105 |
|
|---|
| 106 | %description devel %{_description}
|
|---|
| 107 |
|
|---|
| 108 | Development files for decoding and output libraries.
|
|---|
| 109 |
|
|---|
| 110 | %prep
|
|---|
| 111 | %if !0%{?os2_version}
|
|---|
| 112 | %autosetup
|
|---|
| 113 | %else
|
|---|
| 114 | %scm_setup
|
|---|
| 115 | %endif
|
|---|
| 116 |
|
|---|
| 117 | %build
|
|---|
| 118 | autoreconf -vfi
|
|---|
| 119 | %if !0%{?os2_version}
|
|---|
| 120 | %configure --enable-modules=yes --with-default-audio=alsa \
|
|---|
| 121 | --with-audio=alsa,%{?enable_jack:jack},pulse,oss,%{?enable_portaudio:portaudio}
|
|---|
| 122 | %make_build
|
|---|
| 123 | %else
|
|---|
| 124 | export LDFLAGS="-Zomf -Zmap -Zhigh-mem -Zargs-wild -Zargs-resp"
|
|---|
| 125 | export LIBS="-lcx"
|
|---|
| 126 |
|
|---|
| 127 | %configure --with-cpu=x86 --enable-debug=no --enable-modules=no --with-network=exec --with-default-audio=os2
|
|---|
| 128 | make %{?_smp_mflags}
|
|---|
| 129 | %endif
|
|---|
| 130 |
|
|---|
| 131 | %if !0%{?os2_version}
|
|---|
| 132 | pushd doc
|
|---|
| 133 | doxygen doxygen.conf
|
|---|
| 134 | popd
|
|---|
| 135 | %else
|
|---|
| 136 | cd doc
|
|---|
| 137 | doxygen doxygen.conf
|
|---|
| 138 | cd ..
|
|---|
| 139 | %endif
|
|---|
| 140 |
|
|---|
| 141 | %install
|
|---|
| 142 | %if !0%{?os2_version}
|
|---|
| 143 | %make_install
|
|---|
| 144 | %else
|
|---|
| 145 | make install DESTDIR=${RPM_BUILD_ROOT}
|
|---|
| 146 | rm ${RPM_BUILD_ROOT}/%{_libdir}/*.la
|
|---|
| 147 | %endif
|
|---|
| 148 |
|
|---|
| 149 | %if !0%{?os2_version}
|
|---|
| 150 | %ldconfig_scriptlets libs
|
|---|
| 151 | %endif
|
|---|
| 152 |
|
|---|
| 153 | %files
|
|---|
| 154 | %doc doc/README.remote
|
|---|
| 155 | %if !0%{?os2_version}
|
|---|
| 156 | %{_bindir}/%{name}
|
|---|
| 157 | %{_bindir}/%{name}-id3dump
|
|---|
| 158 | %{_bindir}/%{name}-strip
|
|---|
| 159 | %{_bindir}/%{out}
|
|---|
| 160 | %else
|
|---|
| 161 | %{_bindir}/%{name}.exe
|
|---|
| 162 | %{_bindir}/%{name}-id3dump.exe
|
|---|
| 163 | %{_bindir}/%{name}-strip.exe
|
|---|
| 164 | %{_bindir}/%{out}.exe
|
|---|
| 165 | %endif
|
|---|
| 166 | %doc %{_mandir}/man1/%{name}.1*
|
|---|
| 167 | %doc %{_mandir}/man1/%{out}.1*
|
|---|
| 168 | %if !0%{?os2_version}
|
|---|
| 169 | %dir %{_libdir}/%{name}/
|
|---|
| 170 | %{_libdir}/%{name}/output_alsa.*
|
|---|
| 171 | %{_libdir}/%{name}/output_dummy.*
|
|---|
| 172 | %{_libdir}/%{name}/output_oss.*
|
|---|
| 173 | %endif
|
|---|
| 174 |
|
|---|
| 175 | %if !0%{?os2_version}
|
|---|
| 176 | %files plugins-pulseaudio
|
|---|
| 177 | %{_libdir}/%{name}/output_pulse.*
|
|---|
| 178 | %endif
|
|---|
| 179 |
|
|---|
| 180 | %if 0%{?enable_jack}
|
|---|
| 181 | %files plugins-jack
|
|---|
| 182 | %{_libdir}/%{name}/output_jack.*
|
|---|
| 183 | %endif
|
|---|
| 184 |
|
|---|
| 185 | %if 0%{?enable_portaudio}
|
|---|
| 186 | %files plugins-portaudio
|
|---|
| 187 | %{_libdir}/%{name}/output_portaudio.*
|
|---|
| 188 | %endif
|
|---|
| 189 |
|
|---|
| 190 | %files libs
|
|---|
| 191 | %license COPYING
|
|---|
| 192 | %doc NEWS
|
|---|
| 193 | %if !0%{?os2_version}
|
|---|
| 194 | %{_libdir}/lib%{name}.so.0*
|
|---|
| 195 | %{_libdir}/lib%{out}.so.0*
|
|---|
| 196 | %{_libdir}/lib%{syn}.so.0*
|
|---|
| 197 | %else
|
|---|
| 198 | %{_libdir}/%{name}*.dll
|
|---|
| 199 | %{_libdir}/%{out}*.dll
|
|---|
| 200 | %{_libdir}/%{syn}*.dll
|
|---|
| 201 | %endif
|
|---|
| 202 |
|
|---|
| 203 | %files devel
|
|---|
| 204 | %doc NEWS.lib%{name} doc/html doc/examples doc/BENCHMARKING doc/README.gain
|
|---|
| 205 | %{_includedir}/%{name}.h
|
|---|
| 206 | %{_includedir}/%{out}.h
|
|---|
| 207 | %{_includedir}/%{fmt}.h
|
|---|
| 208 | %{_includedir}/%{syn}.h
|
|---|
| 209 | %if !0%{?os2_version}
|
|---|
| 210 | %{_libdir}/lib%{name}.so
|
|---|
| 211 | %{_libdir}/lib%{out}.so
|
|---|
| 212 | %{_libdir}/lib%{syn}.so
|
|---|
| 213 | %else
|
|---|
| 214 | %{_libdir}/%{name}*.a
|
|---|
| 215 | %{_libdir}/%{out}*.a
|
|---|
| 216 | %{_libdir}/%{syn}*.a
|
|---|
| 217 | %endif
|
|---|
| 218 | %{_libdir}/pkgconfig/lib%{name}.pc
|
|---|
| 219 | %{_libdir}/pkgconfig/lib%{out}.pc
|
|---|
| 220 | %{_libdir}/pkgconfig/lib%{syn}.pc
|
|---|
| 221 |
|
|---|
| 222 | %changelog
|
|---|
| 223 | * Fri Jul 22 2022 Elbert Pol <elbert.pol@gmail.com> - 1.30.1-1
|
|---|
| 224 | - Updated to latest version
|
|---|
| 225 |
|
|---|
| 226 | * Wed Jun 29 2022 Elbert Pol <elbert.pol@gmail.com> - 1.30.0-1
|
|---|
| 227 | - First RPM for OS2
|
|---|
| 228 | - Thankz Dave Yeo for fixing OS2 releated errors
|
|---|