| 
									
										
										
										
											2024-09-26 07:41:57 +00:00
										 |  |  | FROM ubuntu:24.04 as base | 
					
						
							| 
									
										
										
										
											2018-12-22 09:19:09 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | RUN apt-get update  && \ | 
					
						
							| 
									
										
										
										
											2024-05-07 19:27:42 +12:00
										 |  |  |     apt-get dist-upgrade -y && \ | 
					
						
							| 
									
										
										
										
											2018-12-22 09:19:09 -08:00
										 |  |  |     apt-get install -y \ | 
					
						
							| 
									
										
										
										
											2024-01-05 22:03:43 +13:00
										 |  |  |     unzip \ | 
					
						
							| 
									
										
										
										
											2018-12-22 09:19:09 -08:00
										 |  |  |     git \ | 
					
						
							| 
									
										
										
										
											2024-01-05 22:03:43 +13:00
										 |  |  |     cmake \ | 
					
						
							|  |  |  |     autoconf \ | 
					
						
							| 
									
										
										
										
											2018-12-22 09:19:09 -08:00
										 |  |  |     libtool-bin \ | 
					
						
							| 
									
										
										
										
											2020-04-23 08:23:19 -07:00
										 |  |  |     openjdk-8-jdk \ | 
					
						
							| 
									
										
										
										
											2024-01-20 01:05:14 +13:00
										 |  |  |     wget && \ | 
					
						
							|  |  |  |     apt-get clean | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | FROM base as build | 
					
						
							| 
									
										
										
										
											2024-01-05 22:03:43 +13:00
										 |  |  | 
 | 
					
						
							|  |  |  | WORKDIR /android | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-07 15:05:29 +13:00
										 |  |  | # Scrape the manually curated Qt install from the previous build image | 
					
						
							| 
									
										
										
										
											2024-01-20 01:05:14 +13:00
										 |  |  | COPY --from=subsurface/android-build-container:5.15.1 /android/5.15.1 5.15.1 | 
					
						
							| 
									
										
										
										
											2018-12-22 09:19:09 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-24 09:14:28 -08:00
										 |  |  | # install, NDK and SDK there, plus the three files from the Subsurface | 
					
						
							|  |  |  | # sources that we need to get the prep routines to run | 
					
						
							| 
									
										
										
										
											2024-01-05 22:03:43 +13:00
										 |  |  | RUN wget https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip && \ | 
					
						
							|  |  |  |     unzip commandlinetools-linux-*.zip | 
					
						
							|  |  |  | ADD android-build-setup.sh variables.sh . | 
					
						
							| 
									
										
										
										
											2018-12-22 09:19:09 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-18 22:01:29 +00:00
										 |  |  | # run the build setup | 
					
						
							| 
									
										
										
										
											2024-01-05 22:03:43 +13:00
										 |  |  | RUN bash -x android-build-setup.sh | 
					
						
							| 
									
										
										
										
											2018-12-24 09:14:28 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | # clean up the files that we don't need to keep the container smaller | 
					
						
							| 
									
										
										
										
											2024-01-05 22:03:43 +13:00
										 |  |  | RUN rm -rf \ | 
					
						
							| 
									
										
										
										
											2020-11-18 22:01:29 +00:00
										 |  |  | 	   5*/android/lib/*x86* \ | 
					
						
							|  |  |  | 	   5*/android/doc \ | 
					
						
							|  |  |  | 	   5*/android/include/QtHelp \ | 
					
						
							|  |  |  | 	   5*/android/include/QtFbSupport \ | 
					
						
							|  |  |  | 	   5*/android/include/QtFontDatabaseSupport \ | 
					
						
							|  |  |  | 	   5*/android/include/QtNfc \ | 
					
						
							|  |  |  | 	   5*/android/include/QtPrintSupport \ | 
					
						
							|  |  |  | 	   5*/android/include/QtTest \ | 
					
						
							|  |  |  | 	   5*/android/include/QtXml \ | 
					
						
							|  |  |  | 	   5*/android/plugins/geoservices/libqtgeoservices_mapboxgl.so \ | 
					
						
							| 
									
										
										
										
											2024-01-05 22:03:43 +13:00
										 |  |  | 	   5*/android/lib/cmake/Qt5Test/Qt5TestConfig.cmake \ | 
					
						
							| 
									
										
										
										
											2020-11-18 22:01:29 +00:00
										 |  |  | 	   commandlinetools-linux-*.zip \ | 
					
						
							|  |  |  | 	   $( find platforms -name arch-mips -o -name arch-x86 ) \ | 
					
						
							|  |  |  | 	   toolchains/x86-* android-ndk*/toolchains/llvm/prebuilt/x86-* \ | 
					
						
							|  |  |  | 	   platforms/android-[12][2345678] \ | 
					
						
							|  |  |  | 	   platforms/android-21/arch-x86_64 \ | 
					
						
							|  |  |  | 	   ndk/*/sources/cxx-stl/llvm-libc++/libs/x* \ | 
					
						
							|  |  |  | 	   ndk/*/sources/cxx-stl/llvm-libc++/libs/*/*static* \ | 
					
						
							|  |  |  | 	   ndk/*/sources/cxx-stl/llvm-libc++/test \ | 
					
						
							|  |  |  | 	   ndk/*/sources/cxx-stl/llvm-libc++/utils \ | 
					
						
							|  |  |  | 	   ndk/*/sources/cxx-stl/llvmlibc++abi \ | 
					
						
							|  |  |  | 	   ndk/*/sources/cxx-stl/system \ | 
					
						
							|  |  |  | 	   ndk/*/sources/third_party \ | 
					
						
							|  |  |  | 	   ndk/*/sysroot/usr/lib \ | 
					
						
							|  |  |  | 	   build-tools/*/renderscript \ | 
					
						
							|  |  |  | 	   platform-tools/systrace \ | 
					
						
							|  |  |  | 	   tools/lib \ | 
					
						
							|  |  |  | 	   tools/proguard \ | 
					
						
							|  |  |  | 	   tools/support \ | 
					
						
							|  |  |  | 	   emulator \ | 
					
						
							|  |  |  | 	   platform-tools-2 \ | 
					
						
							|  |  |  | 	   variables.sh \ | 
					
						
							| 
									
										
										
										
											2024-01-05 22:03:43 +13:00
										 |  |  | 	   android-build-setup.sh \ | 
					
						
							|  |  |  | 	   /usr/lib/gcc | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-20 01:05:14 +13:00
										 |  |  | FROM base as final | 
					
						
							| 
									
										
										
										
											2024-01-05 22:03:43 +13:00
										 |  |  | 
 | 
					
						
							|  |  |  | RUN apt-get install -y \ | 
					
						
							|  |  |  |     autoconf \ | 
					
						
							|  |  |  |     automake \ | 
					
						
							|  |  |  |     cmake \ | 
					
						
							|  |  |  |     git \ | 
					
						
							|  |  |  |     make \ | 
					
						
							|  |  |  |     wget \ | 
					
						
							|  |  |  |     zip \ | 
					
						
							|  |  |  |     unzip \ | 
					
						
							|  |  |  |     python3 \ | 
					
						
							|  |  |  |     python3-pip \ | 
					
						
							|  |  |  |     bzip2 \ | 
					
						
							|  |  |  |     pkg-config \ | 
					
						
							|  |  |  |     libx11-xcb1 \ | 
					
						
							|  |  |  |     libglib2.0-0 \ | 
					
						
							|  |  |  |     openjdk-8-jdk \ | 
					
						
							|  |  |  |     curl \ | 
					
						
							|  |  |  |     coreutils \ | 
					
						
							|  |  |  |     p7zip-full && \ | 
					
						
							|  |  |  |     apt-get clean | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | WORKDIR /android | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | COPY --from=build /android/ . | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | RUN git config --global --add safe.directory /android/subsurface && \ | 
					
						
							| 
									
										
										
										
											2024-01-07 09:59:20 +13:00
										 |  |  |     git config --global --add safe.directory /android/subsurface/libdivecomputer && \ | 
					
						
							|  |  |  |     git config --global --add safe.directory /android/subsurface/nightly-builds |