[aur-general] Packaging question

Andrew DeMaria ademariad at gmail.com
Sun Feb 2 04:16:48 EST 2014


On 02/02/2014 12:12 AM, Magnus Therning wrote:
> First off, please don't hijack threads in the list; refrain from using
> reply-to when starting a new discussion!
>
> On Sat, Feb 01, 2014 at 11:02:53PM -0700, Andrew DeMaria wrote:
>> Hi all!
>>
>> So say I have package A which is installed with a "Drivers" folder
>> under /usr/lib/PACKAGE_A/.  This package then would have an optional
>> dependency on another standalone library (pakage B) to provide a
>> certain driver.  To make package A work properly with the optional
>> package B, either a symlink or direct copy of a libBBB.so file needs
>> to be made. i.e.
>>
>> /usr/lib/PACKAGE_A/Drivers/libBBB.so -> /usr/lib/PACKAGE_B/libBBB.so
>>
>> So my question is, what is the best way to make this happen?  Do I
>> provide a *.install file for PACKAGE_A that tries to see if
>> PACKAGE_B exists and then link the files if so?  What should happen
>> if PACKAGE_B is installed after PACKAGE_A?
>>
>> For reference PACKAGE_A is openni2
>> (https://aur.archlinux.org/packages/openni2) and PACKAGE_B is
>> libfreenect-git
>> (https://aur.archlinux.org/packages/libfreenect-git/).  Currently
>> they are not tied to each other, but I would like to make it
>> possible for openni2 to optionally? depend on a driver provided by
>> libfreenect.
> In PKGBUILDs you can either depend (place a package in the 'depends'
> array) on a package, or optionally depend (place a package in the
> 'optdepends' array) on a package.  The crucial thing to realise is
> that in order to use 'optdepends' the built package must be able to
> determine at runtime whether the optional dependencies are present and
> if so make use of them.
>
> With this in mind it sounds like what you need is two openni2
> packages, one that
>
>    - doesn't depend on libfreenect-git
>    - configures openni2 at build time to NOT use (i.e. link against)
>      libfreenect
>
> and one that
>
>    - does depend on libfreenect-git
>    - configures openni2 at build to use (i.e. link against) libfreenect
>
> /M
>
Whoops.  Sorry for messing up the threads.  And that makes sense, thank 
you! I do have a couple more questions, but will post in a new thread.


More information about the aur-general mailing list