You are not logged in.
Hi,
I want to create a package for this software https://radiance-online.org/ they provide already some pre-compiled installers https://radiance-online.org/download-in … nformation which can be downloaded from their github portal https://github.com/LBNL-ETA/Radiance/releases. Among them there is a linux based one, from which I tried to create a package(to be honest though I am not sure whether I could use it since my guess is that most likely their binaries and libs have been compiled it in a different Linux distribution and system libs).
I went through the wiki and other PKGBUILDs and created the following PKGBUILD:
# Maintainer: Your Name <youremail@domain.com>
pkgname=radiance
_pkgname=Radiance
pkgver=5.3a.914d7c40
pkgrel=1
pkgdesc="A Validated Lighting Simulation Tool"
arch=('x86_64')
url="https://radiance-online.org/"
license=('OSS')
makedepends=('unzip')
optdepends=()
provides=('ies2rad' 'obj2mesh' 'rpict' 'rvu' 'ranimate' 'rad' 'trad' 'ximage' 'falsecolor' 'pcond')
source=("https://github.com/LBNL-ETA/Radiance/releases/download/${pkgver}/${_pkgname}_${pkgver}_Linux.zip")
md5sums=('ab9ad373e5ccf92fe38a8bd5c11b2eb8')
sha256sums=('bd67188b992d9ea02abf195a091829b93fd3fab97654535fb159453ea85a71ae')
prepare(){
cd ${srcdir}
tar xf "radiance-5.3.914d7c401d-Linux.tar.gz"
}
package() {
cp -R "${srcdir}/radiance-5.3.914d7c401d-Linux/usr/local/radiance/" "${pkgdir}/usr"
}
This correctly creates my package but I am unsure if I can use it safely since if I check inside the /bin folder together with the binaries there are some lib .so files which might causing issues (I've tried to install it actually and then my dolphin was started complaining and my menus buttons started showing a bit strange, which I believe is due to the Qt libs that are included). Thus, can someone help me here and tell me whether what I am doing is wrong or how I can more safely create my package (maybe in /opt?).
I was also thinking to create a PKGBUILD where I compile the source from scratch but it seems to be a bit complicated what they do. For example if you check on the README file of the source https://github.com/LBNL-ETA/Radiance/tree/master you will see that they provide this makeall script which asks you questions as proceed with the installation which I am not sure how to deal with in the PKGBUILD.
Offline
At the very least, there is already a package called radiance in the AUR (not the same AFAICT), so you need to pick another name. Also, because the source code is available you need append "-bin" to pkgname in the PKGBUILD (unless you compile it from source).
Edit: Other thing is get rid of empty arrays and the provides array (there no need to "provide" every executable in the package). You don't need to `cd` into `srcdir` in `prepare` (it is unquoted by the way).
Last edited by a821 (2020-08-11 14:29:23)
Offline
The source should build fine - it uses cmake. Just igngore the makeall script - it just gathers settings to pass to cmake which you can specify directly.
For the -bin package, though you list unzip as a makedepends but don't use it, and you use tar but don't list it as a makedepends. I suspect the best thing to do would be to drop the dependency and use bsdtar instead of tar (bsdtar is used internally by makepkg already).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
@a821 thanks for the feedback. Yes I know that there is a same name package in aur already but as you said for another application.
In any case, after applying your changes these should make the binary package from the pre-compiled provided binaries/libs (updated after @Trilby's comment):
# Maintainer: Your Name <youremail@domain.com>
pkgname=radiance-renderer-bin
_pkgname=Radiance
pkgver=5.3a.914d7c40
pkgrel=1
pkgdesc="A Validated Lighting Simulation Tool"
arch=('x86_64')
url="https://radiance-online.org/"
license=('OSS')
provides=('ies2rad' 'obj2mesh' 'rpict' 'rvu' 'ranimate' 'rad' 'trad' 'ximage' 'falsecolor' 'pcond')
source=("https://github.com/LBNL-ETA/Radiance/releases/download/${pkgver}/${_pkgname}_${pkgver}_Linux.zip")
md5sums=('ab9ad373e5ccf92fe38a8bd5c11b2eb8')
sha256sums=('bd67188b992d9ea02abf195a091829b93fd3fab97654535fb159453ea85a71ae')
prepare(){
bsdtar xf "radiance-5.3.914d7c401d-Linux.tar.gz"
}
package() {
cp -R "${srcdir}/radiance-5.3.914d7c401d-Linux/usr/local/radiance/" "${pkgdir}/usr"
}
However, a) can I use these pre-compiled binaries/libs? and b) if I want to compile from scratch how to do it considering the script that they use.
Last edited by theodore (2020-08-11 14:48:06)
Offline
a) can I use these pre-compiled binaries/libs?
You can. I'd advise against it. If the source code is available, and if it isn't a complete PITA for users to compile it (not if it's a PITA for you to write the PKGBUILD) then you should just have the PKGBUILD build from source. The only two good reasons for a -bin package that I know of is if there is no source code available (in which case it doesn't even need the -bin suffix) or if it is highly impractical to build on common hardware (e.g., would take several hours to complete a build).
b) if I want to compile from scratch how to do it considering the script that they use.
Like I said, it uses cmake. Check the example PKGBUILDs using cmake. I suspect you can completely ignore that script of theirs. If not *completely*, at most you might have to read the script to identify the best flags or environment variables to pass to cmake.
If it were me, I'd start with completely ignoring the script, and try a "vanilla" cmake approach. Only if that failed would I look into the script to see if specific settings might be needed.
Last edited by Trilby (2020-08-11 14:53:38)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I see, thanks a lot for the feedback. I will try to have a look regarding creating the PKGBUILD from the source code.
Offline
Ok, as I said the pre-compiled binaries once installed based on the previously shown PKGBUILD are causing problems to my system. They make the menus/buttons/etc in all my Qt based applications disappear, shown weird or raise an error when you launch them. My guess is that the problem comes from the libQtxxx.so lib files that are included in the bin folder. See below:
$ ls -l pkg/radiance-renderer-bin/usr/bin/
total 65920
-rwxr-xr-x 1 ttsesm ttsesm 129504 Aug 11 16:44 3ds2mgf
-rwxr-xr-x 1 ttsesm ttsesm 111496 Aug 11 16:44 bgraph
-rwxr-xr-x 1 ttsesm ttsesm 270152 Aug 11 16:44 bsdf2klems
-rwxr-xr-x 1 ttsesm ttsesm 282464 Aug 11 16:44 bsdf2ttree
-rwxr-xr-x 1 ttsesm ttsesm 3269 Aug 11 16:44 bsdfview
-rwxr-xr-x 1 ttsesm ttsesm 10216 Aug 11 16:44 cnt
-rwxr-xr-x 1 ttsesm ttsesm 1309 Aug 11 16:44 compamb
-rwxr-xr-x 1 ttsesm ttsesm 18776 Aug 11 16:44 cv
-rwxr-xr-x 1 ttsesm ttsesm 5220 Aug 11 16:44 dayfact
-rwxr-xr-x 1 ttsesm ttsesm 239656 Aug 11 16:44 dcglare
-rwxr-xr-x 1 ttsesm ttsesm 227368 Aug 11 16:44 dctimestep
-rwxr-xr-x 1 ttsesm ttsesm 78392 Aug 11 16:44 dgraph
-rwxr-xr-x 1 ttsesm ttsesm 47336 Aug 11 16:44 eplus_adduvf
-rwxr-xr-x 1 ttsesm ttsesm 10216 Aug 11 16:44 epw2wea
-rwxr-xr-x 1 ttsesm ttsesm 57592 Aug 11 16:44 ev
-rwxr-xr-x 1 ttsesm ttsesm 166360 Aug 11 16:44 evalglare
-rwxr-xr-x 1 ttsesm ttsesm 18686 Aug 11 16:44 falsecolor
-rwxr-xr-x 1 ttsesm ttsesm 1942 Aug 11 16:44 fieldcomb
-rwxr-xr-x 1 ttsesm ttsesm 73416 Aug 11 16:44 findglare
-rwxr-xr-x 1 ttsesm ttsesm 78360 Aug 11 16:44 gcomp
-rwxr-xr-x 1 ttsesm ttsesm 16743 Aug 11 16:44 genBSDF
-rwxr-xr-x 1 ttsesm ttsesm 1885 Aug 11 16:44 genambpos
-rwxr-xr-x 1 ttsesm ttsesm 18408 Aug 11 16:44 genblinds
-rwxr-xr-x 1 ttsesm ttsesm 18488 Aug 11 16:44 genbox
-rwxr-xr-x 1 ttsesm ttsesm 10408 Aug 11 16:44 genclock
-rwxr-xr-x 1 ttsesm ttsesm 45072 Aug 11 16:44 gendaylit
-rwxr-xr-x 1 ttsesm ttsesm 47184 Aug 11 16:44 gendaymtx
-rwxr-xr-x 1 ttsesm ttsesm 6775 Aug 11 16:44 genklemsamp
-rwxr-xr-x 1 ttsesm ttsesm 22560 Aug 11 16:44 genprism
-rwxr-xr-x 1 ttsesm ttsesm 73976 Aug 11 16:44 genrev
-rwxr-xr-x 1 ttsesm ttsesm 35064 Aug 11 16:44 genrhgrid
-rwxr-xr-x 1 ttsesm ttsesm 27144 Aug 11 16:44 gensky
-rwxr-xr-x 1 ttsesm ttsesm 5211 Aug 11 16:44 genskyvec
-rwxr-xr-x 1 ttsesm ttsesm 90648 Aug 11 16:44 gensurf
-rwxr-xr-x 1 ttsesm ttsesm 73976 Aug 11 16:44 genworm
-rwxr-xr-x 1 ttsesm ttsesm 114424 Aug 11 16:44 getbbox
-rwxr-xr-x 1 ttsesm ttsesm 22504 Aug 11 16:44 getinfo
-rwxr-xr-x 1 ttsesm ttsesm 5884 Aug 11 16:44 glare
-rwxr-xr-x 1 ttsesm ttsesm 52024 Aug 11 16:44 glarendx
-rwxr-xr-x 1 ttsesm ttsesm 13677 Aug 11 16:44 glaze
-rwxr-xr-x 1 ttsesm ttsesm 177344 Aug 11 16:44 glrad
-rwxr-xr-x 1 ttsesm ttsesm 10216 Aug 11 16:44 histo
-rwxr-xr-x 1 ttsesm ttsesm 61688 Aug 11 16:44 icalc
-rwxr-xr-x 1 ttsesm ttsesm 56120 Aug 11 16:44 ies2rad
-rwxr-xr-x 1 ttsesm ttsesm 120136 Aug 11 16:44 igraph
-rwxr-xr-x 1 ttsesm ttsesm 39576 Aug 11 16:44 lampcolor
lrwxrwxrwx 1 ttsesm ttsesm 20 Aug 11 16:44 libQt5Core.so.5 -> libQt5Core.so.5.12.8
-rwxr-xr-x 1 ttsesm ttsesm 5859944 Aug 11 16:44 libQt5Core.so.5.12.8
lrwxrwxrwx 1 ttsesm ttsesm 20 Aug 11 16:44 libQt5DBus.so.5 -> libQt5DBus.so.5.12.8
-rwxr-xr-x 1 ttsesm ttsesm 570928 Aug 11 16:44 libQt5DBus.so.5.12.8
lrwxrwxrwx 1 ttsesm ttsesm 19 Aug 11 16:44 libQt5Gui.so.5 -> libQt5Gui.so.5.12.8
-rwxr-xr-x 1 ttsesm ttsesm 6591920 Aug 11 16:44 libQt5Gui.so.5.12.8
lrwxrwxrwx 1 ttsesm ttsesm 23 Aug 11 16:44 libQt5Widgets.so.5 -> libQt5Widgets.so.5.12.8
-rwxr-xr-x 1 ttsesm ttsesm 6615016 Aug 11 16:44 libQt5Widgets.so.5.12.8
lrwxrwxrwx 1 ttsesm ttsesm 22 Aug 11 16:44 libQt5XcbQpa.so.5 -> libQt5XcbQpa.so.5.12.8
-rwxr-xr-x 1 ttsesm ttsesm 1707288 Aug 11 16:44 libQt5XcbQpa.so.5.12.8
lrwxrwxrwx 1 ttsesm ttsesm 18 Aug 11 16:44 libicudata.so.56 -> libicudata.so.56.1
-rwxr-xr-x 1 ttsesm ttsesm 25047704 Aug 11 16:44 libicudata.so.56.1
lrwxrwxrwx 1 ttsesm ttsesm 18 Aug 11 16:44 libicui18n.so.56 -> libicui18n.so.56.1
-rwxr-xr-x 1 ttsesm ttsesm 2718616 Aug 11 16:44 libicui18n.so.56.1
lrwxrwxrwx 1 ttsesm ttsesm 16 Aug 11 16:44 libicuuc.so.56 -> libicuuc.so.56.1
-rwxr-xr-x 1 ttsesm ttsesm 1792616 Aug 11 16:44 libicuuc.so.56.1
-rw-r--r-- 1 ttsesm ttsesm 78700 Aug 11 16:44 libmgf.a
-rw-r--r-- 1 ttsesm ttsesm 723814 Aug 11 16:44 libradiance.a
-rw-r--r-- 1 ttsesm ttsesm 32004 Aug 11 16:44 libraycalls.a
-rw-r--r-- 1 ttsesm ttsesm 895258 Aug 11 16:44 librtrad.a
-rwxr-xr-x 1 ttsesm ttsesm 30704 Aug 11 16:44 lookamb
-rwxr-xr-x 1 ttsesm ttsesm 5168 Aug 11 16:44 ltpict
-rwxr-xr-x 1 ttsesm ttsesm 3965 Aug 11 16:44 ltview
-rwxr-xr-x 1 ttsesm ttsesm 76472 Aug 11 16:44 macbethcal
-rwxr-xr-x 1 ttsesm ttsesm 39640 Aug 11 16:44 meta2bmp
-rwxr-xr-x 1 ttsesm ttsesm 27352 Aug 11 16:44 meta2tga
-rwxr-xr-x 1 ttsesm ttsesm 108472 Aug 11 16:44 mgf2inv
-rwxr-xr-x 1 ttsesm ttsesm 87960 Aug 11 16:44 mgf2meta
-rwxr-xr-x 1 ttsesm ttsesm 108408 Aug 11 16:44 mgf2rad
-rwxr-xr-x 1 ttsesm ttsesm 75352 Aug 11 16:44 mgfilt
-rwxr-xr-x 1 ttsesm ttsesm 698192 Aug 11 16:44 mkillum
-rwxr-xr-x 1 ttsesm ttsesm 704592 Aug 11 16:44 mkpmap
-rwxr-xr-x 1 ttsesm ttsesm 671856 Aug 11 16:44 mksource
-rwxr-xr-x 1 ttsesm ttsesm 10224 Aug 11 16:44 neaten
-rwxr-xr-x 1 ttsesm ttsesm 62520 Aug 11 16:44 nff2rad
-rwxr-xr-x 1 ttsesm ttsesm 4179 Aug 11 16:44 normpat
-rwxr-xr-x 1 ttsesm ttsesm 84608 Aug 11 16:44 normtiff
-rwxr-xr-x 1 ttsesm ttsesm 134904 Aug 11 16:44 obj2mesh
-rwxr-xr-x 1 ttsesm ttsesm 43072 Aug 11 16:44 obj2rad
-rwxr-xr-x 1 ttsesm ttsesm 1195 Aug 11 16:44 objline
-rwxr-xr-x 1 ttsesm ttsesm 3213 Aug 11 16:44 objpict
-rwxr-xr-x 1 ttsesm ttsesm 3523 Aug 11 16:44 objview
-rwxr-xr-x 1 ttsesm ttsesm 122680 Aug 11 16:44 oconv
-rwxr-xr-x 1 ttsesm ttsesm 2139 Aug 11 16:44 optics2rad
-rwxr-xr-x 1 ttsesm ttsesm 1786 Aug 11 16:44 pbilat
-rwxr-xr-x 1 ttsesm ttsesm 107288 Aug 11 16:44 pcomb
-rwxr-xr-x 1 ttsesm ttsesm 30760 Aug 11 16:44 pcompos
-rwxr-xr-x 1 ttsesm ttsesm 109560 Aug 11 16:44 pcond
-rwxr-xr-x 1 ttsesm ttsesm 59864 Aug 11 16:44 pcwarp
-rwxr-xr-x 1 ttsesm ttsesm 721 Aug 11 16:44 pdfblur
-rwxr-xr-x 1 ttsesm ttsesm 26968 Aug 11 16:44 pexpand
-rwxr-xr-x 1 ttsesm ttsesm 26616 Aug 11 16:44 pextrem
-rwxr-xr-x 1 ttsesm ttsesm 89016 Aug 11 16:44 pfilt
-rwxr-xr-x 1 ttsesm ttsesm 26680 Aug 11 16:44 pflip
-rwxr-xr-x 1 ttsesm ttsesm 685 Aug 11 16:44 pgblur
-rwxr-xr-x 1 ttsesm ttsesm 1466 Aug 11 16:44 phisto
-rwxr-xr-x 1 ttsesm ttsesm 84776 Aug 11 16:44 pinterp
-rwxr-xr-x 1 ttsesm ttsesm 177664 Aug 11 16:44 pkgBSDF
-rwxr-xr-x 1 ttsesm ttsesm 18712 Aug 11 16:44 plot4
-rwxr-xr-x 1 ttsesm ttsesm 22808 Aug 11 16:44 plotin
drwxr-xr-x 4 ttsesm ttsesm 4096 Aug 11 16:44 plugins
-rwxr-xr-x 1 ttsesm ttsesm 35240 Aug 11 16:44 pmapdump
-rwxr-xr-x 1 ttsesm ttsesm 718 Aug 11 16:44 pmblur
-rwxr-xr-x 1 ttsesm ttsesm 68408 Aug 11 16:44 pmblur2
-rwxr-xr-x 1 ttsesm ttsesm 1301 Aug 11 16:44 pmdblur
-rwxr-xr-x 1 ttsesm ttsesm 26696 Aug 11 16:44 protate
-rwxr-xr-x 1 ttsesm ttsesm 39128 Aug 11 16:44 psign
-rwxr-xr-x 1 ttsesm ttsesm 30712 Aug 11 16:44 psketch
-rwxr-xr-x 1 ttsesm ttsesm 26904 Aug 11 16:44 psmeta
-rwxr-xr-x 1 ttsesm ttsesm 26984 Aug 11 16:44 psort
-rwxr-xr-x 1 ttsesm ttsesm 84664 Aug 11 16:44 pvalue
-rw-r--r-- 1 ttsesm ttsesm 26 Aug 11 16:44 qt.conf
-rwxr-xr-x 1 ttsesm ttsesm 84456 Aug 11 16:44 ra_bmp
-rwxr-xr-x 1 ttsesm ttsesm 43208 Aug 11 16:44 ra_gif
-rwxr-xr-x 1 ttsesm ttsesm 22512 Aug 11 16:44 ra_hexbit
-rwxr-xr-x 1 ttsesm ttsesm 1709 Aug 11 16:44 ra_pfm
-rwxr-xr-x 1 ttsesm ttsesm 30704 Aug 11 16:44 ra_pict
-rwxr-xr-x 1 ttsesm ttsesm 34808 Aug 11 16:44 ra_ppm
-rwxr-xr-x 1 ttsesm ttsesm 35368 Aug 11 16:44 ra_ps
-rwxr-xr-x 1 ttsesm ttsesm 30704 Aug 11 16:44 ra_rgbe
-rwxr-xr-x 1 ttsesm ttsesm 30704 Aug 11 16:44 ra_t16
-rwxr-xr-x 1 ttsesm ttsesm 43032 Aug 11 16:44 ra_t8
-rwxr-xr-x 1 ttsesm ttsesm 64248 Aug 11 16:44 ra_tiff
-rwxr-xr-x 1 ttsesm ttsesm 47512 Aug 11 16:44 ra_xyze
-rwxr-xr-x 1 ttsesm ttsesm 82936 Aug 11 16:44 rad
-rwxr-xr-x 1 ttsesm ttsesm 51928 Aug 11 16:44 rad2mgf
-rwxr-xr-x 1 ttsesm ttsesm 80680 Aug 11 16:44 radcompare
-rwxr-xr-x 1 ttsesm ttsesm 452 Aug 11 16:44 raddepend
-rwxr-xr-x 1 ttsesm ttsesm 2630 Aug 11 16:44 ran2tiff
-rwxr-xr-x 1 ttsesm ttsesm 81240 Aug 11 16:44 ranimate
-rwxr-xr-x 1 ttsesm ttsesm 713680 Aug 11 16:44 ranimove
-rwxr-xr-x 1 ttsesm ttsesm 78104 Aug 11 16:44 rcalc
-rwxr-xr-x 1 ttsesm ttsesm 2883 Aug 11 16:44 rcode2bmp
-rwxr-xr-x 1 ttsesm ttsesm 59736 Aug 11 16:44 rcode_depth
-rwxr-xr-x 1 ttsesm ttsesm 30792 Aug 11 16:44 rcode_ident
-rwxr-xr-x 1 ttsesm ttsesm 38888 Aug 11 16:44 rcode_norm
-rwxr-xr-x 1 ttsesm ttsesm 26616 Aug 11 16:44 rcollate
-rwxr-xr-x 1 ttsesm ttsesm 692584 Aug 11 16:44 rcontrib
-rwxr-xr-x 1 ttsesm ttsesm 22504 Aug 11 16:44 replmarks
-rwxr-xr-x 1 ttsesm ttsesm 284472 Aug 11 16:44 rfluxmtx
-rwxr-xr-x 1 ttsesm ttsesm 84600 Aug 11 16:44 rhcopy
-rwxr-xr-x 1 ttsesm ttsesm 51480 Aug 11 16:44 rhinfo
-rwxr-xr-x 1 ttsesm ttsesm 132296 Aug 11 16:44 rholo
-rwxr-xr-x 1 ttsesm ttsesm 55576 Aug 11 16:44 rhoptimize
-rwxr-xr-x 1 ttsesm ttsesm 84920 Aug 11 16:44 rhpict
-rwxr-xr-x 1 ttsesm ttsesm 14312 Aug 11 16:44 rlam
-rwxr-xr-x 1 ttsesm ttsesm 284 Aug 11 16:44 rlux
-rwxr-xr-x 1 ttsesm ttsesm 243784 Aug 11 16:44 rmtxop
-rwxr-xr-x 1 ttsesm ttsesm 692624 Aug 11 16:44 rpict
-rwxr-xr-x 1 ttsesm ttsesm 61128 Aug 11 16:44 rpiece
-rwxr-xr-x 1 ttsesm ttsesm 676304 Aug 11 16:44 rsensor
-rwxr-xr-x 1 ttsesm ttsesm 26616 Aug 11 16:44 rsplit
-rwxr-xr-x 1 ttsesm ttsesm 6507 Aug 11 16:44 rtpict
-rwxr-xr-x 1 ttsesm ttsesm 692496 Aug 11 16:44 rtrace
-rwxr-xr-x 1 ttsesm ttsesm 35032 Aug 11 16:44 rttree_reduce
-rwxr-xr-x 1 ttsesm ttsesm 894392 Aug 11 16:44 rvu
-rwxr-xr-x 1 ttsesm ttsesm 14312 Aug 11 16:44 tabfunc
-rwxr-xr-x 1 ttsesm ttsesm 22560 Aug 11 16:44 tmesh2rad
-rwxr-xr-x 1 ttsesm ttsesm 14392 Aug 11 16:44 total
-rwxr-xr-x 1 ttsesm ttsesm 4816 Aug 11 16:44 trad
-rwxr-xr-x 1 ttsesm ttsesm 26600 Aug 11 16:44 ttyimage
-rwxr-xr-x 1 ttsesm ttsesm 720 Aug 11 16:44 vinfo
-rwxr-xr-x 1 ttsesm ttsesm 55896 Aug 11 16:44 vwrays
-rwxr-xr-x 1 ttsesm ttsesm 39480 Aug 11 16:44 vwright
-rwxr-xr-x 1 ttsesm ttsesm 187384 Aug 11 16:44 wrapBSDF
-rwxr-xr-x 1 ttsesm ttsesm 151176 Aug 11 16:44 x11.hdi
-rwxr-xr-x 1 ttsesm ttsesm 27512 Aug 11 16:44 x11meta
-rwxr-xr-x 1 ttsesm ttsesm 44600 Aug 11 16:44 xform
-rwxr-xr-x 1 ttsesm ttsesm 43576 Aug 11 16:44 xglaresrc
-rwxr-xr-x 1 ttsesm ttsesm 126184 Aug 11 16:44 ximage
-rwxr-xr-x 1 ttsesm ttsesm 47736 Aug 11 16:44 xshowtrace
-rwxr-xr-x 1 ttsesm ttsesm 1277 Aug 11 16:44 xyzimage
Any idea to solve this somehow?
In any case I've also started creating a PKGBUILD for compiling the source code instead as suggested, but I am having the following issue. I need to download the following tarball https://radiance-online.org/download-in … upp.tar.gz which contains some auxiliary files to be included. However, when the PKGBUILD tries to download the file I get the following error:
-> Downloading radR52supp.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
I've tried different solutions that I've found around like using http instead of https, applying the following command in the PKGBUILD with the -k parameter
DLAGENTS=("https::/usr/bin/curl -k -o %o %u") # Temp fix to ignore expired certificate
updating my certificates as per this guide (https://www.archlinux.org/news/ca-certificates-update/) but nothing worked. Any idea how to bypass this?
Here is the output if I run curl from command line:
$ curl -o /dev/null -v https://radiance-online.org/download-install/radiance-source-code/latest-release/radR52supp.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 128.3.50.152:443...
* Connected to radiance-online.org (128.3.50.152) port 443 (#0)
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: none
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [104 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [4838 bytes data]
* TLSv1.2 (OUT), TLS alert, unknown CA (560):
} [2 bytes data]
* SSL certificate problem: unable to get local issuer certificate
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* Closing connection 0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
Offline
Ugh, that's doubly ugly in the precompiled binary with libs in /usr/bin. Those libs are apparently overriding their pacman-installed counterparts.
Any idea to solve this somehow?
There are two general approaches. Building properly from source will avoid this problem and is by far the best approach. It will take a bit more work now on the front end (like solving the certificate problem in obtaining the source) but it is the "right" approach and will be better in the long run.
It building from source realy doesn't pan out, the other option would be to install the precompiled bundle under /opt/ rather than /usr, then put a short script/launcher in /usr/bin that may even be just one line like to following (for example):
#!/bin/sh
LD_LIBRARY_PATH=/opt/renderer /opt/renderer/BINARYNAME
As for the curl errors, I can replicate them here which suggests that it may be a problem in the source server. But I'm not well versed in SSL certs - someone else should be able to chime in with more details on that.
Last edited by Trilby (2020-08-12 12:38:32)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Yup, building the package from source seems more appropriate.
I need to figure though how to bypass these curl errors.
Offline
I can also reproduce the curl issue in two arch machines and in Ubuntu LTS, so it is likely a problem with the upstream server (maybe someone knows better). Adding the following DLAGENTS variable bypasses the curl error (at least for me)
# adapted from /etc/makepkg.conf
DLAGENTS=('https::/usr/bin/curl -k -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u')
Offline
I can also reproduce the curl issue in two arch machines and in Ubuntu LTS, so it is likely a problem with the upstream server (maybe someone knows better). Adding the following DLAGENTS variable bypasses the curl error (at least for me)
# adapted from /etc/makepkg.conf DLAGENTS=('https::/usr/bin/curl -k -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u')
Thanks a lot, this worked for me as well. I was fighting since yesterday to find the correct combination since just using -k was not working. It seems that the -gqb "" flag did the trick since I've tried the other combination without success.
Offline
It works from Firefox... this sounds like a familiar problem.
https://www.ssllabs.com/ssltest/analyze … online.org
This server's certificate chain is incomplete. Grade capped to B.
This is a common misconfiguration, which browsers go to extra lengths to e.g. cache previously seen intermediate certificates in order to work around.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
I've created the following pkgbuild for compiling from source code:
# Maintainer: Your Name <youremail@domain.com>
pkgname=radiance-renderer
pkgver=5.3a.914d7c40
pkgrel=1
pkgdesc="A Validated Lighting Simulation Tool"
arch=('x86_64')
url="https://radiance-online.org/"
license=('OSS')
depends=('qt5-base')
makedepends=('cmake')
provides=('ies2rad' 'obj2mesh' 'rpict' 'rvu' 'ranimate' 'rad' 'trad' 'ximage' 'falsecolor' 'pcond')
source=("https://github.com/LBNL-ETA/Radiance/archive/${pkgver}.tar.gz"
"https://radiance-online.org/download-install/radiance-source-code/latest-release/radR52supp.tar.gz")
sha512sums=('74b289d361ddb8923a2caad6097e1326902c1803abeb876031b53f42becf10f953536c72f16fe4f04fd25f5065391e15bf49d6b6aabeabff1f75c3e42b231689'
'57a07eea522858637ed0822a676c5140fc87df65945d9eb28dbe44cd6d6641ac47293ff08d93843c98c6c93618fe1359b2ccd13dffde4e40cc7ff4073e89ae8f')
DLAGENTS=('https::/usr/bin/curl -k -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u') # Temp fix to ignore expired certificate
_cmakeopts=(
'-D CMAKE_INSTALL_PREFIX=/usr'
'-D_FILE_OFFSET_BITS=64')
prepare() {
cd "$srcdir/Radiance-$pkgver"
mkdir -p build
}
build() {
cd "$srcdir/Radiance-$pkgver/build"
cmake "$_cmakeopts[@]" ../
make
}
package() {
cd "$srcdir/Radiance-$pkgver/build"
make DESTDIR="$pkgdir" install
# install license file
install -Dm644 "$srcdir/$_pkgbase-$pkgver/License.txt" \
"$pkgdir/usr/share/licenses/$pkgname/Licence.txt"
}
It seems to work fine except that it puts the corresponding /bin, /lib and /man folders under the path /usr/local/{bin,lib,man} instead of the /usr/{bin,lib,man}. How to change that?
Offline
I don't quite understand the point of the _cmakeopts stuff since those arguments only get used once and it's *harder* to read when divorced like that, but you're shooting yourself in the foot as "$_cmakeopts[@]" isn't valid bash for using an array.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
You're also missing dependencies including at least qt5-imageformats and glu. I'm also curious if both sources are really needed. It's not clear if the second one is used. You probably don't need a prepare function. Usually one just makes the build directory in the build function (the -p flag to mkdir will prevent it from failing if the directory already exists).
And as a mostly irrelevant aside: I don't think I've seen a 512 sum in a PKGBUILD before ... those are damn long!
EDIT: with the two new dependencies and the array fix, this built successfully, but failed in the package function ... I'm still investigating.
EDIT 2: also this is a very weird file structure. Using a prefix of /usr/ (which should be good) ends up dumping some 170 items in /usr/bin including some libraries while /usr/lib is fille with as many or more text files. It seems the project abuses a typical filesystem hierarchy for completely different purposes. This would suggest it really should still be installed to /opt/ (while also filing an upstream bug / feature).
Last edited by Trilby (2020-08-13 00:01:21)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
You probably don't need a prepare function. Usually one just makes the build directory in the build function (the -p flag to mkdir will prevent it from failing if the directory already exists).
CMake_package_guidelines#Template
build() {
cmake -B build -S Radiance-$pkgver "$_cmakeopts[@]"
make -C build
}
package() {
make -C build DESTDIR="$pkgdir" install
....
Offline
Thank you all for the feedback. Well most of the things that you are pointing out e.g. _cmakeopts, use of 512 sum, etc are taken from other PKGBUILDs that I was checking on in the aur. In any case your comments are making sense, so I have updated the pkgbuild as follows (I used the /opt solution as @Trilby suggested, since indeed their package structure is kind of messy. Question though, do I need to create a simlink for every binary from /opt/radiance-renderer/bin to /usr/bin?):
# Maintainer: Your Name <youremail@domain.com>
pkgname=radiance-renderer
pkgver=5.3a.914d7c40
pkgrel=1
pkgdesc="A Validated Lighting Simulation Tool"
arch=('x86_64')
url="https://radiance-online.org/"
license=('OSS')
depends=('qt5-base' 'qt5-imageformats' 'glu')
makedepends=('cmake')
provides=('ies2rad' 'obj2mesh' 'rpict' 'rvu' 'ranimate' 'rad' 'trad' 'ximage' 'falsecolor' 'pcond')
source=("https://github.com/LBNL-ETA/Radiance/archive/${pkgver}.tar.gz"
"https://radiance-online.org/download-install/radiance-source-code/latest-release/radR52supp.tar.gz")
md5sums=('08ab2b1db4ae9416dca2fcf066f0990b'
'78fd9d55c663436d6d63f53c3acb3a3c')
DLAGENTS=('https::/usr/bin/curl -k -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u') # Temp fix to ignore expired certificate
build() {
cmake -B build -S Radiance-$pkgver \
-D_FILE_OFFSET_BITS=64 \
-D_CMAKE_INSTALL_PREFIX="/opt/$pkgname"
make -C build
}
package() {
make -C build DESTDIR="$pkgdir/opt/$pkgname" install
# copy the auxiliary files
cp -R "${srcdir}/ray" "${pkgdir}/opt/$pkgname/lib"
# install license file
install -Dm644 "$srcdir/$_pkgbase-$pkgver/License.txt" \
"$pkgdir/usr/share/licenses/$pkgname/Licence.txt"
}
The two issues that I have is that no matter which install prefix I use it keeps having the stucture /usr/local/{bin,lib,man} and packaging fails as @Trilby pointed out with the following output:
-- fixup_bundle
-- app='/usr/local/bin/rvu'
-- libs='/home/ttsesm/Packages/radiance/pkg/radiance-renderer/opt/radiance-renderer/usr/local/bin/plugins/imageformats/libqgif.so;/home/ttsesm/Packages/radiance/pkg/radiance-renderer/opt/radiance-renderer/usr/local/bin/plugins/imageformats/libqico.so;/home/ttsesm/Packages/radiance/pkg/radiance-renderer/opt/radiance-renderer/usr/local/bin/plugins/imageformats/libqjpeg.so;/home/ttsesm/Packages/radiance/pkg/radiance-renderer/opt/radiance-renderer/usr/local/bin/plugins/imageformats/libqtiff.so;/home/ttsesm/Packages/radiance/pkg/radiance-renderer/opt/radiance-renderer/usr/local/bin/plugins/platforms/libqxcb.so'
-- dirs='/usr;/usr/lib'
-- ignoreItems=''
-- warning: *NOT* handled - directory/file does not exist...
CMake Error at /usr/share/cmake-3.18/Modules/BundleUtilities.cmake:988 (message):
error: fixup_bundle: not a valid bundle
Call Stack (most recent call first):
InstallRules/dependencies.cmake:14 (fixup_bundle)
InstallRules/cmake_install.cmake:46 (include)
cmake_install.cmake:57 (include)
-- fixup_bundle: done
make: *** [Makefile:159: install] Error 1
make: Leaving directory '/home/ttsesm/Packages/radiance/src/build'
==> ERROR: A failure occurred in package().
Aborting...
Last edited by theodore (2020-08-13 09:43:03)
Offline
CMake Warning:
Manually-specified variables were not used by the project:
_CMAKE_INSTALL_PREFIX
_FILE_OFFSET_BITS
Looks like they hardcoded the install prefix path.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
CMake Warning: Manually-specified variables were not used by the project: _CMAKE_INSTALL_PREFIX _FILE_OFFSET_BITS
Looks like they hardcoded the install prefix path.
You are right, I've overlooked the cmake output.
In their own script that they use for the installation though, it is possible to set it if you check below:
#!/bin/csh -f
# RCSid $Id: makeall,v 1.29 2018/05/30 14:14:55 greg Exp $
#
# Make all the Radiance programs
#
if ( $#argv < 1 ) then
echo "Usage: makeall install [clean] [make options]"
echo " or: makeall clean"
echo " or: makeall library"
exit 1
endif
if ( "$1" == library ) then
source installib
cp -f src/*/*.{cal,tab,hex,dat} $ldir
echo ""
echo "Set the environment variable RAYPATH=.:$ldir"
echo 'For C-shell users, put the following into ~/.cshrc'
echo " setenv RAYPATH .:$ldir"
echo 'For Bourne shell users, put the following into $HOME/.profile'
echo " RAYPATH=.:$ldir"
echo " export RAYPATH"
echo ""
exit 0
endif
set srcdirs=( common rt meta cv gen ot px hd util cal )
if ( "$1" == install ) then
cat << _EOF_
`cat src/rt/VERSION` INSTALLATION
This script rebuilds all of the Radiance programs and installs
them on your system. You should read the file README before running
this script. You can type ^C (followed by return) at any time to abort.
You must first answer the following questions.
_EOF_
if ( ! $?EDITOR ) then
echo -n "What is your preferred editor [vi]? "
set ans="$<"
if ( "$ans" != "" ) then
setenv EDITOR "$ans"
else
setenv EDITOR vi
endif
endif
again1:
echo -n "Where do you want the executables [/usr/local/bin]? "
set idir=$<
(echo $idir) >/dev/null
if ( $status ) then
goto again1
endif
set idir=$idir
if ( "$idir" == "" ) then
set idir=/usr/local/bin
else if ( "$idir" !~ /* ) then
echo "Directory must be relative to root, please reenter"
goto again1
endif
if ( ! -d $idir ) then
mkdir $idir
if ( $status ) then
echo "Cannot create directory, please reenter"
goto again1
endif
endif
set inpath=0
foreach i ( $path )
if ( "$i" == "$idir" ) then
set inpath=1
break
endif
end
set rmake=$idir/rmake
if ( "`ls -tL $rmake $0 |& head -1`" == $rmake ) then
goto gotrmake
endif
set newrmake
more License.txt
echo -n "Do you understand and accept the terms of this agreement [n]? "
set ans="$<"
if ( "$ans" !~ [yY]* ) exit
set special=
set arch=
set opt=
set mach=
set compat=
set extras=
set esuffix=
cat << _EOF_
Please select your system type from the following list:
1) Sun Solaris
2) Linux
3) MacOS X
4) FreeBSD
5) Cygwin
6) Other
_EOF_
echo -n "Choice? "
set arch="$<"
switch ("$arch")
case 1: # SPARC Station
set arch=sun
set mach="-I/usr/openwin/include -L/usr/openwin/lib -DNOSTEREO"
set opt="-O"
set compat="strcmp.o timegm.o"
breaksw
case 2: # Linux
set mach="-Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib -I/usr/include/X11 -DNOSTEREO"
set opt="-O2"
set arch=IBMPC
set compat="strlcpy.o"
set extras=CC=gcc
breaksw
case 3: # MacOS X
set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
set opt="-O2"
set arch=Intel
set extras="CC=cc CONFIGURE_ARCH=i386"
set special="ogl"
breaksw
case 4: # FreeBSD
set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib"
set opt="-O"
set compat="erf.o"
set extras='CC=cc MLIB="-lcompat -lm"'
set arch=IBMPC
breaksw
case 5: # Cygwin
set mach="-Dfreebsd -L/usr/lib -L/usr/X11R6/lib -I/usr/include/X11 -I/usr/X11R6/include -DNOSTEREO"
set opt="-O2"
set arch=IBMPC
set compat="erf.o strlcpy.o"
set extras="CC=gcc"
set special="ogl"
set esuffix=".exe"
breaksw
case 6: # Other
set opt="-O"
set compat="erf.o strcmp.o strlcpy.o"
echo -n "Are you using the GNU C compiler [n]? "
if ( "$<" =~ [yY]* ) then
set extras="CC=gcc"
else
set compat="$compat timegm.o"
endif
set arch=other
breaksw
default:
echo "Illegal choice\!"
echo "Installation aborted."
exit 1
breaksw
endsw
source installib
sed 's/[ ]*$//' > $rmake << _EOF_
#!/bin/sh
exec make "SPECIAL=$special" \
"OPT=$opt" \
"MACH=$mach" \
ARCH=$arch "COMPAT=$compat" \
INSTDIR=$idir \
LIBDIR=$ldir \
ESUFFIX=$esuffix \
$extras "\$@" -f Rmakefile
_EOF_
chmod 755 $rmake
chmod 644 src/*/Rmakefile src/rt/devtable.c
gotrmake:
echo "Current rmake command is:"
cat $rmake
echo -n "Do you want to change it? "
set ans="$<"
if ( "$ans" =~ [yY]* ) then
cp $rmake /tmp/rmake$$
$EDITOR $rmake
if ( `cat $rmake /tmp/rmake$$ | grep OPT= | uniq | wc -l` == 2 ) set newrmake
rm -f /tmp/rmake$$
endif
if ( ! -d src/lib ) then
mkdir src/lib
endif
if ( $?newrmake ) then
echo 'New rmake command -- running "makeall clean"...'
csh -f $0 clean
endif
cd src
echo "Making programs..."
set errs=0
foreach i ( $srcdirs )
pushd $i
echo "In directory $i..."
$rmake -k $*
@ errs += $status
popd
end
if ( $errs ) then
echo "There were some errors."
else
echo "Done."
endif
cd ..
if (! $inpath ) then
echo ""
echo "Add $idir to the beginning of your execution path:"
echo 'For C-shell users, put the following into ~/.cshrc'
echo " set path=( $idir "'$path )'
echo 'For Bourne shell users, put the following into $HOME/.profile'
echo " PATH=$idir"':$PATH'
echo " export PATH"
endif
else
cd src
foreach i ( $srcdirs )
pushd $i
echo "In directory $i..."
make -f Rmakefile $*
popd
end
cd ..
foreach i ( $* )
if ( "$i" == clean ) then
echo "Removing library archives..."
rm -f src/lib/*.{a,o,la}
endif
end
echo "Done."
endif
exit 0
Should I try and use the variables INSTDIR, LIBDIR, etc that they make use of instead?
Offline
In that script they don't seem to use cmake at all - it's a bit odd as they have the cmake input files in the repo. Looking at their script, you could replicate it's behavior without being interactive simply by making an executable script "rmake" that the script creates with a heredoc, then fill in the appropriate variables and loop through the src/* directories and run rmake. Although I'm still not sure it it'd use PREFIX / DESTIR appropriately.
FWIW, they also have scons input files, but I could not get a scons build to do anything. It looks like they have parts of many different build system in that repo, but none of them appear to be used properly.
Last edited by Trilby (2020-08-13 16:10:00)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Deleting https://github.com/LBNL-ETA/Radiance/bl … ake.in#L14 in prepare and changing $_pkgbase-$pkgver to Radiance-$pkgver in package, makepkg then completes.
Edit:
# Maintainer: Your Name <youremail@domain.com>
pkgname=radiance-renderer
pkgver=5.3a.914d7c40
pkgrel=1
pkgdesc="A Validated Lighting Simulation Tool"
arch=('x86_64')
url="https://radiance-online.org/"
license=('custom:OSS')
depends=('qt5-base' 'qt5-imageformats' 'glu')
makedepends=('cmake')
provides=('ies2rad' 'obj2mesh' 'rpict' 'rvu' 'ranimate' 'rad' 'trad' 'ximage' 'falsecolor' 'pcond')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/LBNL-ETA/Radiance/archive/${pkgver}.tar.gz"
"https://radiance-online.org/download-install/radiance-source-code/latest-release/radR52supp.tar.gz")
md5sums=('08ab2b1db4ae9416dca2fcf066f0990b'
'78fd9d55c663436d6d63f53c3acb3a3c')
DLAGENTS=('https::/usr/bin/curl -k -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u') # Temp fix to ignore expired certificate
prepare() {
sed -i '14 d' Radiance-$pkgver/InstallRules/dependencies.cmake.in
}
build() {
cmake -B build -S Radiance-$pkgver -DCMAKE_INSTALL_PREFIX=/opt/$pkgname
make -C build
}
package() {
make -C build DESTDIR="$pkgdir" install
# copy the auxiliary files
cp -R "${srcdir}/ray" "${pkgdir}/opt/$pkgname/lib"
rm -rf "${pkgdir}/opt/$pkgname/lib/ray/src"
# install license file
install -Dm644 Radiance-$pkgver/License.txt \
"$pkgdir/usr/share/licenses/$pkgname/Licence.txt"
}
Last edited by loqs (2020-08-13 16:45:04)
Offline
@loqs thanks a lot, it works now.
A few questions though
1. Is it safe that you removed this bundle fixup (honestly I do not really understand what they are doing in this line)
2. I've noticed that you remove the /src folder one you copy the auxiliary files in their equivalent script they do not seem to do that (they just untar the folder in the specific path)
#!/bin/csh -f
# RCSid $Id: installib,v 1.4 2016/01/05 18:42:23 greg Exp $
#
# Install library files
#
again2:
echo -n "Where do you want the library files [/usr/local/lib/ray]? "
set ldir=$<
(echo $ldir) >/dev/null
if ( $status ) goto again2
set ldir=$ldir
if ( "$ldir" == "" ) then
set ldir=/usr/local/lib/ray
else if ( "$ldir" !~ /* ) then
echo "Directory must be relative to root, please reenter"
goto again2
endif
if ( ! -d $ldir ) then
mkdir $ldir
if ( $status ) then
echo "Cannot create directory, please reenter"
goto again2
endif
endif
if (! -d lib) then
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo "You forgot to install the auxiliary files overlay."
echo "Download rad5R1supp.tar.gz from http://www.radiance-online.org"
echo "and run 'installib' later manually, or ^C now."
echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
exit
endif
set d1=(`ls -Lid lib`)
set d2=(`ls -Lid $ldir`)
if ($d1[1] != $d2[1]) then
echo -n "Install library files now [n]? "
if ( "$<" =~ [yY]* ) then
echo -n "Copying library files to $ldir... "
(cd lib ; tar -cf - *) | (cd $ldir ; tar -xf -)
echo "Done."
endif
endif
unset d1 d2
is there any other reason you do that except for what I guess "good practice" and
3. There are a bunch of binaries in the /opt/radiance-renderer/bin I know that linking them to /usr/bin is the "correct" method to follow but considering that there are quite a few, linking them one by one seems not the right way thus is there another way to do it. @Trilby you mentioned earlier that I could put a short script/launcher in /usr/bin that may even be just one line like to following (for example):
#!/bin/sh
LD_LIBRARY_PATH=/opt/renderer /opt/renderer/BINARYNAME
can you explain a bit how this works.
Offline
For #3, that would only be for a single binary. It just ensures the bundled libraries rather than the system libraries are used if you are using the precompiled binary - which is no longer the case, so that may no longer be relevant.
But you'll still be installing to /opt/ so you'd either need to A) encourage users to add /opt/renderer/bin to their PATH, B) link every binary into /usr/bin/ (rather ugly), or C) create a launcher script in /usr/bin something like the following:
#!/bin/sh
program=$1
shift
exec /opt/renderer/bin/$1 "$@"
This way each binary could be executed, but they'd need to be prefixed by whatever you called this script.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
For 1 all I could find was https://cmake.org/cmake/help/latest/mod … ities.html
For 2
==> Tidying install...
-> Removing libtool files...
-> Purging unwanted files...
-> Removing static library files...
-> Stripping unneeded symbols from binaries and libraries...
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_aux.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_close.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_codec.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_color.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_compress.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_dir.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_dirinfo.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_dirread.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_dirwrite.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_dumpmode.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_error.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_extension.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_fax3.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_fax3sm.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_flush.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_getimage.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_jpeg.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_luv.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_lzw.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_next.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_ojpeg.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_open.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_packbits.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_pixarlog.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_predict.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_print.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_read.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_strip.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_swab.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_thunder.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_tile.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_unix.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_version.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_warning.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_write.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/libtiff/.libs/libtiff.a(tif_zip.o): Unable to recognise the format of file: file format not recognized
strip: ./opt/radiance-renderer/lib/ray/src/px/tiff/port/.libs/libport.a(dummy.o): Unable to recognise the format of file: file format not recognized
libtiff is not built and the system provided libtiff an transient depedency of qt5-base and qt5-imageformats. Removing the entire src directory was probably overzealous. Did it break anything?
pacman -Qlp radiance-renderer-5.3a.914d7c40-1-x86_64.pkg.tar.zst
....
radiance-renderer /opt/radiance-renderer/bin/plugins/
radiance-renderer /opt/radiance-renderer/bin/plugins/imageformats/
radiance-renderer /opt/radiance-renderer/bin/plugins/imageformats/libqgif.so
radiance-renderer /opt/radiance-renderer/bin/plugins/imageformats/libqico.so
radiance-renderer /opt/radiance-renderer/bin/plugins/imageformats/libqjpeg.so
radiance-renderer /opt/radiance-renderer/bin/plugins/imageformats/libqtiff.so
radiance-renderer /opt/radiance-renderer/bin/plugins/platforms/
radiance-renderer /opt/radiance-renderer/bin/plugins/platforms/libqxcb.so
....
radiance-renderer /opt/radiance-renderer/man/
radiance-renderer /opt/radiance-renderer/man/man1/
radiance-renderer /opt/radiance-renderer/man/man1/arch2rad.1
radiance-renderer /opt/radiance-renderer/man/man1/bgraph.1
radiance-renderer /opt/radiance-renderer/man/man1/bsdf2klems.1
radiance-renderer /opt/radiance-renderer/man/man1/bsdf2rad.1
radiance-renderer /opt/radiance-renderer/man/man1/bsdf2ttree.1
radiance-renderer /opt/radiance-renderer/man/man1/bsdfview.1
radiance-renderer /opt/radiance-renderer/man/man1/cnt.1
radiance-renderer /opt/radiance-renderer/man/man1/compamb.1
radiance-renderer /opt/radiance-renderer/man/man1/cv.1
radiance-renderer /opt/radiance-renderer/man/man1/dayfact.1
radiance-renderer /opt/radiance-renderer/man/man1/dcglare.1
radiance-renderer /opt/radiance-renderer/man/man1/dctimestep.1
radiance-renderer /opt/radiance-renderer/man/man1/dgraph.1
radiance-renderer /opt/radiance-renderer/man/man1/epw2wea.1
radiance-renderer /opt/radiance-renderer/man/man1/ev.1
radiance-renderer /opt/radiance-renderer/man/man1/evalglare.1
radiance-renderer /opt/radiance-renderer/man/man1/falsecolor.1
radiance-renderer /opt/radiance-renderer/man/man1/fieldcomb.1
radiance-renderer /opt/radiance-renderer/man/man1/findglare.1
radiance-renderer /opt/radiance-renderer/man/man1/gcomp.1
radiance-renderer /opt/radiance-renderer/man/man1/genBSDF.1
radiance-renderer /opt/radiance-renderer/man/man1/genblinds.1
radiance-renderer /opt/radiance-renderer/man/man1/genbox.1
radiance-renderer /opt/radiance-renderer/man/man1/genclock.1
radiance-renderer /opt/radiance-renderer/man/man1/gendaylit.1
radiance-renderer /opt/radiance-renderer/man/man1/gendaymtx.1
radiance-renderer /opt/radiance-renderer/man/man1/genklemsamp.1
radiance-renderer /opt/radiance-renderer/man/man1/genprism.1
radiance-renderer /opt/radiance-renderer/man/man1/genrev.1
radiance-renderer /opt/radiance-renderer/man/man1/gensky.1
radiance-renderer /opt/radiance-renderer/man/man1/genskyvec.1
radiance-renderer /opt/radiance-renderer/man/man1/gensurf.1
radiance-renderer /opt/radiance-renderer/man/man1/genworm.1
radiance-renderer /opt/radiance-renderer/man/man1/getbbox.1
radiance-renderer /opt/radiance-renderer/man/man1/getinfo.1
radiance-renderer /opt/radiance-renderer/man/man1/glare.1
radiance-renderer /opt/radiance-renderer/man/man1/glarendx.1
radiance-renderer /opt/radiance-renderer/man/man1/glrad.1
radiance-renderer /opt/radiance-renderer/man/man1/histo.1
radiance-renderer /opt/radiance-renderer/man/man1/icalc.1
radiance-renderer /opt/radiance-renderer/man/man1/ies2rad.1
radiance-renderer /opt/radiance-renderer/man/man1/igraph.1
radiance-renderer /opt/radiance-renderer/man/man1/lampcolor.1
radiance-renderer /opt/radiance-renderer/man/man1/lookamb.1
radiance-renderer /opt/radiance-renderer/man/man1/ltpict.1
radiance-renderer /opt/radiance-renderer/man/man1/ltview.1
radiance-renderer /opt/radiance-renderer/man/man1/macbethcal.1
radiance-renderer /opt/radiance-renderer/man/man1/meta2bmp.1
radiance-renderer /opt/radiance-renderer/man/man1/meta2tga.1
radiance-renderer /opt/radiance-renderer/man/man1/mgf2meta.1
radiance-renderer /opt/radiance-renderer/man/man1/mgf2rad.1
radiance-renderer /opt/radiance-renderer/man/man1/mkillum.1
radiance-renderer /opt/radiance-renderer/man/man1/mkpmap.1
radiance-renderer /opt/radiance-renderer/man/man1/mksource.1
radiance-renderer /opt/radiance-renderer/man/man1/neaten.1
radiance-renderer /opt/radiance-renderer/man/man1/normpat.1
radiance-renderer /opt/radiance-renderer/man/man1/normtiff.1
radiance-renderer /opt/radiance-renderer/man/man1/obj2mesh.1
radiance-renderer /opt/radiance-renderer/man/man1/obj2rad.1
radiance-renderer /opt/radiance-renderer/man/man1/objline.1
radiance-renderer /opt/radiance-renderer/man/man1/objview.1
radiance-renderer /opt/radiance-renderer/man/man1/oconv.1
radiance-renderer /opt/radiance-renderer/man/man1/pcomb.1
radiance-renderer /opt/radiance-renderer/man/man1/pcompos.1
radiance-renderer /opt/radiance-renderer/man/man1/pcond.1
radiance-renderer /opt/radiance-renderer/man/man1/pdfblur.1
radiance-renderer /opt/radiance-renderer/man/man1/pexpand.1
radiance-renderer /opt/radiance-renderer/man/man1/pextrem.1
radiance-renderer /opt/radiance-renderer/man/man1/pfilt.1
radiance-renderer /opt/radiance-renderer/man/man1/pflip.1
radiance-renderer /opt/radiance-renderer/man/man1/phisto.1
radiance-renderer /opt/radiance-renderer/man/man1/pinterp.1
radiance-renderer /opt/radiance-renderer/man/man1/pkgBSDF.1
radiance-renderer /opt/radiance-renderer/man/man1/plotin.1
radiance-renderer /opt/radiance-renderer/man/man1/pmapdump.1
radiance-renderer /opt/radiance-renderer/man/man1/pmblur.1
radiance-renderer /opt/radiance-renderer/man/man1/pmblur2.1
radiance-renderer /opt/radiance-renderer/man/man1/pmdblur.1
radiance-renderer /opt/radiance-renderer/man/man1/protate.1
radiance-renderer /opt/radiance-renderer/man/man1/psign.1
radiance-renderer /opt/radiance-renderer/man/man1/psketch.1
radiance-renderer /opt/radiance-renderer/man/man1/psmeta.1
radiance-renderer /opt/radiance-renderer/man/man1/psort.1
radiance-renderer /opt/radiance-renderer/man/man1/pvalue.1
radiance-renderer /opt/radiance-renderer/man/man1/ra_bmp.1
radiance-renderer /opt/radiance-renderer/man/man1/ra_gif.1
radiance-renderer /opt/radiance-renderer/man/man1/ra_pict.1
radiance-renderer /opt/radiance-renderer/man/man1/ra_ppm.1
radiance-renderer /opt/radiance-renderer/man/man1/ra_ps.1
radiance-renderer /opt/radiance-renderer/man/man1/ra_rgbe.1
radiance-renderer /opt/radiance-renderer/man/man1/ra_t16.1
radiance-renderer /opt/radiance-renderer/man/man1/ra_t8.1
radiance-renderer /opt/radiance-renderer/man/man1/ra_tiff.1
radiance-renderer /opt/radiance-renderer/man/man1/ra_xyze.1
radiance-renderer /opt/radiance-renderer/man/man1/rad.1
radiance-renderer /opt/radiance-renderer/man/man1/rad2mgf.1
radiance-renderer /opt/radiance-renderer/man/man1/raddepend.1
radiance-renderer /opt/radiance-renderer/man/man1/ran2tiff.1
radiance-renderer /opt/radiance-renderer/man/man1/ranimate.1
radiance-renderer /opt/radiance-renderer/man/man1/ranimove.1
radiance-renderer /opt/radiance-renderer/man/man1/rcalc.1
radiance-renderer /opt/radiance-renderer/man/man1/rcode2bmp.1
radiance-renderer /opt/radiance-renderer/man/man1/rcode_depth.1
radiance-renderer /opt/radiance-renderer/man/man1/rcode_ident.1
radiance-renderer /opt/radiance-renderer/man/man1/rcode_norm.1
radiance-renderer /opt/radiance-renderer/man/man1/rcollate.1
radiance-renderer /opt/radiance-renderer/man/man1/rcontrib.1
radiance-renderer /opt/radiance-renderer/man/man1/replmarks.1
radiance-renderer /opt/radiance-renderer/man/man1/rfluxmtx.1
radiance-renderer /opt/radiance-renderer/man/man1/rhcopy.1
radiance-renderer /opt/radiance-renderer/man/man1/rhinfo.1
radiance-renderer /opt/radiance-renderer/man/man1/rholo.1
radiance-renderer /opt/radiance-renderer/man/man1/rhoptimize.1
radiance-renderer /opt/radiance-renderer/man/man1/rhpict.1
radiance-renderer /opt/radiance-renderer/man/man1/rlam.1
radiance-renderer /opt/radiance-renderer/man/man1/rmtxop.1
radiance-renderer /opt/radiance-renderer/man/man1/robjutil.1
radiance-renderer /opt/radiance-renderer/man/man1/rpict.1
radiance-renderer /opt/radiance-renderer/man/man1/rpiece.1
radiance-renderer /opt/radiance-renderer/man/man1/rsensor.1
radiance-renderer /opt/radiance-renderer/man/man1/rsplit.1
radiance-renderer /opt/radiance-renderer/man/man1/rtpict.1
radiance-renderer /opt/radiance-renderer/man/man1/rtrace.1
radiance-renderer /opt/radiance-renderer/man/man1/rvu.1
radiance-renderer /opt/radiance-renderer/man/man1/tabfunc.1
radiance-renderer /opt/radiance-renderer/man/man1/tmesh2rad.1
radiance-renderer /opt/radiance-renderer/man/man1/total.1
radiance-renderer /opt/radiance-renderer/man/man1/trad.1
radiance-renderer /opt/radiance-renderer/man/man1/ttyimage.1
radiance-renderer /opt/radiance-renderer/man/man1/vwrays.1
radiance-renderer /opt/radiance-renderer/man/man1/vwright.1
radiance-renderer /opt/radiance-renderer/man/man1/wrapBSDF.1
radiance-renderer /opt/radiance-renderer/man/man1/x11meta.1
radiance-renderer /opt/radiance-renderer/man/man1/xform.1
radiance-renderer /opt/radiance-renderer/man/man1/xglaresrc.1
radiance-renderer /opt/radiance-renderer/man/man1/ximage.1
radiance-renderer /opt/radiance-renderer/man/man1/xshowtrace.1
radiance-renderer /opt/radiance-renderer/man/man3/
radiance-renderer /opt/radiance-renderer/man/man3/meta.3
radiance-renderer /opt/radiance-renderer/man/man5/
radiance-renderer /opt/radiance-renderer/man/man5/metafile.5
The qt5 plugins are just copied from qt5-base and qt5-imageformats and I suspect can be deleted.
The man pages being in a none standard location will not be found.
Offline
Thank you both for the info.
@Trilby I guess the way to add the launcher script is to create it in advance together with the PKGBUILD and then add it to the sources and later on in the package() section install it in the /usr/bin similarly to what the is happening to this PKGBUILD https://aur.archlinux.org/cgit/aur.git/ … =cuda-10.0 for the script that adds the path to the profile.d folder (which btw could be used for your A) suggestion as I see it, which in principle I could do myself instead of printing a message to encourage the user to do it himself). Is that right?
@loqs, nope it did not brake anything it works like a charm. Regarding the man files can I somehow explicitly specify to install them in /usr/man instead of /opt/radiance-rendere/man or I will need to move them manually after the make install in the package() section?
Offline