Solvedpulseaudio modules bt Building DEB package

I've managed to get a working DEB package by building the binary as described (cmake .. && make).
Since I really hope this will be merged to the original PulseAudio (and, consequently will end up in repositories sooner or later), I did not bother with fancy stuff and using CPack.

However, I wanted to share my script for re-building pulseaudio-module-bluetooth using binaries build from these sources and the original DEB shenanigans from (Ubuntu/Debian) repository.


# Builds pulseaudio-module-bluetooth DEB in current directory
# using binaries from CMake build
# Usage:
#   # do the cmake build, e.g.
#   git clone ... && mkdir build && cd build && cmake .. && make
#   # build a DEB from that binaries on Ubuntu (or maybe Debian)
#   cd ..
#   mkdir deb && cd deb
#   wget $THIS_SCRIPT_URL -O
#   ./
# This would generate a .deb file with -9git~<hash> in name, install it

OS_CODENAME=$(lsb_release -sc)
# agli huck
#REPO_VERSION=$(apt policy "${PKG_NAME}" | grep ubuntu | head -n 1 | awk '{print $1}')

[ ! -d "$BUILD_DIR" ] && BUILD_DIR="../build"
if [ ! -d "$BUILD_DIR" ]; then
  echo "## ERROR: specify build directory with binaries as first argument" >&2
  exit 1

rm -rf "$PKG_NAME"
rm -f *.deb

apt download "${PKG_NAME}/${OS_CODENAME}"

ORIG_PKG=$(find . -maxdepth 1 -name "${PKG_NAME}*.deb")

# extract original packages
mkdir "${PKG_NAME}"
dpkg-deb -x "${ORIG_PKG}" "${PKG_NAME}"
dpkg-deb -e "${ORIG_PKG}" "${PKG_NAME}/DEBIAN"

PLUGINS_DIR="$(find "$PKG_NAME" -type d -name 'pulse-*.*')/modules"

# copy new binaries
find "$BUILD_DIR" -maxdepth 1 -type f -name '*.so' -print -exec cp {} "${PLUGINS_DIR}" \;

# update version
GIT_HASH=$(git rev-parse --short HEAD)
TIMESTAMP=$(date '+%Y%m%d')
sed -e "s/^Version: \(.*\)$/Version: \1-9git+${TIMESTAMP}~${GIT_HASH}/" -i "${PKG_NAME}/DEBIAN/control"

# update md5sums
find "${PKG_NAME}" -type f ! -path "${PKG_NAME}/DEBIAN*" -exec md5sum {} + | sed -e "s|${PKG_NAME}/||g" > "${PKG_NAME}/DEBIAN/md5sums"

dpkg-deb -b "${PKG_NAME}" "${PKG_NAME}.deb"
dpkg-name "${PKG_NAME}.deb"
33 Answers

✔️Accepted Answer

PPA source here

# Ubuntu 18.04, 18.10
sudo add-apt-repository ppa:eh5/pulseaudio-a2dp
sudo apt-get update
sudo apt-get install libavcodec-dev libldac pulseaudio-module-bluetooth

Related Issues:

pulseaudio modules bt Building DEB package
PPA source here I've managed to get a wor...
pulseaudio modules bt PPA Ubuntu 19.10
So more Docker hacking and I have the emulated bluetooth device functioning which results in a worki...
react player Error parsing header X-XSS-Protection: 1; When playing youtube videos
It's a known bug in current Google Chrome and Chromium:
tenacity Transparency and trust
Hi I can understand your concerns; maybe explaining the background behind the decision AudioBakery w...
allegro5 Android build fails due to deprecated 'android' command
I have searched and found no replacement for the android update project command ...
mumble macOS Mojave: passing the null port to CGEventTapEnable() segfaults
This is because the accessibility access for Mumble gets disabled on upgrade Trying to run Mumble-1....
mpv Better scaletempo (on high speed x1.5-x3)
@TiGR @wiiaboo I've fine tuned the settings a bit and this is what I got I've been watching some tal...
AudioKit AKMicrophone fails to initialize
Sounds good For anyone else who may be experiencing this issue with this version (4.5.2) ...
eqMac Bug: Driver failed to activate with new version 0.3.2 (beta): still problems
As a workaround I quit eqMac executed this from the Terminal reopend eqMac and allowed it to reinsta...
mpv [Feature request?] Play multiple videos sides by sides
Awesome! “Probably slow” is no issue for me it’s 1000×800@5fps streams that I have ;) Thanks both of...
speech_recognition Install/compilation of PyAudio failed
Tried those apt commands ( I left our libportaudio2 as apt informed me it was already installed) $ s...
tenacity Detach from audacity's repository
I think we should detach Is your feature request related to a problem? Please describe This fork as ...
使用flv.js 播放flv时,出现跨域问题。 在srs_app_http_stream.cpp#485后添加w->header()->set(Access-Control-Allow-Origin ...
srs Disable -Werror for http parser.
You should change the source code: the file http_parser.c in 3rdparty/ change to ...
eqMac Beta eqMac2 v2.3 - possible fix for static/sync loss and Catalina install issue
@andrewmorner Had exact same problem Looks like more of the liscio ring buffer code needed to be cop...
sonic pi Mac OS 11.0.1 Big Sur (not loading)
Hi @duncangeere! I traced back the behaviour the week before last in my Big Sur test VM to a specifi...
mpv [Request] Hotkey to copy currently displayed subtitles text to clipboard
Linux: (needs xclip to be installed) add the following to ~/.config/mpv/input.conf Ctrl+c run /bin/b...
aeneas /usr/bin/ld: cannot find -lespeak
Thanks for the tip frish1 This installation solved my install failure Installing espeak wasn't enoug...
audioplayers E/MediaPlayerNative( 6767): error (1, -2147483648)
Currently having the same issue pub upgrade not working for me I am using AudioCache to play every 1...
qTox Choosing camera in settings causing qTox to crashing
Hey guys I was pointed to issues with your project in the MSDN forum thread linked above and I decid...
MPD io_uring throws and exception
Works fine after ulimit -l 65535 which sets the limit to 64 MiB (oh just saw your message) Yeah it's...
snapcast [Question] JSON RPC API
curl didn't work for me Hi I don't really understand how to remotely get or set the status or volume...
snapcast Snapclient with multiple audio hardware
@gerroon I am sorry that it does not work for you! Let me summarize what I did to make it work Maybe...
audioplayers update path_provider dependency version
A quirky and potentially hazardous fix until it is solved: Need to update the version of path_provid...
mpv DTS/AC3 passthrough via coax S/PDIF
I would like to add that you can force the output of the lavcac3enc filter to be passthrough to the ...
johnny five Browserify / Webpack support
I just ran into this issue At a high level the goal here would be to make requiring johnny-five in p...
GalaxyBudsClient Linux port?
The port is mostly finished Some stuff such as the tray bar integration is still missing but this sh...
atom Sometimes opening a file, Atom does not open in a new tab
This feature is called Pending Pane Items (formerly known as Preview Tabs) – this allows you to quic...
psutil psutil fails to install on python3.6 and Ubuntu16.04
I was just about to comment the same after I read the install file:
steam for linux symbol lookup error: /usr/lib/i386-linux-gnu/ undefined symbol: xcb_send_request_with_fds
Hello @milankragujevic this issue is already being tracked at #4816 Your system information Steam cl...
atom MacOS Mojave: The text in the editor is dimmed / hard to read.
Hey folks could you try running this command and then restart Atom: Hat tip to @alexanderyakusik in ...
node Error: Cannot find module 'internal/fs' when npm install on mac
If you run rm -rf /usr/local/lib/node_modules/npm and then re-install Node.js does it work? ...
node Missing stack traces from async functions after the first await
Thanks! And to put a point on the real problem Version: v7.7.3 Platform: Windows 7x64 The purpose of...
atom Add config option for MRU tabs
So a temporary fix for this issue is to insert this into the keymap correct? Prerequisites Can you r...
ddev In WSL2 ddev start fails at docker-credential-desktop.exe, "error listing credentials"
I had to set credsStore: in my ~/.docker/config.json .. it was previously set to credentials.exe ...
node Fatal error in ../deps/v8/src/, line 1051
i got it fixed Ran following commands Thanks node version 7.3.0 (even tried with 7.4.0 ...
dash to dock Dash to dock shows on lockscreen
Ok resolved the issue by removing default The dash to dock isnt disabled whe...
cncjs npm v5.0.3 installation integrity checksum failure
@pluggee @nomykk Have you tried npm install --update-binary --no-shrinkwrap? I had luck with that co...
node "ReferenceError: v8debug is not defined" when doing remote debug
bnoordhuis is right just add --expose_debug_as=v8debug to the Node parameters text field until JetBr...
atom "Multi Cursor on Click" seems to always be disabled in Atom 1.48.0
@HugoMcPhee posted and deleted a comment linking to #20804 which does indeed seem to offer a fix for...
nodegit Can't install via NPM
Latest Xcode just straight up broke things all across the world Try running sudo xcode-select --inst...
steam for linux Steam fails to start on new account because of outdated libxcb
LD_PRELOAD='/usr/$LIB/ /usr/$LIB/ /usr/$LIB/ /usr/$LIB/libgpg-...
termux packages npm install: Unhandled rejection Error: EACCES: permission denied
Give ownership to npm like this: uname -a: Linux localhost 3.18.14-11422779 #1 SMP PREEMPT Thu Jun 1...
electron builder Can not build the windows installer on macOS Catalina version 10.15
electron-builder 22.2.0 now includes a targeted workaround extracting the NSIS uninstaller without t...
node HTTP/HTTPS client requests throwing EPROTO
It sounds like you are trying to use port 80 for https? Reproduced via: My code is littered with bot...
electron builder Built application displays nothing but a white screen
If any of you guys use React Router one of the thing that might break your Electron build is Browser...
alacritty Tmux austostart?
It should be like this: Which operating system does the issue occur on? MacOS Catalina I understood ...
node Debugging v8.5 - always pauses in async_hooks.js on promise rejection
This also reproes in Node 8.6 Is anyone looking into this? Seems to be affecting quite a few people ...
atom Uncaught Error: Setting active pane that is not present in pane container
Alright so as an update [Enter steps to reproduce:] @ungb's repro steps from below: Open Atom with a...
atom Font Rendering issue with freetype 2.8.1
Workaround: Prerequisites [X ] Put an X between the brackets on this line Description The fonts are ...