initial commit
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=1000
|
||||
HISTFILESIZE=2000
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# If set, the pattern "**" used in a pathname expansion context will
|
||||
# match all files and zero or more directories and subdirectories.
|
||||
#shopt -s globstar
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color|*-256color) color_prompt=yes;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;35m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
#alias grep='grep --color=auto'
|
||||
#alias fgrep='fgrep --color=auto'
|
||||
#alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# colored GCC warnings and errors
|
||||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||
|
||||
# some more ls aliases
|
||||
#alias ll='ls -l'
|
||||
#alias la='ls -A'
|
||||
#alias l='ls -CF'
|
||||
|
||||
# Alias definitions.
|
||||
# You may want to put all your additions into a separate file like
|
||||
# ~/.bash_aliases, instead of adding them here directly.
|
||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
fi
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
@@ -0,0 +1,63 @@
|
||||
ARG image_from
|
||||
FROM --platform=linux/amd64 ${image_from}
|
||||
|
||||
ARG JOBS_COUNT=4
|
||||
ARG image_prepare_script
|
||||
ARG arch
|
||||
ARG toolchain
|
||||
ARG triplet
|
||||
|
||||
# versions and environment
|
||||
ENV CUR_CMAKE_VERSION=3.20.0
|
||||
ENV CUR_GOOGLETEST=v1.13.x
|
||||
|
||||
ENV QT_SELECT=5
|
||||
ENV LANG=en_US.utf8
|
||||
|
||||
|
||||
# configs
|
||||
COPY .bashrc /root/.bashrc
|
||||
COPY inputrc /etc/inputrc
|
||||
RUN echo 'root:12345' | chpasswd
|
||||
|
||||
# prepare current distributive
|
||||
COPY *.sh /soft/
|
||||
RUN if [ -n "${image_prepare_script}" ]; then \
|
||||
bash /soft/${image_prepare_script} ${arch} ${toolchain}; \
|
||||
fi
|
||||
RUN rm /soft/*.sh -v
|
||||
|
||||
# toolchain
|
||||
WORKDIR /soft
|
||||
COPY toolchain.cmake.in /soft/
|
||||
RUN sed -e s/\${PH_ARCH}/$arch/ -e s/\${PH_TRIPLET}/$triplet/ toolchain.cmake.in > toolchain.cmake
|
||||
RUN rm toolchain.cmake.in
|
||||
RUN mkdir -p /usr/${triplet}/lib
|
||||
RUN mkdir -p /soft/target/lib
|
||||
RUN ln -s /usr/lib/os-release /usr/${triplet}/lib/os-release
|
||||
RUN ln -s /usr/lib/os-release /soft/target/lib/os-release
|
||||
|
||||
|
||||
# last cmake from sources, into /opt
|
||||
WORKDIR /soft
|
||||
RUN wget -nv https://github.com/Kitware/CMake/releases/download/v${CUR_CMAKE_VERSION}/cmake-${CUR_CMAKE_VERSION}-Linux-x86_64.sh \
|
||||
&& mkdir -p /opt/cmake \
|
||||
&& bash ./cmake-${CUR_CMAKE_VERSION}-Linux-x86_64.sh --skip-license --prefix=/opt/cmake \
|
||||
&& rm -rf /soft/cmake-${CUR_CMAKE_VERSION}-Linux-x86_64.sh
|
||||
ENV PATH=/opt/cmake/bin:$PATH
|
||||
|
||||
# Remove invalid FindGtest.cmake
|
||||
RUN cd "$(find /opt/cmake/share -name FindGTest.cmake -type f -printf '%h' -quit)" && rm FindGTest.cmake
|
||||
|
||||
|
||||
# GTest
|
||||
WORKDIR /soft
|
||||
RUN git clone -b ${CUR_GOOGLETEST} https://github.com/google/googletest.git \
|
||||
&& mkdir googletest/build && cd googletest/build \
|
||||
&& cmake .. \
|
||||
&& make -j${JOBS_COUNT} && make install && cd /soft && rm -rf googletest
|
||||
|
||||
|
||||
ENV BUILD_TYPE=Release
|
||||
|
||||
WORKDIR /soft
|
||||
@@ -0,0 +1,38 @@
|
||||
--- CMakeLists.txt 2019-04-15 18:28:20.000000000 +0300
|
||||
+++ CMakeLists_new.txt 2020-03-16 10:46:52.288128600 +0300
|
||||
@@ -20,6 +20,9 @@
|
||||
set(${PROJECT_NAME}_ONLY_LIBRARY OFF CACHE BOOL
|
||||
"Set to ON to only build markdown library (default is OFF)")
|
||||
|
||||
+set(${PROJECT_NAME}_CXX_BINDING OFF CACHE BOOL
|
||||
+ "Set to ON to install header files with c++ wrappers (default is OFF)")
|
||||
+
|
||||
# Check headers
|
||||
include(CheckIncludeFile)
|
||||
check_include_file(libgen.h HAVE_LIBGEN_H)
|
||||
@@ -110,6 +113,13 @@
|
||||
configure_file("${_ROOT}/mkdio.h.in"
|
||||
"${_ROOT}/mkdio.h"
|
||||
@ONLY)
|
||||
+if(${PROJECT_NAME}_CXX_BINDING)
|
||||
+ message(STATUS "Applying c++ glue to mkdio.h")
|
||||
+ file(READ "${_ROOT}/mkdio.h" _ROOT_MKDIO_H)
|
||||
+ file(WRITE "${_ROOT}/mkdio.h" "#ifdef __cplusplus\nextern \"C\" {\n#endif\n")
|
||||
+ file(APPEND "${_ROOT}/mkdio.h" "${_ROOT_MKDIO_H}")
|
||||
+ file(APPEND "${_ROOT}/mkdio.h" "#ifdef __cplusplus\n}\n#endif\n")
|
||||
+endif()
|
||||
|
||||
include_directories("${_ROOT}")
|
||||
|
||||
@@ -182,7 +192,10 @@
|
||||
target_include_directories(libmarkdown INTERFACE
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
- set(_TARGETS libmarkdown markdown)
|
||||
+ set(_TARGETS libmarkdown)
|
||||
+ if(NOT ${PROJECT_NAME}_ONLY_LIBRARY)
|
||||
+ list(APPEND _TARGETS markdown)
|
||||
+ endif()
|
||||
if(${PROJECT_NAME}_INSTALL_SAMPLES)
|
||||
list(APPEND _TARGETS mkd2html makepage)
|
||||
endif()
|
||||
@@ -0,0 +1,67 @@
|
||||
# /etc/inputrc - global inputrc for libreadline
|
||||
# See readline(3readline) and `info rluserman' for more information.
|
||||
|
||||
# Be 8 bit clean.
|
||||
set input-meta on
|
||||
set output-meta on
|
||||
|
||||
# To allow the use of 8bit-characters like the german umlauts, uncomment
|
||||
# the line below. However this makes the meta key not work as a meta key,
|
||||
# which is annoying to those which don't need to type in 8-bit characters.
|
||||
|
||||
# set convert-meta off
|
||||
|
||||
# try to enable the application keypad when it is called. Some systems
|
||||
# need this to enable the arrow keys.
|
||||
# set enable-keypad on
|
||||
|
||||
# see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys
|
||||
|
||||
# do not bell on tab-completion
|
||||
# set bell-style none
|
||||
# set bell-style visible
|
||||
|
||||
# some defaults / modifications for the emacs mode
|
||||
$if mode=emacs
|
||||
|
||||
# allow the use of the Home/End keys
|
||||
"\e[1~": beginning-of-line
|
||||
"\e[4~": end-of-line
|
||||
|
||||
# allow the use of the Delete/Insert keys
|
||||
"\e[3~": delete-char
|
||||
"\e[2~": quoted-insert
|
||||
|
||||
# mappings for "page up" and "page down" to step to the beginning/end
|
||||
# of the history
|
||||
# "\e[5~": beginning-of-history
|
||||
# "\e[6~": end-of-history
|
||||
|
||||
# alternate mappings for "page up" and "page down" to search the history
|
||||
"\e[5~": history-search-backward
|
||||
"\e[6~": history-search-forward
|
||||
|
||||
# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
|
||||
"\e[1;5C": forward-word
|
||||
"\e[1;5D": backward-word
|
||||
"\e[5C": forward-word
|
||||
"\e[5D": backward-word
|
||||
"\e\e[C": forward-word
|
||||
"\e\e[D": backward-word
|
||||
|
||||
$if term=rxvt
|
||||
"\e[7~": beginning-of-line
|
||||
"\e[8~": end-of-line
|
||||
"\eOc": forward-word
|
||||
"\eOd": backward-word
|
||||
$endif
|
||||
|
||||
# for non RH/Debian xterm, can't hurt for RH/Debian xterm
|
||||
# "\eOH": beginning-of-line
|
||||
# "\eOF": end-of-line
|
||||
|
||||
# for freebsd console
|
||||
# "\e[H": beginning-of-line
|
||||
# "\e[F": end-of-line
|
||||
|
||||
$endif
|
||||
@@ -0,0 +1,157 @@
|
||||
#!/bin/bash
|
||||
|
||||
arch=$1
|
||||
toolchain=$2
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
find "/etc/apt/sources.list.d/" -type f -exec sed -i "s|http://[a-zA-Z0-9_.]\+/|http://mirror.yandex.ru/|g" {} \;
|
||||
|
||||
dpkg --add-architecture $arch
|
||||
apt-get update
|
||||
|
||||
# locales
|
||||
apt-get install -y locales apt-utils
|
||||
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
|
||||
|
||||
TZ=Europe/Moscow
|
||||
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime
|
||||
echo $TZ > /etc/timezone
|
||||
|
||||
# base soft
|
||||
apt-get install -y \
|
||||
"^libxcb.*" \
|
||||
bison \
|
||||
ccache \
|
||||
cpio \
|
||||
curl \
|
||||
debconf \
|
||||
debhelper \
|
||||
default-libmysqlclient-dev \
|
||||
doxygen \
|
||||
dpkg \
|
||||
flex \
|
||||
g++ \
|
||||
git \
|
||||
gperf \
|
||||
graphviz \
|
||||
htop \
|
||||
iputils-ping \
|
||||
libbz2-dev \
|
||||
libffi-dev \
|
||||
libfontconfig1-dev \
|
||||
libfreetype6-dev \
|
||||
libgl1-mesa-dev \
|
||||
libglew-dev \
|
||||
libglu1-mesa-dev \
|
||||
libgmp-dev \
|
||||
libicu-dev \
|
||||
liblzma-dev \
|
||||
libmpc-dev \
|
||||
libmpfr-dev \
|
||||
libncurses-dev \
|
||||
libpkgconfig-perl \
|
||||
libpq-dev \
|
||||
libreadline-dev \
|
||||
libssl-dev \
|
||||
libusb-1.0-0-dev \
|
||||
libwayland-dev \
|
||||
libx11-dev \
|
||||
libx11-xcb-dev \
|
||||
libxkbcommon-dev \
|
||||
libxkbcommon-x11-dev \
|
||||
libxml2-dev \
|
||||
libxrender-dev \
|
||||
lsb-release \
|
||||
mc \
|
||||
md5deep \
|
||||
nano \
|
||||
net-tools \
|
||||
ninja-build \
|
||||
ocl-icd-opencl-dev \
|
||||
p7zip-full \
|
||||
patchelf \
|
||||
python3 \
|
||||
screen \
|
||||
subversion \
|
||||
unzip \
|
||||
wget \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
|
||||
|
||||
apt-get install -y \
|
||||
qtmultimedia5-dev:$arch \
|
||||
qtbase5-private-dev:$arch \
|
||||
qttools5-private-dev:$arch \
|
||||
qtbase5-dev-tools \
|
||||
|
||||
|
||||
apt-get install -y \
|
||||
$toolchain \
|
||||
libbz2-dev:$arch \
|
||||
libffi-dev:$arch \
|
||||
libfontconfig1-dev:$arch \
|
||||
libfreetype6-dev:$arch \
|
||||
libfftw3-dev:$arch \
|
||||
libgl1-mesa-dev:$arch \
|
||||
libglew-dev:$arch \
|
||||
libglu1-mesa-dev:$arch \
|
||||
libgmp-dev:$arch \
|
||||
libicu-dev:$arch \
|
||||
liblzma-dev:$arch \
|
||||
libmpc-dev:$arch \
|
||||
libmpfr-dev:$arch \
|
||||
libncurses-dev:$arch \
|
||||
libpq-dev:$arch \
|
||||
libreadline-dev:$arch \
|
||||
libssl-dev:$arch \
|
||||
libusb-1.0-0-dev:$arch \
|
||||
libwayland-dev:$arch \
|
||||
libx11-dev:$arch \
|
||||
libx11-xcb-dev:$arch \
|
||||
libxkbcommon-dev:$arch \
|
||||
libxkbcommon-x11-dev:$arch \
|
||||
libxml2-dev:$arch \
|
||||
libxrender-dev:$arch \
|
||||
ocl-icd-opencl-dev:$arch \
|
||||
libsodium-dev:$arch \
|
||||
libassimp-dev:$arch \
|
||||
libmicrohttpd-dev:$arch \
|
||||
libhdf5-dev:$arch \
|
||||
libcurl4-openssl-dev:$arch \
|
||||
libpcsclite-dev:$arch \
|
||||
qtconnectivity5-dev:$arch \
|
||||
qtbase5-dev:$arch \
|
||||
qttools5-dev:$arch \
|
||||
qtscript5-dev:$arch \
|
||||
qtdeclarative5-dev:$arch \
|
||||
qtpositioning5-dev:$arch \
|
||||
libqt5datavisualization5-dev:$arch \
|
||||
libqt5networkauth5-dev:$arch \
|
||||
libqt5opengl5-dev:$arch \
|
||||
qtscript5-dev:$arch \
|
||||
libqt5serialport5-dev:$arch \
|
||||
libqt5serialbus5-dev:$arch \
|
||||
libqt5sensors5-dev:$arch \
|
||||
libqt5svg5-dev:$arch \
|
||||
libqt5websockets5-dev:$arch \
|
||||
libqt5x11extras5-dev:$arch \
|
||||
libqt5xmlpatterns5-dev:$arch \
|
||||
libqt5charts5-dev:$arch \
|
||||
|
||||
|
||||
apt-get install -y lzma-dev || true
|
||||
apt-get install -y python3-future || true
|
||||
apt-get install -y python3-click || true
|
||||
apt-get install -y python3-cryptography || true
|
||||
apt-get install -y python3-pip || true
|
||||
apt-get install -y python3-pyelftools || true
|
||||
apt-get install -y python3-pyparsing || true
|
||||
apt-get install -y python3-serial || true
|
||||
apt-get install -y python3-setuptools || true
|
||||
|
||||
apt-get install -y libopencv-dev:$arch
|
||||
|
||||
# cleanup
|
||||
rm -rf /var/cache/apt/archives/*
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
arch=$1
|
||||
toolchain=$2
|
||||
|
||||
cp -vf /soft/ubuntu.sources.24.04.arm64.sh /etc/apt/sources.list.d/ubuntu.sources
|
||||
|
||||
bash /soft/install_apt.sh $arch $toolchain
|
||||
@@ -0,0 +1,22 @@
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_PROCESSOR "${PH_ARCH}")
|
||||
set(TRIPLET "${PH_TRIPLET}")
|
||||
|
||||
set(TOOL_PREFIX "/usr/bin/${TRIPLET}")
|
||||
set(CMAKE_LIBRARY_ARCHITECTURE "${TRIPLET}")
|
||||
set(CMAKE_C_COMPILER "${TOOL_PREFIX}-gcc")
|
||||
set(CMAKE_CXX_COMPILER "${TOOL_PREFIX}-g++")
|
||||
set(CMAKE_RANLIB "${TOOL_PREFIX}-ranlib" CACHE FILEPATH "ranlib")
|
||||
set(CMAKE_AR "${TOOL_PREFIX}-ar" CACHE FILEPATH "ar")
|
||||
set(CMAKE_READELF "${TOOL_PREFIX}-readelf" CACHE FILEPATH "readelf")
|
||||
|
||||
list(APPEND CMAKE_PREFIX_PATH "/soft/target")
|
||||
set(CMAKE_FIND_ROOT_PATH "/usr/${TRIPLET}")
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY FIRST)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE FIRST)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE FIRST)
|
||||
set(PIP_BINDIR "/usr/local/bin")
|
||||
set(PIP_DEPLOY_LIBDIR "/usr/lib/${TRIPLET}")
|
||||
#include_directories("${CMAKE_PREFIX_PATH}/include" "${CMAKE_PREFIX_PATH}/include/${TRIPLET}")
|
||||
cmake_policy(SET CMP0025 NEW)
|
||||
@@ -0,0 +1,33 @@
|
||||
## See the sources.list(5) manual page for further settings.
|
||||
Types: deb
|
||||
URIs: http://mirror.yandex.ru/ubuntu/
|
||||
Suites: noble noble-updates noble-backports
|
||||
Components: main universe restricted multiverse
|
||||
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
|
||||
Architectures: amd64
|
||||
|
||||
## Ubuntu security updates. Aside from URIs and Suites,
|
||||
## this should mirror your choices in the previous section.
|
||||
Types: deb
|
||||
URIs: http://mirror.yandex.ru/ubuntu/
|
||||
Suites: noble-security
|
||||
Components: main universe restricted multiverse
|
||||
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
|
||||
Architectures: amd64
|
||||
|
||||
## See the sources.list(5) manual page for further settings.
|
||||
Types: deb
|
||||
URIs: http://mirror.yandex.ru/ubuntu-ports/
|
||||
Suites: noble noble-updates noble-backports
|
||||
Components: main universe restricted multiverse
|
||||
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
|
||||
Architectures: arm64
|
||||
|
||||
## Ubuntu security updates. Aside from URIs and Suites,
|
||||
## this should mirror your choices in the previous section.
|
||||
Types: deb
|
||||
URIs: http://mirror.yandex.ru/ubuntu-ports/
|
||||
Suites: noble-security
|
||||
Components: main universe restricted multiverse
|
||||
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
|
||||
Architectures: arm64
|
||||
Reference in New Issue
Block a user