# file: zmusic.spec # # TODO: Debundle libraries. Source1000: vdb.lua %include %{S:1000} %Global Name ZMusic %global major 1 %global minor 1 %global patch 3 %global ver %{major}.%{minor}.%{patch} %global rel 0.vdb.1 %global summary GZDoom's music system library # -------------------------------------------------------------------------------------------------- # package # -------------------------------------------------------------------------------------------------- Name: %{name} Version: %{ver} Release: %{rel}%{?dist} Summary: %{summary} License: GPLv3 URL: https://zdoom.org/wiki/%{Name} Source0: https://github.com/coelckers/%{Name}/archive/%{ver}.tar.gz#/%{Name}-%{ver}.tar.gz BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ %package lite Summary: Lite version of %{summary} License: GPLv2 %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{ver}-%{rel} Requires: pkgconfig %package lite-devel Summary: Development files for %{name}lite License: GPLv2 Requires: %{name}lite%{?_isa} = %{ver}-%{rel} Requires: pkgconfig # -------------------------------------------------------------------------------------------------- # description # -------------------------------------------------------------------------------------------------- %description %{lua: descr( [[ ZMusic is GZDoom's music system separated as a stand-alone music library, providing a unified interface for its components. It links with FluidSynth and integrates the following components: Foo DUMB, Game Music Emu, LibADLMIDI, LibOPNMIDI, OPL synth emulation, TiMidity, TiMidity++, WildMIDI. ]] ) } %description lite %{lua: descr( [[ It is stripped down version of %{name}, released under GPLv2.1. Following components are excluded: libADL, libOPN, OPL synth emulation, TiMidity, TiMidity++, WildMIDI, because their licenses are not compatible with GPLv2.1. ]] ) } %description devel %{lua: descr( [[ This package includes %{name} development files. ]] ) } %description lite-devel %{lua: descr( [[ This package includes %{name}lite development files. ]] ) } # -------------------------------------------------------------------------------------------------- # prep # -------------------------------------------------------------------------------------------------- %prep %setup -q -n %{Name}-%{major}.%{minor}.%{patch} %{__mkdir} _build cd _build %{__cmake} -D CMAKE_INSTALL_PREFIX=%{_prefix} .. # -------------------------------------------------------------------------------------------------- # build # -------------------------------------------------------------------------------------------------- %build cd _build %{make_build} # Generate pc files: for name in '%{name}' '%{name}lite'; do { echo "prefix=%{_prefix}" echo "libdir=%{_libdir}" echo "includedir=%{_includedir}" echo "" echo "Name: $name" echo "Description: %{summary}" echo "URL: %{url}" echo "Version: %{ver}" echo "Cflags: -I\${includedir}" echo "Libs: -L\${libdir} -l$name" } > $name.pc.tmp %{__mv} $name.pc.tmp $name.pc done # -------------------------------------------------------------------------------------------------- # install # -------------------------------------------------------------------------------------------------- %install cd _build %{make_install} for name in '%{name}' '%{name}lite'; do %_install_D -p -m 644 -t "%{buildroot}%{_libdir}/pkgconfig" ${name}.pc done # -------------------------------------------------------------------------------------------------- # files # -------------------------------------------------------------------------------------------------- %files %{_libdir}/lib%{name}.so.* %license licenses/* %files lite %{_libdir}/lib%{name}lite.so.* %license licenses/* %files devel %{_includedir}/%{name}.h %{_libdir}/lib%{name}.so %{_libdir}/pkgconfig/%{name}.pc %files lite-devel %{_includedir}/%{name}.h %{_libdir}/lib%{name}lite.so %{_libdir}/pkgconfig/%{name}lite.pc # -------------------------------------------------------------------------------------------------- # changelog # -------------------------------------------------------------------------------------------------- %changelog * Sun Oct 11 2020 Van de Bugger - 1.1.3-0.vdb.1 - Initial revision.