mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-22 06:59:59 -05:00
Cleanups
This commit is contained in:
parent
dbb57fc58e
commit
e44a5818ae
9 changed files with 40 additions and 74 deletions
3
Makefile
3
Makefile
|
|
@ -11,3 +11,6 @@ run:
|
||||||
PIPEWIRE_MODULE_DIR=build \
|
PIPEWIRE_MODULE_DIR=build \
|
||||||
PIPEWIRE_CONFIG_FILE=build/pipewire/daemon/pipewire.conf \
|
PIPEWIRE_CONFIG_FILE=build/pipewire/daemon/pipewire.conf \
|
||||||
build/pipewire/daemon/pipewire
|
build/pipewire/daemon/pipewire
|
||||||
|
|
||||||
|
dist:
|
||||||
|
git archive --prefix=pipewire-0.1.0/ -o pipewire-0.1.0.tar.gz HEAD
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
%global majorminor 0.1
|
%global majorminor 0.1.0
|
||||||
|
|
||||||
#global snap 20141103
|
#global snap 20141103
|
||||||
#global gitrel 327
|
#global gitrel 327
|
||||||
|
|
@ -13,36 +13,31 @@
|
||||||
|
|
||||||
Name: pipewire
|
Name: pipewire
|
||||||
Summary: Media Sharing Server
|
Summary: Media Sharing Server
|
||||||
Version: 0.1
|
Version: 0.1.0
|
||||||
Release: 2%{?snap:.%{snap}git%{shortcommit}}%{?dist}
|
Release: 2%{?snap:.%{snap}git%{shortcommit}}%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://www.freedesktop.org/wiki/Software/PipeWire
|
URL: http://www.freedesktop.org/wiki/Software/PipeWire
|
||||||
%if 0%{?gitrel}
|
%if 0%{?gitrel}
|
||||||
# git clone git://anongit.freedesktop.org/gstreamer/pipewire
|
# git clone git://anongit.freedesktop.org/gstreamer/pipewire
|
||||||
# cd pipewire; git reset --hard %{gitcommit}; ./autogen.sh; make; make distcheck
|
# cd pipewire; git reset --hard %{gitcommit}; ./autogen.sh; make; make distcheck
|
||||||
Source0: pipewire-%{version}-%{gitrel}-g%{shortcommit}.tar.xz
|
Source0: pipewire-%{version}-%{gitrel}-g%{shortcommit}.tar.gz
|
||||||
%else
|
%else
|
||||||
Source0: http://freedesktop.org/software/pipewire/releases/pipewire-%{version}.tar.xz
|
Source0: http://freedesktop.org/software/pipewire/releases/pipewire-%{version}.tar.gz
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
## upstream patches
|
## upstream patches
|
||||||
|
|
||||||
## upstreamable patches
|
## upstreamable patches
|
||||||
|
|
||||||
BuildRequires: automake libtool
|
BuildRequires: meson >= 0.35.0
|
||||||
BuildRequires: m4
|
|
||||||
BuildRequires: libtool-ltdl-devel
|
|
||||||
BuildRequires: intltool
|
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: xmltoman
|
|
||||||
BuildRequires: tcp_wrappers-devel
|
|
||||||
BuildRequires: pkgconfig(glib-2.0) >= 2.32
|
BuildRequires: pkgconfig(glib-2.0) >= 2.32
|
||||||
BuildRequires: pkgconfig(gio-unix-2.0) >= 2.32
|
BuildRequires: pkgconfig(gio-unix-2.0) >= 2.32
|
||||||
BuildRequires: pkgconfig(gstreamer-1.0) >= 1.5.0
|
BuildRequires: pkgconfig(gstreamer-1.0) >= 1.10.0
|
||||||
BuildRequires: pkgconfig(gstreamer-base-1.0) >= 1.5.0
|
BuildRequires: pkgconfig(gstreamer-base-1.0) >= 1.10.0
|
||||||
BuildRequires: pkgconfig(gstreamer-plugins-base-1.0) >= 1.5.0
|
BuildRequires: pkgconfig(gstreamer-plugins-base-1.0) >= 1.10.0
|
||||||
BuildRequires: pkgconfig(gstreamer-net-1.0) >= 1.5.0
|
BuildRequires: pkgconfig(gstreamer-net-1.0) >= 1.10.0
|
||||||
BuildRequires: pkgconfig(gstreamer-allocators-1.0) >= 1.5.0
|
BuildRequires: pkgconfig(gstreamer-allocators-1.0) >= 1.10.0
|
||||||
BuildRequires: systemd-devel >= 184
|
BuildRequires: systemd-devel >= 184
|
||||||
|
|
||||||
Requires(pre): shadow-utils
|
Requires(pre): shadow-utils
|
||||||
|
|
@ -81,46 +76,15 @@ This package contains command line utilities for the PipeWire media server.
|
||||||
%prep
|
%prep
|
||||||
%setup -q -T -b0 -n %{name}-%{version}%{?gitrel:-%{gitrel}-g%{shortcommit}}
|
%setup -q -T -b0 -n %{name}-%{version}%{?gitrel:-%{gitrel}-g%{shortcommit}}
|
||||||
|
|
||||||
%if 0%{?gitrel:1}
|
|
||||||
# fixup PACKAGE_VERSION that leaks into pkgconfig files and friends
|
|
||||||
sed -i.PACKAGE_VERSION -e "s|^PACKAGE_VERSION=.*|PACKAGE_VERSION=\'%{version}\'|" configure
|
|
||||||
%else
|
|
||||||
## kill rpaths
|
|
||||||
%if "%{_libdir}" != "/usr/lib"
|
|
||||||
sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure \
|
%meson
|
||||||
--disable-silent-rules \
|
%meson_build
|
||||||
--disable-static \
|
|
||||||
--disable-rpath \
|
|
||||||
--with-system-user=pipewire \
|
|
||||||
--with-system-group=pipewire \
|
|
||||||
--with-access-group=pipewire-access \
|
|
||||||
--disable-systemd-daemon \
|
|
||||||
--enable-tests
|
|
||||||
|
|
||||||
make %{?_smp_mflags} V=1
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
%meson_install
|
||||||
|
|
||||||
## unpackaged files
|
|
||||||
# extraneous libtool crud
|
|
||||||
rm -fv $RPM_BUILD_ROOT%{_libdir}/*.la
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# don't fail build due failing tests on big endian arches (rhbz#1067470)
|
%meson_test
|
||||||
make check \
|
|
||||||
%ifarch ppc %{power64} s390 s390x
|
|
||||||
|| :
|
|
||||||
%else
|
|
||||||
%{nil}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
getent group pipewire >/dev/null || groupadd -r pipewire
|
getent group pipewire >/dev/null || groupadd -r pipewire
|
||||||
|
|
@ -135,9 +99,6 @@ exit 0
|
||||||
%license LICENSE GPL LGPL
|
%license LICENSE GPL LGPL
|
||||||
%doc README
|
%doc README
|
||||||
%{_sysconfdir}/xdg/autostart/pipewire.desktop
|
%{_sysconfdir}/xdg/autostart/pipewire.desktop
|
||||||
## already owned by -libs, see also https://bugzilla.redhat.com/show_bug.cgi?id=909690
|
|
||||||
#dir %{_sysconfdir}/pipewire/
|
|
||||||
%{_sysconfdir}/dbus-1/system.d/pipewire-system.conf
|
|
||||||
%{_bindir}/pipewire
|
%{_bindir}/pipewire
|
||||||
%{_libdir}/libpipewire-%{majorminor}.so
|
%{_libdir}/libpipewire-%{majorminor}.so
|
||||||
%{_libdir}/libpipewirecore-%{majorminor}.so
|
%{_libdir}/libpipewirecore-%{majorminor}.so
|
||||||
|
|
|
||||||
|
|
@ -453,8 +453,7 @@ struct pw_context *pw_context_new(struct pw_loop *loop,
|
||||||
|
|
||||||
this->loop = loop;
|
this->loop = loop;
|
||||||
|
|
||||||
this->protocol = pw_protocol_get(PW_TYPE_PROTOCOL__Native);
|
this->protocol = pw_protocol_native_client_init();
|
||||||
pw_protocol_native_client_init();
|
|
||||||
|
|
||||||
pw_type_init(&this->type);
|
pw_type_init(&this->type);
|
||||||
|
|
||||||
|
|
@ -753,7 +752,7 @@ pw_context_list_module_info(struct pw_context *context, pw_module_info_cb_t cb,
|
||||||
/** Get module information
|
/** Get module information
|
||||||
*
|
*
|
||||||
* \param context A \ref pw_context
|
* \param context A \ref pw_context
|
||||||
* \param id the server side id of the module to query
|
* \param id the client side id of the module to query
|
||||||
* \param cb the callback to call with the results
|
* \param cb the callback to call with the results
|
||||||
* \param user_data user data passed to \a cb
|
* \param user_data user data passed to \a cb
|
||||||
*
|
*
|
||||||
|
|
@ -800,7 +799,7 @@ pw_context_list_client_info(struct pw_context *context, pw_client_info_cb_t cb,
|
||||||
/** Get client information
|
/** Get client information
|
||||||
*
|
*
|
||||||
* \param context A \ref pw_context
|
* \param context A \ref pw_context
|
||||||
* \param id the server side id of the client to query
|
* \param id the client side id of the client to query
|
||||||
* \param cb the callback to call with the results
|
* \param cb the callback to call with the results
|
||||||
* \param user_data user data passed to \a cb
|
* \param user_data user data passed to \a cb
|
||||||
*
|
*
|
||||||
|
|
@ -846,7 +845,7 @@ void pw_context_list_node_info(struct pw_context *context, pw_node_info_cb_t cb,
|
||||||
/** Get node information
|
/** Get node information
|
||||||
*
|
*
|
||||||
* \param context A \ref pw_context
|
* \param context A \ref pw_context
|
||||||
* \param id the server side id of the node to query
|
* \param id the client side id of the node to query
|
||||||
* \param cb the callback to call with the results
|
* \param cb the callback to call with the results
|
||||||
* \param user_data user data passed to \a cb
|
* \param user_data user data passed to \a cb
|
||||||
*
|
*
|
||||||
|
|
@ -892,7 +891,7 @@ void pw_context_list_link_info(struct pw_context *context, pw_link_info_cb_t cb,
|
||||||
/** Get link information
|
/** Get link information
|
||||||
*
|
*
|
||||||
* \param context A \ref pw_context
|
* \param context A \ref pw_context
|
||||||
* \param id the server side id of the link to query
|
* \param id the client side id of the link to query
|
||||||
* \param cb the callback to call with the results
|
* \param cb the callback to call with the results
|
||||||
* \param user_data user data passed to \a cb
|
* \param user_data user data passed to \a cb
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1025,16 +1025,16 @@ static const struct pw_interface pw_protocol_native_client_link_interface = {
|
||||||
PW_LINK_EVENT_NUM, pw_protocol_native_client_link_demarshal,
|
PW_LINK_EVENT_NUM, pw_protocol_native_client_link_demarshal,
|
||||||
};
|
};
|
||||||
|
|
||||||
void pw_protocol_native_client_init(void)
|
struct pw_protocol *pw_protocol_native_client_init(void)
|
||||||
{
|
{
|
||||||
static bool init = false;
|
static bool init = false;
|
||||||
struct pw_protocol *protocol;
|
struct pw_protocol *protocol;
|
||||||
|
|
||||||
if (init)
|
|
||||||
return;
|
|
||||||
|
|
||||||
protocol = pw_protocol_get(PW_TYPE_PROTOCOL__Native);
|
protocol = pw_protocol_get(PW_TYPE_PROTOCOL__Native);
|
||||||
|
|
||||||
|
if (init)
|
||||||
|
return protocol;
|
||||||
|
|
||||||
pw_protocol_add_interfaces(protocol,
|
pw_protocol_add_interfaces(protocol,
|
||||||
&pw_protocol_native_client_core_interface,
|
&pw_protocol_native_client_core_interface,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
@ -1058,4 +1058,6 @@ void pw_protocol_native_client_init(void)
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
init = true;
|
init = true;
|
||||||
|
|
||||||
|
return protocol;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,4 +17,6 @@
|
||||||
* Boston, MA 02110-1301, USA.
|
* Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void pw_protocol_native_client_init(void);
|
#include <pipewire/client/protocol.h>
|
||||||
|
|
||||||
|
struct pw_protocol *pw_protocol_native_client_init(void);
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ struct pw_proxy {
|
||||||
const void *implementation; /**< event handler implementation */
|
const void *implementation; /**< event handler implementation */
|
||||||
pw_destroy_t destroy; /**< optional destroy function to clean up the object */
|
pw_destroy_t destroy; /**< optional destroy function to clean up the object */
|
||||||
|
|
||||||
/** destroy_signal is emited when the proxy is destroyed */
|
/** destroy is emited when the proxy is destroyed */
|
||||||
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_proxy *proxy));
|
PW_SIGNAL(destroy_signal, (struct pw_listener *listener, struct pw_proxy *proxy));
|
||||||
|
|
||||||
void *user_data; /**< extra user data */
|
void *user_data; /**< extra user data */
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,6 @@ struct native_client {
|
||||||
int fd;
|
int fd;
|
||||||
struct spa_source *source;
|
struct spa_source *source;
|
||||||
struct pw_connection *connection;
|
struct pw_connection *connection;
|
||||||
struct pw_listener resource_added;
|
|
||||||
struct pw_listener busy_changed;
|
struct pw_listener busy_changed;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -219,7 +218,7 @@ static struct native_client *client_new(struct impl *impl, int fd)
|
||||||
if (this->connection == NULL)
|
if (this->connection == NULL)
|
||||||
goto no_connection;
|
goto no_connection;
|
||||||
|
|
||||||
client->protocol = pw_protocol_get(PW_TYPE_PROTOCOL__Native);
|
client->protocol = pw_protocol_native_server_init();
|
||||||
client->protocol_private = this->connection;
|
client->protocol_private = this->connection;
|
||||||
|
|
||||||
this->client = client;
|
this->client = client;
|
||||||
|
|
@ -453,8 +452,6 @@ static void pw_protocol_native_destroy(struct impl *impl)
|
||||||
|
|
||||||
bool pipewire__module_init(struct pw_module *module, const char *args)
|
bool pipewire__module_init(struct pw_module *module, const char *args)
|
||||||
{
|
{
|
||||||
pw_protocol_native_server_init();
|
|
||||||
|
|
||||||
pw_protocol_native_new(module->core, NULL);
|
pw_protocol_native_new(module->core, NULL);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -978,16 +978,16 @@ const struct pw_interface pw_protocol_native_server_link_interface = {
|
||||||
PW_LINK_EVENT_NUM, &pw_protocol_native_server_link_events,
|
PW_LINK_EVENT_NUM, &pw_protocol_native_server_link_events,
|
||||||
};
|
};
|
||||||
|
|
||||||
void pw_protocol_native_server_init(void)
|
struct pw_protocol *pw_protocol_native_server_init(void)
|
||||||
{
|
{
|
||||||
static bool init = false;
|
static bool init = false;
|
||||||
struct pw_protocol *protocol;
|
struct pw_protocol *protocol;
|
||||||
|
|
||||||
if (init)
|
|
||||||
return;
|
|
||||||
|
|
||||||
protocol = pw_protocol_get(PW_TYPE_PROTOCOL__Native);
|
protocol = pw_protocol_get(PW_TYPE_PROTOCOL__Native);
|
||||||
|
|
||||||
|
if (init)
|
||||||
|
return protocol;
|
||||||
|
|
||||||
pw_protocol_add_interfaces(protocol,
|
pw_protocol_add_interfaces(protocol,
|
||||||
NULL,
|
NULL,
|
||||||
&pw_protocol_native_server_core_interface);
|
&pw_protocol_native_server_core_interface);
|
||||||
|
|
@ -1011,4 +1011,6 @@ void pw_protocol_native_server_init(void)
|
||||||
&pw_protocol_native_server_link_interface);
|
&pw_protocol_native_server_link_interface);
|
||||||
|
|
||||||
init = true;
|
init = true;
|
||||||
|
|
||||||
|
return protocol;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,4 +19,4 @@
|
||||||
|
|
||||||
#include "pipewire/client/pipewire.h"
|
#include "pipewire/client/pipewire.h"
|
||||||
|
|
||||||
void pw_protocol_native_server_init(void);
|
struct pw_protocol *pw_protocol_native_server_init(void);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue