Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import from acap3 sdk for selected api's #1

Merged
merged 7 commits into from
Mar 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Repository and tag variables
ARG ARCH=aarch64
ARG VERSION=3.3_beta1
ARG UBUNTU_VERSION=20.04
ARG REPO=axisecp

FROM ${REPO}/acap-api:${VERSION}-${ARCH}-ubuntu${UBUNTU_VERSION} as api
FROM ${REPO}/acap-toolchain:${VERSION}-${ARCH}-ubuntu${UBUNTU_VERSION} as toolchain
FROM ubuntu:${UBUNTU_VERSION}
ARG ARCH
ARG API_DIR=/opt/axis/sdk/temp/sysroots/${ARCH}/usr
ARG NATIVE_DIR=/opt/axis/acapsdk/sysroots/${ARCH}/usr/
ENV DEBIAN_FRONTEND=noninteractive

# Install packages needed for interactive users and some additional libraries
# - curl, iputils-ping: required by eap-install.sh
RUN apt-get update && apt-get install -y --no-install-recommends \
crossbuild-essential-arm64 \
make \
pkg-config \
python3-pip \
python3-jsonschema \
curl \
iputils-ping \
xz-utils \
git \
less \
vim

# Copy and install the tools and scripts from toolchain container
COPY --from=toolchain /opt/axis/sdk/temp /opt/axis/acapsdk
COPY --from=toolchain /opt/axis/tools /opt/axis/tools
RUN apt-get install -y /opt/axis/tools/axis-acap-manifest-tools*.deb && \
pip3 install /opt/axis/tools/Larodconverter*.whl && \
rm -rf /opt/axis/tools

# Update paths in environment-setup script
RUN sed -i 's:/opt/axis/sdk:/opt/axis/acapsdk:g' /opt/axis/acapsdk/environment-setup*

# APIs included in Native SDK scope from Classic SDK
COPY --from=api ${API_DIR}/include/larod* ${NATIVE_DIR}/include/
COPY --from=api ${API_DIR}/include/licensekey* ${NATIVE_DIR}/include/
COPY --from=api ${API_DIR}/include/vdo ${NATIVE_DIR}/include/vdo
COPY --from=api ${API_DIR}/include/axsdk/axevent.h ${NATIVE_DIR}/include/axsdk/axevent.h
COPY --from=api ${API_DIR}/include/axsdk/axevent ${NATIVE_DIR}/include/axsdk/axevent

# Direct dependencies from Classic SDK
COPY --from=api ${API_DIR}/lib/pkgconfig/liblarod.pc \
${API_DIR}/lib/pkgconfig/vdostream.pc \
${API_DIR}/lib/pkgconfig/axevent.pc ${NATIVE_DIR}/lib/pkgconfig/

COPY --from=api ${API_DIR}/lib/liblarod* \
${API_DIR}/lib/libvdostream* \
${API_DIR}/lib/libaxevent* \
${API_DIR}/lib/liblicensekey* ${NATIVE_DIR}/lib/

# AXIS specific dependencies from Classic SDK
COPY --from=api ${API_DIR}/lib/libevent2* \
${API_DIR}/lib/libaxpackage* \
${API_DIR}/lib/libpolicykit_system* \
${API_DIR}/lib/libfido* ${NATIVE_DIR}/lib/

# Standard Linux dependencies from Classic SDK
COPY --from=api ${API_DIR}/include/glib-2.0 ${NATIVE_DIR}/include/glib-2.0
COPY --from=api ${API_DIR}/lib/glib-2.0 ${NATIVE_DIR}/lib/glib-2.0

COPY --from=api ${API_DIR}/lib/pkgconfig/glib-2.0.pc \
${API_DIR}/lib/pkgconfig/libpcre* \
${API_DIR}/lib/pkgconfig/gio-2.0.pc \
${API_DIR}/lib/pkgconfig/gobject-2.0.pc \
${API_DIR}/lib/pkgconfig/gio-unix-2.0.pc \
${API_DIR}/lib/pkgconfig/libffi.pc \
${API_DIR}/lib/pkgconfig/gmodule-no-export-2.0.pc \
${API_DIR}/lib/pkgconfig/zlib.pc \
${API_DIR}/lib/pkgconfig/libsystemd* \
${API_DIR}/lib/pkgconfig/pixman-1.pc \
${API_DIR}/lib/pkgconfig/fontconfig.pc \
${API_DIR}/lib/pkgconfig/freetype2.pc \
${API_DIR}/lib/pkgconfig/libpng.pc \
${API_DIR}/lib/pkgconfig/uuid.pc \
${API_DIR}/lib/pkgconfig/expat.pc ${NATIVE_DIR}/lib/pkgconfig/

COPY --from=api ${API_DIR}/lib/libglib-2.0* \
${API_DIR}/lib/libpcre* \
${API_DIR}/lib/libpthread* \
${API_DIR}/lib/libgobject* \
${API_DIR}/lib/libxmlnode* \
${API_DIR}/lib/libglib-utils* \
${API_DIR}/lib/libsystemd* \
${API_DIR}/lib/libgio-2.0* \
${API_DIR}/lib/libconfutils* \
${API_DIR}/lib/libexpat* \
${API_DIR}/lib/libffi* \
${API_DIR}/lib/librt* \
${API_DIR}/lib/libcap* \
${API_DIR}/lib/libgmodule-2.0* \
${API_DIR}/lib/libz* \
${API_DIR}/lib/libresolv* \
${API_DIR}/lib/libdl* \
${API_DIR}/lib/libm* \
${API_DIR}/lib/libcrypto* \
${API_DIR}/lib/libpixman-1* \
${API_DIR}/lib/libfontconfig* \
${API_DIR}/lib/libfreetype* \
${API_DIR}/lib/libpng* \
${API_DIR}/lib/libuuid* \
${API_DIR}/lib/libexpat* \
${API_DIR}/lib/libjansson* ${NATIVE_DIR}/lib/

# Make the environment sourced for interactive Bash users
RUN printf "\n# Source SDK for all users\n. /opt/axis/acapsdk/environment-*\n" >> /etc/bash.bashrc

# Set workdir
WORKDIR /opt/app
127 changes: 127 additions & 0 deletions Dockerfile.armv7hf
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# Repository and tag variables
ARG ARCH=armv7hf
ARG VERSION=3.3_beta1
ARG UBUNTU_VERSION=20.04
ARG REPO=axisecp

FROM ${REPO}/acap-api:${VERSION}-${ARCH}-ubuntu${UBUNTU_VERSION} as api
FROM ${REPO}/acap-toolchain:${VERSION}-${ARCH}-ubuntu${UBUNTU_VERSION} as toolchain
FROM ubuntu:${UBUNTU_VERSION}
ARG ARCH
ARG API_DIR=/opt/axis/sdk/temp/sysroots/${ARCH}/usr
ARG NATIVE_DIR=/opt/axis/acapsdk/sysroots/${ARCH}/usr/
ENV DEBIAN_FRONTEND=noninteractive

# Install packages needed for interactive users and some additional libraries
# - curl, iputils-ping: required by eap-install.sh
RUN apt-get update && apt-get install -y --no-install-recommends \
crossbuild-essential-armhf \
make \
pkg-config \
python3-pip \
python3-jsonschema \
curl \
iputils-ping \
xz-utils \
git \
less \
vim

# Copy and install the tools and scripts from toolchain container
COPY --from=toolchain /opt/axis/sdk/temp /opt/axis/acapsdk
COPY --from=toolchain /opt/axis/tools /opt/axis/tools
RUN apt-get install -y /opt/axis/tools/axis-acap-manifest-tools*.deb && \
pip3 install /opt/axis/tools/Larodconverter*.whl && \
rm -rf /opt/axis/tools

# Update paths in environment-setup script
RUN sed -i 's:/opt/axis/sdk:/opt/axis/acapsdk:g' /opt/axis/acapsdk/environment-setup*

# APIs included in Native SDK scope from Classic SDK
COPY --from=api ${API_DIR}/include/larod* ${NATIVE_DIR}/include/
COPY --from=api ${API_DIR}/include/licensekey* ${NATIVE_DIR}/include/
COPY --from=api ${API_DIR}/include/axoverlay* ${NATIVE_DIR}/include/
COPY --from=api ${API_DIR}/include/CL ${NATIVE_DIR}/include/CL
COPY --from=api ${API_DIR}/include/cairo ${NATIVE_DIR}/include/cairo
COPY --from=api ${API_DIR}/include/vdo ${NATIVE_DIR}/include/vdo
COPY --from=api ${API_DIR}/include/axsdk/axevent.h ${NATIVE_DIR}/include/axsdk/axevent.h
COPY --from=api ${API_DIR}/include/axsdk/axevent ${NATIVE_DIR}/include/axsdk/axevent

# Direct dependencies from Classic SDK
COPY --from=api ${API_DIR}/lib/pkgconfig/liblarod.pc \
${API_DIR}/lib/pkgconfig/vdostream.pc \
${API_DIR}/lib/pkgconfig/axevent.pc \
${API_DIR}/lib/pkgconfig/axoverlay.pc\
${API_DIR}/lib/pkgconfig/opencl.pc* \
${API_DIR}/lib/pkgconfig/cairo.pc ${NATIVE_DIR}/lib/pkgconfig/

COPY --from=api ${API_DIR}/lib/liblarod* \
${API_DIR}/lib/libvdostream* \
${API_DIR}/lib/libaxevent* \
${API_DIR}/lib/liblicensekey* \
${API_DIR}/lib/libaxoverlay* \
${API_DIR}/lib/libOpenCL* \
${API_DIR}/lib/libcairo* ${NATIVE_DIR}/lib/

# AXIS specific dependencies from Classic SDK
COPY --from=api ${API_DIR}/lib/libevent2* \
${API_DIR}/lib/libaxpackage* \
${API_DIR}/lib/libpolicykit_system* \
${API_DIR}/lib/libfido* ${NATIVE_DIR}/lib/

# Standard Linux dependencies from Classic SDK
COPY --from=api ${API_DIR}/include/glib-2.0 ${NATIVE_DIR}/include/glib-2.0
COPY --from=api ${API_DIR}/lib/glib-2.0 ${NATIVE_DIR}/lib/glib-2.0

COPY --from=api ${API_DIR}/lib/pkgconfig/glib-2.0.pc \
${API_DIR}/lib/pkgconfig/libpcre* \
${API_DIR}/lib/pkgconfig/gio-2.0.pc \
${API_DIR}/lib/pkgconfig/gobject-2.0.pc \
${API_DIR}/lib/pkgconfig/gio-unix-2.0.pc \
${API_DIR}/lib/pkgconfig/libffi.pc \
${API_DIR}/lib/pkgconfig/gmodule-no-export-2.0.pc \
${API_DIR}/lib/pkgconfig/zlib.pc \
${API_DIR}/lib/pkgconfig/libsystemd* \
${API_DIR}/lib/pkgconfig/pixman-1.pc \
${API_DIR}/lib/pkgconfig/fontconfig.pc \
${API_DIR}/lib/pkgconfig/freetype2.pc \
${API_DIR}/lib/pkgconfig/libpng.pc \
${API_DIR}/lib/pkgconfig/uuid.pc \
${API_DIR}/lib/pkgconfig/expat.pc ${NATIVE_DIR}/lib/pkgconfig/

COPY --from=api ${API_DIR}/lib/libglib-2.0* \
${API_DIR}/lib/libpcre* \
${API_DIR}/lib/libpthread* \
${API_DIR}/lib/libgobject* \
${API_DIR}/lib/libxmlnode* \
${API_DIR}/lib/libglib-utils* \
${API_DIR}/lib/libsystemd* \
${API_DIR}/lib/libgio-2.0* \
${API_DIR}/lib/libconfutils* \
${API_DIR}/lib/libexpat* \
${API_DIR}/lib/libffi* \
${API_DIR}/lib/librt* \
${API_DIR}/lib/libcap* \
${API_DIR}/lib/libgmodule-2.0* \
${API_DIR}/lib/libz* \
${API_DIR}/lib/libresolv* \
${API_DIR}/lib/libdl* \
${API_DIR}/lib/libm* \
${API_DIR}/lib/libcrypto* \
${API_DIR}/lib/libpixman-1* \
${API_DIR}/lib/libfontconfig* \
${API_DIR}/lib/libfreetype* \
${API_DIR}/lib/libpng* \
${API_DIR}/lib/libuuid* \
${API_DIR}/lib/libexpat* \
${API_DIR}/lib/libjansson* \
${API_DIR}/lib/libGLESv2* \
${API_DIR}/lib/libEGL* \
${API_DIR}/lib/libGAL* \
${API_DIR}/lib/libVSC* ${NATIVE_DIR}/lib/

# Make the environment sourced for interactive Bash users
RUN printf "\n# Source SDK for all users\n. /opt/axis/acapsdk/environment-*\n" >> /etc/bash.bashrc

# Set workdir
WORKDIR /opt/app
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# acap-native-sdk
# Overview
SDK for building low level ACAP applications in C or C++

# License
By downloading ACAP SDK you automatically agree to the terms in the [license agreement](https://www.axis.com/techsup/developer_doc/EULA/LICENSE.pdf)

ACAP SDK open source licenses and copyleft source code are found [here](http://acap-artifacts.s3-website.eu-north-1.amazonaws.com/)