Skip to content

Instantly share code, notes, and snippets.

@yannleretaille
Last active July 4, 2021 18:02
Show Gist options
  • Save yannleretaille/1a45e6d55f7ed3833f9426c2fea29f2d to your computer and use it in GitHub Desktop.
Save yannleretaille/1a45e6d55f7ed3833f9426c2fea29f2d to your computer and use it in GitHub Desktop.
pulseaudio-dlna 0.6.1 (Cygn fork)
# Maintainer: Daniel M. Capella <[email protected]>
# Contributor: ZaZam <zazaamm ät gmail döt com>
# Contributor: Yegorius <[email protected]>
pkgname=pulseaudio-dlna
pkgver=0.6.1
pkgrel=1
pkgdesc='Small DLNA server which brings DLNA/UPnP support to PulseAudio'
arch=('x86_64')
url=https://github.com/Cygn/pulseaudio-dlna/
license=('GPL3')
depends=('python-chardet' 'python-dbus' 'python-docopt' 'python-gobject'
'python-lxml' 'python-netifaces' 'python-notify2' 'python-psutil'
'python-pychromecast' 'python-pyroute2' 'python-requests'
'python-setproctitle' 'python-protobuf' 'python-setuptools'
'python-zeroconf' 'python-urllib3')
makedepends=('git' 'help2man')
optdepends=('faac: AAC transcoding support'
'ffmpeg: multiple formats support'
'flac: FLAC transcoding support'
'lame: MP3 transcoding support'
'opus-tools: OPUS transcoding support'
'sox: WAV transcoding support'
'vorbis-tools: OGG transcoding support')
source=('https://github.com/Cygn/pulseaudio-dlna/archive/0.6.1.tar.gz')
sha256sums=('497743700377389ae03ffae2d8fbf8c49ed8ec219d53fd8ca7f0aea0d464b15d')
prepare() {
cd "$pkgname-$pkgver"
sed -i '/dbus-python/d' setup.py
}
build() {
cd "$pkgname-$pkgver"
python setup.py build
}
package() {
cd "$pkgname-$pkgver"
make manpage
python setup.py build --build-lib=build/python \
install --root="$pkgdir" --optimize=1
}
# vim:set ts=2 sw=2 et:
@amo13
Copy link

amo13 commented Apr 7, 2021

/usr/bin/python /tmp/tmp87t8bc08.py
removing /tmp/tmp87t8bc08.py
running install_data
creating /home/amo/pulseaudio-dlna-cygn/pkg/pulseaudio-dlna/usr/share
creating /home/amo/pulseaudio-dlna-cygn/pkg/pulseaudio-dlna/usr/share/man
creating /home/amo/pulseaudio-dlna-cygn/pkg/pulseaudio-dlna/usr/share/man/man1
error: can't copy 'man/pulseaudio-dlna.1.gz': doesn't exist or not a regular file
==> ERROR: A failure occurred in package().
    Aborting...

@yannleretaille
Copy link
Author

@amo13: hmm, can you try it again with this updated version?

@amo13
Copy link

amo13 commented Apr 7, 2021

Sure, thanks for the fast reply!
But where are the .install and the .service file?

@yannleretaille
Copy link
Author

that's some stuff I use in my local copy, I removed them for now

@amo13
Copy link

amo13 commented Apr 7, 2021

still not really:

==> Starting package()...
virtualenv --system-site-packages -p python3 .
make: virtualenv: No such file or directory
make: *** [Makefile:29: bin/pip3] Error 127
==> ERROR: A failure occurred in package().

I don't use virtualenv and would prefer not to. What it is needed for?

@gruentee
Copy link

/usr/bin/python /tmp/tmp87t8bc08.py
removing /tmp/tmp87t8bc08.py
running install_data
creating /home/amo/pulseaudio-dlna-cygn/pkg/pulseaudio-dlna/usr/share
creating /home/amo/pulseaudio-dlna-cygn/pkg/pulseaudio-dlna/usr/share/man
creating /home/amo/pulseaudio-dlna-cygn/pkg/pulseaudio-dlna/usr/share/man/man1
error: can't copy 'man/pulseaudio-dlna.1.gz': doesn't exist or not a regular file
==> ERROR: A failure occurred in package().
    Aborting...

Had the same error when using the PKGBUILD posted on pulseaudio-dlna's AUR page.
I checked the release archive from the Github repo's releases page and indeed man/pulseaudio-dlna.1.gz doesn't exist in the archive although it exists in the source tree (at latest commit at least). I ended up just copying it into the archive and building and installing went just fine.

@gruentee
Copy link

still not really:

==> Starting package()...
virtualenv --system-site-packages -p python3 .
make: virtualenv: No such file or directory
make: *** [Makefile:29: bin/pip3] Error 127
==> ERROR: A failure occurred in package().

I don't use virtualenv and would prefer not to. What it is needed for?

virtualenv is a Python specific tool that is used to create per-project environments with symlinks or copies of the system's Python interpreter and it's own site-packages (library folders).
There is no harm in installing it.
It enables developers to install third-party packages without touching the system installation and on a per-project basis such that for example you only need user rights to install 3rd party libs and you can make sure packages/versions don't conflict with libs used by other packages installed in the system.

@amo13
Copy link

amo13 commented Jun 24, 2021

I get that. Still, if one creates a PKGBUILD, I'd consider it cleaner and more consistent with python packaging on archlinux to avoid virtual envs.
Anyway, thank you for your comments and hints on how to successfully build it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment