2020-10-19 12:44:37 +00:00
name : opendronemap
adopt-info : odm
2020-11-05 23:00:39 +00:00
grade : stable
2020-10-19 12:44:37 +00:00
confinement : strict
2020-11-05 22:47:49 +00:00
base : core20
2020-10-19 12:44:37 +00:00
summary : Command line toolkit for processing aerial drone imagery
description : >
An open source command line toolkit for processing aerial drone imagery. ODM turns simple 2D images into :
* Classified Point Clouds
* 3D Textured Models
* Georeferenced Orthorectified Imagery
* Georeferenced Digital Elevation Models
The application is available for Windows, Mac and Linux and it works from the command line, making it ideal for power users, scripts and for integration with other software.
# The UbuntuGIS PPA only has i386 and amd64 packages so we can't build any
# other architectures. Therefore let's limit to those here.
architectures :
- build-on : i386
run-on : i386
- build-on : amd64
run-on : amd64
package-repositories :
- type : apt
ppa : ubuntugis/ubuntugis-unstable
parts :
2020-11-02 18:35:32 +00:00
prereqs :
source : .
plugin : nil
build-packages :
- build-essential
- cmake
- gdal-bin
2020-11-05 22:47:49 +00:00
- gfortran # to build scipy
2020-11-02 18:35:32 +00:00
- git
- libboost-log-dev
- libgdal-dev
- libgeotiff-dev
- libjsoncpp-dev
- libssl-dev
2020-11-05 17:31:44 +00:00
- libusb-1.0-0-dev
2020-11-02 18:35:32 +00:00
- ninja-build
- pkg-config
- python3-dev
- python3-gdal
- python3-pip
- python3-setuptools
- python3-wheel
- rsync
- swig3.0
stage-packages :
- gdal-bin
2020-11-05 22:47:49 +00:00
- libboost-log1.71.0
2020-11-02 18:35:32 +00:00
- libgdal26
- libgeotiff5
- libjsoncpp1
- libspqr2
- libssl1.1
2020-11-05 17:31:44 +00:00
- libusb-1.0-0
2021-09-03 14:59:46 +00:00
- proj-data
2020-11-02 18:35:32 +00:00
- procps
2020-11-13 01:58:44 +00:00
- python3
- python3-distutils
2020-11-02 18:35:32 +00:00
- python3-gdal
2020-11-13 01:58:44 +00:00
- python3-pkg-resources # required base package for core20
- python3-requests # required base package for core20
2020-11-02 18:35:32 +00:00
- python3-setuptools
stage :
# remove deb-based numpy because it conflicts with our pip-installed version
- -usr/lib/python3/dist-packages/numpy
opencv :
source : .
plugin : nil
build-packages :
- libavcodec-dev
- libavformat-dev
- libeigen3-dev
- libflann-dev
- libgtk2.0-dev
- libjpeg-dev
- liblapack-dev
2020-11-05 22:47:49 +00:00
- libopenjpip7
2020-11-02 18:35:32 +00:00
- libpng-dev
- libproj-dev
- libswscale-dev
- libtbb-dev
- libtiff-dev
- libxext-dev
2020-11-05 22:47:49 +00:00
- proj-bin
2020-11-02 18:35:32 +00:00
stage-packages :
2020-11-05 22:47:49 +00:00
- libavcodec58
- libavformat58
2020-11-02 18:35:32 +00:00
- libflann1.9
- libgtk2.0-0
- libjpeg-turbo8
2020-11-05 22:47:49 +00:00
- libopenjpip7
2020-11-02 18:35:32 +00:00
- liblapack3
- libpng16-16
- libproj19
2020-11-05 22:47:49 +00:00
- libswscale5
2020-11-02 18:35:32 +00:00
- libtbb2
- libtiff5
2020-11-07 01:47:34 +00:00
- libwebpdemux2
2020-11-02 18:35:32 +00:00
- libxext6
2020-11-02 21:26:48 +00:00
openmvs :
source : .
plugin : nil
build-packages :
- libcgal-dev
- libboost-program-options-dev
2020-11-02 21:42:51 +00:00
stage-packages :
2020-11-05 22:47:49 +00:00
- libboost-program-options1.71.0
2020-11-02 18:35:32 +00:00
opensfm :
source : .
plugin : nil
build-packages :
- libboost-date-time-dev
- libboost-filesystem-dev
- libboost-iostreams-dev
- libboost-python-dev
- libboost-regex-dev
2020-11-05 22:47:49 +00:00
- libboost-serialization-dev
- libboost-system-dev
2020-11-02 18:35:32 +00:00
- libboost-thread-dev
2021-05-16 15:41:13 +00:00
- libgoogle-glog-dev
2020-11-02 18:35:32 +00:00
- libsuitesparse-dev
stage-packages :
- libamd2
2020-11-05 22:47:49 +00:00
- libboost-date-time1.71.0
- libboost-filesystem1.71.0
- libboost-iostreams1.71.0
- libboost-python1.71.0
- libboost-regex1.71.0
- libboost-serialization1.71.0
- libboost-system1.71.0
- libboost-thread1.71.0
2020-11-02 18:35:32 +00:00
- libcamd2
- libccolamd2
- libcholmod3
- libcolamd2
- libcxsparse3
2021-05-16 15:41:13 +00:00
- libgoogle-glog0v5
2020-11-02 18:35:32 +00:00
- libsuitesparseconfig5
2020-10-19 12:44:37 +00:00
odm :
2020-11-02 18:35:32 +00:00
after :
- prereqs
- opencv
- opensfm
2020-11-02 21:26:48 +00:00
- openmvs
2020-10-19 12:44:37 +00:00
source : .
plugin : nil # We will script everything ourselves
build-environment :
# Set Python location to build host's system so that we can
# use system libraries while building the Snap Package
- PYTHONHOME : /usr
# Set the location for pip to install requirements into inside
# the Snap package
- PYTHONUSERBASE : $SNAPCRAFT_PART_INSTALL
override-build : |
snapcraftctl set-version $(cat VERSION)
2020-11-29 20:44:32 +00:00
# Portable build
test -f /usr/bin/gcc_real || mv -v /usr/bin/gcc /usr/bin/gcc_real
test -f /usr/bin/gcc || cp -v ./docker/gcc /usr/bin/gcc
test -f /usr/bin/g++_real || mv -v /usr/bin/g++ /usr/bin/g++_real
test -f /usr/bin/g++ || cp -v ./docker/g++ /usr/bin/g++
2020-10-19 12:44:37 +00:00
pip3 install --user -r requirements.txt
# Build the SuperBuild libraries
mkdir -p SuperBuild/build
cd SuperBuild/build
cmake -G Ninja ..
cmake --build . --parallel 1
rsync -av --exclude .git \
$SNAPCRAFT_PART_BUILD/ $SNAPCRAFT_PART_INSTALL/odm/
chmod -R u=rwX,go=rX $PYTHONUSERBASE/lib/python*
stage :
2020-11-02 18:35:32 +00:00
# strip the temporary build files and sources
2021-04-28 20:06:27 +00:00
- -odm/SuperBuild/build
2020-10-19 12:44:37 +00:00
- -odm/SuperBuild/download
2021-04-28 20:06:27 +00:00
- -odm/SuperBuild/src
2020-10-19 12:44:37 +00:00
prime :
# remove any static-libraries
- -**/*.a
# remove any header files
- -**/*.h
# remove any left-over temporary compiled 'object' files
- -**/*.o
build-snaps :
- cmake
snap-specifics :
source : snap/local
plugin : dump
snapcraft-preload :
source : https://github.com/sergiusens/snapcraft-preload.git
plugin : cmake
2020-11-13 01:58:44 +00:00
cmake-parameters :
- -DCMAKE_INSTALL_PREFIX=/
2020-10-19 12:44:37 +00:00
build-packages :
- on amd64 :
- gcc-multilib
- g++-multilib
apps :
opendronemap :
command : odm/run.sh
command-chain :
2020-11-13 01:58:44 +00:00
- bin/snapcraft-preload # Fixes multiprocessing python module
environment :
# Ensure libraries are found
LD_LIBRARY_PATH : $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/blas:$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/lapack:$LD_LIBRARY_PATH
2020-10-19 12:44:37 +00:00
plugs :
- home
- network
- network-bind
- removable-media