Merge pull request #4751

6789385c Dockerfile: add udev, libusb and hidapi build (MoroccanMalinois)
This commit is contained in:
Riccardo Spagni 2018-11-14 21:32:44 +02:00
commit d750ffae3b
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -18,7 +18,9 @@ RUN set -ex && \
libtool-bin \
autoconf \
automake \
bzip2
bzip2 \
xsltproc \
gperf
WORKDIR /usr/local
@ -109,6 +111,42 @@ RUN set -ex \
&& make check \
&& make install
# Udev
ARG UDEV_VERSION=v3.2.6
ARG UDEV_HASH=0c35b136c08d64064efa55087c54364608e65ed6
RUN set -ex \
&& git clone https://github.com/gentoo/eudev -b ${UDEV_VERSION} \
&& cd eudev \
&& test `git rev-parse HEAD` = ${UDEV_HASH} || exit 1 \
&& ./autogen.sh \
&& CFLAGS="-fPIC" CXXFLAGS="-fPIC" ./configure --disable-gudev --disable-introspection --disable-hwdb --disable-manpages --disable-shared \
&& make \
&& make install
# Libusb
ARG USB_VERSION=v1.0.22
ARG USB_HASH=0034b2afdcdb1614e78edaa2a9e22d5936aeae5d
RUN set -ex \
&& git clone https://github.com/libusb/libusb.git -b ${USB_VERSION} \
&& cd libusb \
&& test `git rev-parse HEAD` = ${USB_HASH} || exit 1 \
&& ./autogen.sh \
&& CFLAGS="-fPIC" CXXFLAGS="-fPIC" ./configure --disable-shared \
&& make \
&& make install
# Hidapi
ARG HIDAPI_VERSION=hidapi-0.8.0-rc1
ARG HIDAPI_HASH=40cf516139b5b61e30d9403a48db23d8f915f52c
RUN set -ex \
&& git clone https://github.com/signal11/hidapi -b ${HIDAPI_VERSION} \
&& cd hidapi \
&& test `git rev-parse HEAD` = ${HIDAPI_HASH} || exit 1 \
&& ./bootstrap \
&& CFLAGS="-fPIC" CXXFLAGS="-fPIC" ./configure --enable-static --disable-shared \
&& make \
&& make install
WORKDIR /src
COPY . .