roc-streaming / roc-toolkit

Real-time audio streaming over the network.
https://roc-streaming.org
Mozilla Public License 2.0
1.06k stars 213 forks source link

Install does not respect DESTDIR #502

Closed dvzrv closed 1 year ago

dvzrv commented 1 year ago

When trying to install the built files (building from 0.2.1), even when providing DESTDIR using

  local scons_options=(
    --prefix=/usr
    --disable-openfec
    --enable-tests
    --enable-examples
  )
scons DESTDIR="$pkgdir/" "${scons_options[@]}" install

I get:

scons: Reading SConscript files ...
Searching CXX executable... (cached) /usr/bin/g++
Searching CXX executable... (cached) /usr/bin/g++
Searching CC executable... (cached) /usr/bin/gcc
Searching CXXLD executable... (cached) /usr/bin/g++
Searching CCLD executable... (cached) /usr/bin/gcc
Searching LD executable... (cached) /usr/bin/ld
Searching AR executable... (cached) /usr/bin/ar
Searching RANLIB executable... (cached) /usr/bin/ranlib
Searching STRIP executable... (cached) /usr/bin/strip
Searching OBJCOPY executable... (cached) /usr/bin/objcopy
Searching for system library directory... (cached) /usr/lib64
Searching PKG_CONFIG... (cached) pkg-config
Searching PKG_CONFIG_PATH...(cached) /usr/lib/pkgconfig
Searching pkg-config package libuv...(cached) not found
Checking for C library uv... (cached) yes
Searching pkg-config package libunwind...(cached) not found
Checking for C library unwind... (cached) yes
Searching pkg-config package speexdsp...(cached) not found
Checking for C library speexdsp... (cached) yes
Searching pkg-config package libpulse...(cached) not found
Checking for C library pulse... (cached) yes
Searching pkg-config package libpulse-simple...(cached) not found
Checking for C library pulse-simple... (cached) yes
Searching pkg-config package sox...(cached) not found
Checking for C library sox... (cached) yes
Checking for executable ragel... (cached) /usr/bin/ragel
Checking for executable gengetopt... (cached) /usr/bin/gengetopt
Searching pkg-config package cpputest...(cached) not found
Checking for CXX library CppUTest... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
install(/usr/share/man/man1/roc-conv.1)
scons: *** [install] /usr/share/man/man1/roc-conv.1: Permission denied
scons: building terminated because of errors.

Having to provide the options again is also suboptimal and likely leads to rebuilding of the targets (see #407).

gavv commented 1 year ago

DESTDIR is not supported, but I agree that it is an expected feature. I'll look into it.

Having to provide the options again is also suboptimal and likely leads to rebuilding of the targets (see https://github.com/roc-streaming/roc-toolkit/issues/407).

Yep, known issue. See https://github.com/roc-streaming/roc-toolkit/issues/316

dvzrv commented 1 year ago

DESTDIR is not supported, but I agree that it is an expected feature.

Um... how are people supposed to package this project then? If it is not supported I can not package it.

gavv commented 1 year ago

Fixed in a5a296336b1767462fc693316945be877724a21d

gavv commented 1 year ago

Um... how are people supposed to package this project then?

Actually you can just use --prefix. It's not used in any way except as the destination directory. However I agree that supporting DESTDIR is a good idea.

gavv commented 1 year ago

Tagged v0.2.2 with this fix.