Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Merge branch 'jb49681' into 'master'
Browse files Browse the repository at this point in the history
Jb49681

See merge request mer-core/bluez!12
  • Loading branch information
lbt committed May 28, 2020
2 parents bf3a8f9 + ebc2601 commit 38f8ab1
Showing 1 changed file with 17 additions and 54 deletions.
71 changes: 17 additions & 54 deletions rpm/bluez.spec
@@ -1,18 +1,10 @@
#
# Do NOT Edit the Auto-generated Part!
# Generated by: spectacle version 0.25
#

Name: bluez

# >> macros
%define _system_groupadd() getent group %{1} >/dev/null || groupadd -g 1002 %{1}
# << macros

Summary: Bluetooth utilities
Version: 4.101
Release: 1
Group: Applications/System
License: GPLv2+
URL: http://www.bluez.org/
Source0: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.gz
Expand Down Expand Up @@ -56,7 +48,6 @@ The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.

%package libs
Summary: Libraries for use in Bluetooth applications
Group: System/Libraries
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig

Expand All @@ -65,17 +56,15 @@ Libraries for use in Bluetooth applications.

%package libs-devel
Summary: Development libraries for Bluetooth applications
Group: Development/Libraries
Requires: bluez-libs = %{version}

%description libs-devel
bluez-libs-devel contains development libraries and headers for
use in Bluetooth applications.
This package contains development libraries and headers for use in
Bluetooth applications.


%package cups
Summary: CUPS printer backend for Bluetooth printers
Group: System/Daemons
Requires: %{name} = %{version}-%{release}
Requires: bluez-libs = %{version}
Requires: cups
Expand All @@ -85,7 +74,6 @@ This package contains the CUPS backend

%package alsa
Summary: ALSA support for Bluetooth audio devices
Group: System/Daemons
Requires: %{name} = %{version}-%{release}
Requires: bluez-libs = %{version}

Expand All @@ -94,7 +82,6 @@ This package contains ALSA support for Bluetooth audio devices

%package test
Summary: Test Programs for BlueZ
Group: Development/Tools
Requires: %{name} = %{version}-%{release}
Requires: bluez-libs = %{version}
Requires: dbus-python
Expand All @@ -105,15 +92,13 @@ Scripts for testing BlueZ and its functionality

%package doc
Summary: Documentation for bluez
Group: Documentation
Requires: %{name} = %{version}-%{release}

%description doc
This package provides man page documentation for bluez

%package configs-mer
Summary: Default configuration for bluez
Group: Applications/System
Requires: %{name} = %{version}-%{release}
Provides: bluez-configs

Expand All @@ -122,7 +107,6 @@ This package provides default configs for bluez

%package tracing
Summary: Configuration for bluez to enable tracing
Group: Development/Tools
Requires: %{name} = %{version}-%{release}

%description tracing
Expand All @@ -132,8 +116,6 @@ Will enable tracing for BlueZ
%setup -q -n %{name}-%{version}/%{name}

%build
# >> build pre
# << build pre

./bootstrap
%reconfigure --disable-static \
Expand All @@ -151,7 +133,7 @@ Will enable tracing for BlueZ
--enable-test \
--enable-hal=no \
--with-telephony=ofono \
--with-systemdunitdir=/lib/systemd/system \
--with-systemdunitdir=%{_unitdir} \
--enable-jolla-dbus-access \
--enable-gatt \
--enable-jolla-did \
Expand All @@ -161,25 +143,21 @@ Will enable tracing for BlueZ

make %{?jobs:-j%jobs}

# >> build post
# << build post

%install
rm -rf %{buildroot}
# >> install pre
# << install pre
%make_install

# >> install post
mkdir -p $RPM_BUILD_ROOT/%{_lib}/systemd/system/network.target.wants
ln -s ../bluetooth.service $RPM_BUILD_ROOT/%{_lib}/systemd/system/network.target.wants/bluetooth.service
(cd $RPM_BUILD_ROOT/%{_lib}/systemd/system && ln -s bluetooth.service dbus-org.bluez.service)
mkdir -p ${RPM_BUILD_ROOT}%{_unitdir}/network.target.wants
ln -s ../bluetooth.service ${RPM_BUILD_ROOT}%{_unitdir}/network.target.wants/bluetooth.service
(cd ${RPM_BUILD_ROOT}%{_unitdir} && ln -s bluetooth.service dbus-org.bluez.service)

# Remove the cups backend from libdir, and install it in /usr/lib whatever the install
%define cups_backend_dir /usr/lib/cups/backend
rm -rf ${RPM_BUILD_ROOT}%{_libdir}/cups
install -D -m 0755 cups/bluetooth ${RPM_BUILD_ROOT}/usr/lib/cups/backend/bluetooth
install -D -m 0755 cups/bluetooth ${RPM_BUILD_ROOT}%{cups_backend_dir}/bluetooth

install -d -m 0755 $RPM_BUILD_ROOT/%{_localstatedir}/lib/bluetooth
install -d -m 0755 ${RPM_BUILD_ROOT}%{_localstatedir}/lib/bluetooth

# Install configuration files
for CONFFILE in audio input network serial ; do
Expand All @@ -189,8 +167,8 @@ done
mkdir -p %{buildroot}%{_sysconfdir}/tracing/bluez/
cp -a %{SOURCE1} %{buildroot}%{_sysconfdir}/tracing/bluez/

# << install post

# there is no macro for /lib/udev afaict
%define udevlibdir /lib/udev

%pre
%_system_groupadd bluetooth
Expand All @@ -214,7 +192,6 @@ systemctl daemon-reload ||:

%files
%defattr(-,root,root,-)
# >> files
%{_bindir}/ciptool
%{_bindir}/dfutool
%{_bindir}/dund
Expand All @@ -229,45 +206,36 @@ systemctl daemon-reload ||:
%{_sbindir}/*
%config %{_sysconfdir}/dbus-1/system.d/bluetooth.conf
%{_localstatedir}/lib/bluetooth
/%{_lib}/udev/*
%{_udevrulesdir}/*
%{udevlibdir}/hid2hci
%{_datadir}/dbus-1/system-services/org.bluez.service
/%{_lib}/systemd/system/bluetooth.service
/%{_lib}/systemd/system/network.target.wants/bluetooth.service
/%{_lib}/systemd/system/dbus-org.bluez.service
# << files
%{_unitdir}/bluetooth.service
%{_unitdir}/network.target.wants/bluetooth.service
%{_unitdir}/dbus-org.bluez.service

%files libs
%defattr(-,root,root,-)
# >> files libs
%{_libdir}/libbluetooth.so.*
%doc AUTHORS COPYING INSTALL README
# << files libs

%files libs-devel
%defattr(-,root,root,-)
# >> files libs-devel
%{_libdir}/libbluetooth.so
%dir %{_includedir}/bluetooth
%{_includedir}/bluetooth/*
%{_libdir}/pkgconfig/bluez.pc
# << files libs-devel

%files cups
%defattr(-,root,root,-)
# >> files cups
%{_libdir}/cups/backend/bluetooth
# << files cups
%{cups_backend_dir}/bluetooth

%files alsa
%defattr(-,root,root,-)
# >> files alsa
%{_libdir}/alsa-lib/*.so
%{_datadir}/alsa/bluetooth.conf
# << files alsa

%files test
%defattr(-,root,root,-)
# >> files test
%{_libdir}/%{name}/test/*
%{_bindir}/hstest
%{_bindir}/gaptest
Expand All @@ -284,20 +252,15 @@ systemctl daemon-reload ||:
%{_bindir}/rctest
%{_bindir}/ipctest
%{_bindir}/uuidtest
# << files test

%files doc
%defattr(-,root,root,-)
# >> files doc
%doc %{_mandir}/man1/*
%doc %{_mandir}/man8/*
# << files doc

%files configs-mer
%defattr(-,root,root,-)
# >> files configs-mer
%config %{_sysconfdir}/bluetooth/*
# << files configs-mer

%files tracing
%defattr(-,root,root,-)
Expand Down

0 comments on commit 38f8ab1

Please sign in to comment.