/
FAudio.spec
151 lines (124 loc) · 4.1 KB
/
FAudio.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# Wine uses FAudio
%ifarch %{x86_64}
%bcond_without compat32
%endif
%define major 0
%define libname %mklibname %{name} %{major}
%define devname %mklibname %{name} -d
%define lib32name %mklib32name %{name} %{major}
%define dev32name %mklib32name %{name} -d
Summary: A free reimplementation of the DirectX XAudio APIs
Name: FAudio
Version: 24.05
Release: 1
License: MIT
Group: System/Libraries
Url: https://fna-xna.github.io/
Source0: https://github.com/FNA-XNA/FAudio/archive/%{version}/%{name}-%{version}.tar.gz
Patch0: faudio-19.03-compile.patch
BuildRequires: cmake ninja
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(sdl2)
BuildRequires: pkgconfig(libunwind-llvm)
%if %{with compat32}
BuildRequires: devel(libavcodec)
BuildRequires: devel(libdbus-1)
BuildRequires: devel(libSDL2-2.0)
BuildRequires: devel(libunwind)
%endif
#----------------------------------------------------------------------------
%description
This is FAudio, an XAudio reimplementation that focuses solely on developing
fully accurate DirectX Audio runtime libraries for the FNA project, including
XAudio2, X3DAudio, XAPO, and XACT3.
%package -n %{libname}
Summary: Main library for %{name}
Group: System/Libraries
%description -n %{libname}
This package contains the library needed to run programs dynamically
linked with %{name}.
FAudio is an XAudio reimplementation that focuses solely on developing
fully accurate DirectX Audio runtime libraries for the FNA project, including
XAudio2, X3DAudio, XAPO, and XACT3.
%files -n %{libname}
%{_libdir}/libFAudio.so.%{major}*
#----------------------------------------------------------------------------
%package -n %{devname}
Summary: Headers for developing programs that will use %{name}
Group: Development/C
Requires: %{libname} = %{version}-%{release}
Provides: %{name}-devel = %{version}-%{release}
%description -n %{devname}
This package contains the headers that programmers will need to develop
applications which will use %{name}.
FAudio is an XAudio reimplementation that focuses solely on developing
fully accurate DirectX Audio runtime libraries for the FNA project, including
XAudio2, X3DAudio, XAPO, and XACT3.
%files -n %{devname}
%{_includedir}/*
%{_libdir}/libFAudio.so
%{_libdir}/cmake/FAudio
%{_libdir}/pkgconfig/*.pc
#----------------------------------------------------------------------------
%if %{with compat32}
%package -n %{lib32name}
Summary: Main library for %{name} (32-bit)
Group: System/Libraries
%description -n %{lib32name}
This package contains the library needed to run programs dynamically
linked with %{name}.
FAudio is an XAudio reimplementation that focuses solely on developing
fully accurate DirectX Audio runtime libraries for the FNA project, including
XAudio2, X3DAudio, XAPO, and XACT3.
%files -n %{lib32name}
%{_prefix}/lib/libFAudio.so.%{major}*
#----------------------------------------------------------------------------
%package -n %{dev32name}
Summary: Headers for developing programs that will use %{name} (32-bit)
Group: Development/C
Requires: %{devname} = %{version}-%{release}
Requires: %{lib32name} = %{version}-%{release}
%description -n %{dev32name}
This package contains the headers that programmers will need to develop
applications which will use %{name}.
FAudio is an XAudio reimplementation that focuses solely on developing
fully accurate DirectX Audio runtime libraries for the FNA project, including
XAudio2, X3DAudio, XAPO, and XACT3.
%files -n %{dev32name}
%{_prefix}/lib/libFAudio.so
%{_prefix}/lib/cmake/FAudio
%{_prefix}/lib/pkgconfig/*.pc
%endif
%prep
%autosetup -p1
# Fix build -- lists a few file that have been deleted
sed -i \
-e '/glfuncs.h/d' \
-e '/glmacros.h/d' \
CMakeLists.txt
%if %{with compat32}
%cmake32 \
-DBUILD_TESTS:BOOL=ON \
-DBUILD_UTILS:BOOL=ON \
-DFFMPEG:BOOL=ON \
-DXNASONG:BOOL=ON \
-G Ninja
cd ..
%endif
%cmake \
-DBUILD_TESTS:BOOL=OFF \
-DBUILD_UTILS:BOOL=ON \
-DFFMPEG:BOOL=ON \
-DXNASONG:BOOL=ON \
-G Ninja
%build
%if %{with compat32}
%ninja_build -C build32
%endif
%ninja_build -C build
%install
%if %{with compat32}
%ninja_install -C build32
%endif
%ninja_install -C build