# Shipping a wrapper along with downloaded libraries

**URL:** <https://discourse.julialang.org/t/shipping-a-wrapper-along-with-downloaded-libraries/36491>\
**Category:** Tooling\
**Created:** [March 25, 2020, 1:32pm UTC](https://discourse.julialang.org/t/shipping-a-wrapper-along-with-downloaded-libraries/36491 "2020-03-25T13:32:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlfTetzlaff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alftetzlaff/32/13124_2.png) [@AlfTetzlaff](https://discourse.julialang.org/u/AlfTetzlaff)\
**Post date:** [March 25, 2020, 1:32pm UTC](https://discourse.julialang.org/t/shipping-a-wrapper-along-with-downloaded-libraries/36491/1 "2020-03-25T13:32:16Z")

</div>

Hey everybody,

I wrote a wrapper for the ZWO ASI cameras [[1]](https://astronomy-imaging-camera.com/software-drivers). I now want to package the wrapper in a way that downloads the library (MIT-License), so that the end-user can install the wrapper just by calling `add LibASICamera`. More specific, the installation process should comprise:

1. Installing the wrapper itself
2. Downloading the SDK from the manufacturer homepage, selecting for the right OS.
3. Extracting the SDK, copying the right .so file (OS/architecture) to some convenient place
4. Install the udev rules for the camera ← probably requires elevated rights
5. Delete all temporary, unnecessary files

What is the best way to achieve this?

---

<div class="post-metadata">

**Author:** ![avik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/avik/32/17_2.png) [@avik](https://discourse.julialang.org/u/avik)\
**Post date:** [March 25, 2020, 1:58pm UTC](https://discourse.julialang.org/t/shipping-a-wrapper-along-with-downloaded-libraries/36491/2 "2020-03-25T13:58:28Z")

</div>

When you install a package, the package manager runs the `deps/build.jl` file if it exists. In this file, you can do pretty much anything to set up your package. As an example of a package that downloads things in a custom way, see here: [Taro.jl/build.jl at master · aviks/Taro.jl · GitHub](https://github.com/aviks/Taro.jl/blob/master/deps/build.jl)

However if the native libraries are open source, you may want to use BinaryBuilder. This will make things much smoother. See here for docs: [Home · BinaryBuilder.jl](https://juliapackaging.github.io/BinaryBuilder.jl/latest/)

---

<div class="post-metadata">

**Author:** ![AlfTetzlaff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alftetzlaff/32/13124_2.png) [@AlfTetzlaff](https://discourse.julialang.org/u/AlfTetzlaff)\
**Post date:** [March 25, 2020, 2:42pm UTC](https://discourse.julialang.org/t/shipping-a-wrapper-along-with-downloaded-libraries/36491/3 "2020-03-25T14:42:02Z")

</div>

Thanks for the example, that should help! Unfortunately, the library is not open source (but freely redistributable). Regarding installing the udev rules, I will probably outsource this to the end-user by presenting some command to run, as it requires root rights…
