1 |
%global major 0 |
2 |
%define libname %mklibname wireplumber %major |
3 |
%define devname %mklibname -d wireplumber |
4 |
|
5 |
%bcond_with introspection |
6 |
|
7 |
Name: wireplumber |
8 |
Version: 0.4.6 |
9 |
Release: %mkrel 2 |
10 |
Summary: A modular session/policy manager for PipeWire |
11 |
Group: Sound/Mixers |
12 |
|
13 |
License: MIT |
14 |
URL: https://pipewire.pages.freedesktop.org/wireplumber/ |
15 |
Source0: https://gitlab.freedesktop.org/pipewire/%{name}/-/archive/%{version}/%{name}-%{version}.tar.bz2 |
16 |
|
17 |
## upstream patches |
18 |
|
19 |
## upstreamable patches |
20 |
|
21 |
## fedora patches |
22 |
|
23 |
BuildRequires: meson gcc pkgconfig |
24 |
BuildRequires: pkgconfig(glib-2.0) |
25 |
BuildRequires: pkgconfig(gobject-2.0) |
26 |
BuildRequires: pkgconfig(gmodule-2.0) |
27 |
BuildRequires: pkgconfig(gio-unix-2.0) |
28 |
BuildRequires: pkgconfig(libspa-0.2) >= 0.2 |
29 |
BuildRequires: pkgconfig(libpipewire-0.3) >= 0.3.26 |
30 |
BuildRequires: pkgconfig(systemd) |
31 |
BuildRequires: systemd-devel >= 184 |
32 |
BuildRequires: pkgconfig(lua) |
33 |
BuildRequires: gobject-introspection-devel |
34 |
BuildRequires: python3-lxml doxygen |
35 |
BuildRequires: systemd-devel |
36 |
%{?systemd_ordering} |
37 |
|
38 |
# Make sure that we have -libs package in the same version |
39 |
Requires: %{libname}%{?_isa} = %{version}-%{release} |
40 |
|
41 |
Provides: pipewire-session-manager |
42 |
Conflicts: pipewire-session-manager |
43 |
|
44 |
%package -n %libname |
45 |
Summary: Libraries for WirePlumber clients |
46 |
Recommends: %{name}%{?_isa} = %{version}-%{release} |
47 |
|
48 |
%description -n %libname |
49 |
This package contains the runtime libraries for any application that wishes |
50 |
to interface with WirePlumber. |
51 |
|
52 |
%package -n %devname |
53 |
Summary: Development files for %{name} |
54 |
Requires: %{name}%{?_isa} = %{version}-%{release} |
55 |
Requires: %{libname}%{?_isa} = %{version}-%{release} |
56 |
|
57 |
%description -n %devname |
58 |
The %{name}-devel package contains libraries and header files for |
59 |
developing applications that use %{name}. |
60 |
|
61 |
%description |
62 |
WirePlumber is a modular session/policy manager for PipeWire and a |
63 |
GObject-based high-level library that wraps PipeWire's API, providing |
64 |
convenience for writing the daemon's modules as well as external tools for |
65 |
managing PipeWire. |
66 |
|
67 |
%prep |
68 |
%autosetup -p1 |
69 |
|
70 |
%build |
71 |
%meson -Dsystem-lua=true \ |
72 |
-Ddoc=disabled \ |
73 |
-Dsystemd=enabled \ |
74 |
-Dsystemd-user-service=true \ |
75 |
%if %with introspection |
76 |
-Dintrospection=enabled \ |
77 |
%else |
78 |
-Dintrospection=disabled \ |
79 |
%endif |
80 |
-Delogind=disabled |
81 |
%meson_build |
82 |
|
83 |
%install |
84 |
%meson_install |
85 |
|
86 |
# Create local config skeleton |
87 |
mkdir -p %{buildroot}%{_sysconfdir}/wireplumber/{bluetooth.lua.d,common,main.lua.d,policy.lua.d} |
88 |
|
89 |
%posttrans |
90 |
%systemd_user_post %{name}.service |
91 |
|
92 |
%preun |
93 |
%systemd_user_preun %{name}.service |
94 |
|
95 |
%triggerun -- fedora-release < 35 |
96 |
# When upgrading to Fedora Linux 35, transition to WirePlumber by default |
97 |
if [ -x "/bin/systemctl" ]; then |
98 |
/bin/systemctl --no-reload preset --global %{name}.service || : |
99 |
fi |
100 |
|
101 |
%files |
102 |
%license LICENSE |
103 |
%{_bindir}/wireplumber |
104 |
%{_bindir}/wpctl |
105 |
%{_bindir}/wpexec |
106 |
%dir %{_sysconfdir}/wireplumber |
107 |
%dir %{_sysconfdir}/wireplumber/bluetooth.lua.d |
108 |
%dir %{_sysconfdir}/wireplumber/common |
109 |
%dir %{_sysconfdir}/wireplumber/main.lua.d |
110 |
%dir %{_sysconfdir}/wireplumber/policy.lua.d |
111 |
%{_datadir}/wireplumber/ |
112 |
%{_userunitdir}/wireplumber.service |
113 |
%{_userunitdir}/wireplumber@.service |
114 |
|
115 |
%files -n %libname |
116 |
%license LICENSE |
117 |
%dir %{_libdir}/wireplumber-0.4/ |
118 |
%{_libdir}/wireplumber-0.4/libwireplumber-*.so |
119 |
%{_libdir}/libwireplumber-0.4.so.%{major}* |
120 |
%if %with introspection |
121 |
%{_libdir}/girepository-1.0/Wp-0.4.typelib |
122 |
%endif |
123 |
|
124 |
%files -n %devname |
125 |
%{_includedir}/wireplumber-0.4/ |
126 |
%{_libdir}/libwireplumber-0.4.so |
127 |
%{_libdir}/pkgconfig/wireplumber-0.4.pc |
128 |
%if %with introspection |
129 |
%{_datadir}/gir-1.0/Wp-0.4.gir |
130 |
%endif |
131 |
|