Package Details: gerbera-git 2:1.9.2.r281.g6ed650c4-1

Git Clone URL: (read-only, click to copy)
Package Base: gerbera-git
Description: UPnP Media Server (Based on MediaTomb)
Upstream URL:
Licenses: GPL2
Conflicts: gerbera
Provides: gerbera
Submitter: bhedrich
Maintainer: Rogach
Last Packager: Rogach
Votes: 1
Popularity: 0.000000
First Submitted: 2017-08-05 18:25 (UTC)
Last Updated: 2021-12-25 17:26 (UTC)

Latest Comments

Rogach commented on 2021-12-25 17:27 (UTC)

@FabioLolix That you for your suggestions!

I added the simpler pkgver function, and switched the cmake release type (don't see any adverse effects so far).

Can you clarify about "adding ${pkgver} to provide is not needed"? I have provides=(gerbera) here, but that seems to be explicitly suggested in VCS package guidelines.

FabioLolix commented on 2021-12-22 12:35 (UTC)


  • A standard pkgver like git describe --long --tags | sed 's/^v//;s/([^-]*-g)/r\1/;s/-/./g' is enough, see
  • about cmake release type, None is suggested by the wiki (if available)
  • adding ${pkgver} to provide is not needed
  • Just FYI when you added epoch, epoch=1 was enough

Rogach commented on 2021-11-06 16:36 (UTC)

@dreieck Thank you for your suggestions! Updated the PKGBUILD with these fixes.

Does it really need to depend on libupnp-git, i.e. explicitly the -git variant?

It was the case previously (libupnp in the repos was much older) - but seems that now it builds fine with stock libupnp.

dreieck commented on 2021-11-03 13:22 (UTC) (edited on 2021-11-03 15:19 (UTC) by dreieck)

Some comments on your PKGBUILD (thanks for the maintanence work, btw.!):

  • Does it really need to depend on libupnp-git, i.e. explicitly the -git variant? Is libupnp not sufficient? (libupnp-git should provide libupnp, if not, write a comment that the provides-entry should be added.)
  • You could add -DCMAKE_BUILD_TYPE=Release.
  • There is some "official" package version available: git describe --tags reveals currently v1.9.2-123-g2d03e26c. So, please use the part currently reading 1.9.2-123 as first part in $pkgver. pkgver() then could look like:
  pkgver () {
    cd "${pkgname}"
    _ver="$(git describe  --tags | sed 's|^v||' | sed 's|-[^-]*$||' | tr '-' '.')"
    _rev="$(git rev-list --count HEAD)"
    _date="$(git log -1 --date=format:"%Y%m%d" --format="%ad")"
    _hash="$(git rev-parse --short HEAD)"

    if [ -z "${_ver}" ]; then
      error "Version could not be determined."
      return 1
      printf '%s' "${_ver}+r${_rev}.${_date}.${_hash}"

which currently yields - Then you also can add =${pkgver} to the provides-entry. - Don't forget to increment $epoch when changing package versioning scheme.

You could see my package gerbera-nosystemd-git for references.

kyak commented on 2020-05-06 16:49 (UTC)

Awesome, thanks!

Rogach commented on 2020-05-06 14:19 (UTC)

@kyak Done.

kyak commented on 2020-05-06 05:39 (UTC)

Can you please enable AVCODEC (File metadata) and FFMPEGTHUMNAILER (Generate video thumbnails) by adding these options to cmake:


And adding these packages to depends: 'ffmpeg' 'ffmpegthumbnailer'

kyak commented on 2020-03-15 09:08 (UTC)

And you should more than definitely switch to the official gerbera/gerbera.git.

Whyman is one of developers, and his branch can easily fall behind the master.

Just like at the time of this writing, his branch is three commits behind the master.

kyak commented on 2020-03-15 06:36 (UTC) (edited on 2020-03-15 06:37 (UTC) by kyak)

Also, if you want to use libupnp18 instead of libupnp, you need the following (similar to gerbera package):

sed -i 's/${PC_UPNP_LIBRARIES}//g' cmake/FindLibUpnp.cmake

kyak commented on 2020-03-14 09:36 (UTC)

The git version is missing the following deps: fmt, spdlog, pugixml,

Rogach commented on 2020-03-06 12:31 (UTC)

It looks like it is a whyman's personal fork, that he uses for his branches - he is active in the main repo as well.

maderios commented on 2020-03-06 12:22 (UTC)

Good question. It redirects to '', it's seen as Whyman fork but Whyman is Gerbera dev. Confusing...

Rogach commented on 2020-03-06 11:36 (UTC)

@bhedrich Why this PKGBUILD uses whyman/gerbera instead of gerbera/gerbera repository?

Rogach commented on 2020-03-03 18:46 (UTC) (edited on 2020-03-06 10:57 (UTC) by Rogach)

@maderios When I was talking about "necessary packages" I meant fmt, spdlog and pugixml - these are not listed in PKGBUILD and thus are not automatically installed.

Do you have these packages - could you please check with pacman -Qi spdlog?

maderios commented on 2020-03-03 17:52 (UTC)

I have not "the necessary packages" to build, i just do 'makepkg -sicC' in main directory package to build. As you see in PKGBUILD, Gerbera needs libupnp18. All dependencies are automatically downloaded and installed. Nothing to do, all is very simple because makepkg does the job.

Rogach commented on 2020-03-02 21:12 (UTC)

@maderios Yes, I am most definitely using Arch system.

I suspect you did not have problems because you already had the necessary packages installed. You can try the following to reproduce the problems I had:

sudo pacman -R fmt spdlog pugixml
sudo pacman -S libupnp
sudo pacman -R libupnp18
cd gerbera-git/
makepkg -s

After these steps I get the following error:

-- Found UPnP: /usr/lib/ (found version "1.6.25") 
CMake Error at CMakeLists.txt:301 (message):
  gerbera requires libupnp 1.8.6 or above.

1.6.25 is the version from extra/libupnp, it seems to interfere with building, so I removed it:

sudo pacman -R libupnp

After that the correct version of libupnp is found, but I see the next error:

CMake Error at CMakeLists.txt:322 (find_package):
  By not providing "Findfmt.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "fmt", but
  CMake did not find one.

  Could not find a package configuration file provided by "fmt" with any of
  the following names:


  Add the installation prefix of "fmt" to CMAKE_PREFIX_PATH or set "fmt_DIR"
  to a directory containing one of the above files.  If "fmt" provides a
  separate development package or SDK, be sure it has been installed.

So I install the fmt package. The same story happens for spdlog and pugixml packages.

After that I come upon:

/usr/bin/ld: cannot find -lupnp
/usr/bin/ld: cannot find -lixml
collect2: error: ld returned 1 exit status

I'm not sure what is the most correct way to resolve this, but symlinking the libraries did work:

sudo ln -s /usr/lib/libupnp-1.8/ /usr/lib/
sudo ln -s /usr/lib/libupnp-1.8/ /usr/lib/

maderios commented on 2020-03-02 20:21 (UTC)

@Rogach Today I built and install Gerbera without any problem. Your difficulties seem strange. Are you really using Arch system?

Rogach commented on 2020-03-02 18:25 (UTC)

I had some problems with building, the following steps helped me:

  1. Had to install fmt, pugixml, spdlog packages - they were not listed in the dependencies.

  2. Had to manually remove libupnp package - it looks like for some reason I had both libupnp and libupnp18 installed at the same time, and CMake was choosing the older version.

  3. Had to manually symlink libupnp and libixml to get CMake and ld to find them:

sudo ln -s /usr/lib/libupnp-1.8/ /usr/lib/
sudo ln -s /usr/lib/libupnp-1.8/ /usr/lib/

sdf commented on 2020-02-26 13:59 (UTC)

compile error CMake Error at CMakeLists.txt:301 (message): gerbera requires libupnp 1.8.6 or above. gerbera 1.4.0 compiles succesfully without error libupnp 1.8.x is in package libupnp18 (installed)

bhedrich commented on 2020-01-05 10:55 (UTC)

@Sasasu: Thanks, fixed.

Sasasu commented on 2018-02-03 15:28 (UTC) (edited on 2018-02-03 15:34 (UTC) by Sasasu)

pupnp has renamed to libupnp.

:( how about replacing pupnp with libupnp-git, extra/libupnp is 1.6.24 but gerbera needs 1.8.3.