summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authoracxz2020-01-26 18:49:52 -0500
committeracxz2020-01-26 18:49:52 -0500
commit81606c8a9401bc00b18e5aaeb9ef0b29d4626573 (patch)
treef30a0349cc334fc796267a56cecc673e2f7f3d6b
downloadaur-81606c8a9401bc00b18e5aaeb9ef0b29d4626573.tar.gz
create airsim package
-rw-r--r--.SRCINFO19
-rw-r--r--CMakeLists.patch67
-rw-r--r--PKGBUILD53
3 files changed, 139 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..705bd13bf455
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = airsim
+ pkgdesc = Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
+ pkgver = 1.2.2
+ pkgrel = 1
+ url = https://microsoft.github.io/AirSim
+ arch = x86_64
+ license = MIT
+ makedepends = cmake
+ makedepends = gcc
+ depends = unreal-engine
+ depends = rpclib
+ depends = eigen
+ source = https://github.com/microsoft/AirSim/archive/v.1.2.2.tar.gz
+ source = CMakeLists.patch
+ sha256sums = 5fca7fc84bd3b90d05a8c7739f6379a874fb727612c462a68b2becae0822ea86
+ sha256sums = 2c57560538b9f284308e9dc7f782497b4d2473493e7f0aae50475c82ff99d4de
+
+pkgname = airsim
+
diff --git a/CMakeLists.patch b/CMakeLists.patch
new file mode 100644
index 000000000000..36ec2768a7e1
--- /dev/null
+++ b/CMakeLists.patch
@@ -0,0 +1,67 @@
+diff -ruN AirSim-v.1.2.2/cmake/AirLib/CMakeLists.txt airsim-patch/cmake/AirLib/CMakeLists.txt
+--- AirSim-v.1.2.2/cmake/AirLib/CMakeLists.txt 2020-01-26 18:40:04.078962761 -0500
++++ airsim-patch/cmake/AirLib/CMakeLists.txt 2020-01-26 18:39:45.758814458 -0500
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 3.5.0)
+ project(AirLib)
+
+-LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake-modules")
++LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../cmake-modules")
+ INCLUDE("${CMAKE_CURRENT_LIST_DIR}/../cmake-modules/CommonSetup.cmake")
+ CommonSetup()
+
+@@ -14,7 +14,7 @@
+ ${RPC_LIB_INCLUDES}
+ )
+
+-file(GLOB_RECURSE ${PROJECT_NAME}_sources
++file(GLOB_RECURSE ${PROJECT_NAME}_sources
+ ${AIRSIM_ROOT}/${PROJECT_NAME}/src/api/*.cpp
+ ${AIRSIM_ROOT}/${PROJECT_NAME}/src/common/common_utils/*.cpp
+ ${AIRSIM_ROOT}/${PROJECT_NAME}/src/safety/*.cpp
+@@ -28,6 +28,7 @@
+ CommonTargetLink()
+ target_link_libraries(${PROJECT_NAME} ${RPC_LIB})
+ target_link_libraries(${PROJECT_NAME} MavLinkCom)
++target_link_libraries(${PROJECT_NAME} Eigen3::Eigen)
+
+ #string(SUBSTRING ${CMAKE_STATIC_LINKER_FLAGS} 9 -1 "BUILD_PLATFORM")
+ #find_package(Threads REQUIRED)
+diff -ruN AirSim-v.1.2.2/cmake/CMakeLists.txt airsim-patch/cmake/CMakeLists.txt
+--- AirSim-v.1.2.2/cmake/CMakeLists.txt 2020-01-26 18:40:04.078962761 -0500
++++ airsim-patch/cmake/CMakeLists.txt 2020-01-26 18:39:45.758814458 -0500
+@@ -1,10 +1,10 @@
+ cmake_minimum_required(VERSION 3.5.0)
+ project(AirSim)
+
+-add_subdirectory("rpclib_wrapper")
++#add_subdirectory("rpclib_wrapper")
+ add_subdirectory("AirLib")
+ add_subdirectory("MavLinkCom")
+-add_subdirectory("AirLibUnitTests")
++#add_subdirectory("AirLibUnitTests")
+ add_subdirectory("HelloDrone")
+ add_subdirectory("HelloCar")
+ add_subdirectory("DroneShell")
+diff -ruN AirSim-v.1.2.2/cmake/cmake-modules/CommonSetup.cmake airsim-patch/cmake/cmake-modules/CommonSetup.cmake
+--- AirSim-v.1.2.2/cmake/cmake-modules/CommonSetup.cmake 2020-01-26 18:40:04.078962761 -0500
++++ airsim-patch/cmake/cmake-modules/CommonSetup.cmake 2020-01-26 18:39:45.762147818 -0500
+@@ -6,7 +6,9 @@
+ endmacro(CommonTargetLink)
+
+ macro(IncludeEigen)
+- include_directories(${AIRSIM_ROOT}/AirLib/deps/eigen3)
++ #include_directories(${AIRSIM_ROOT}/AirLib/deps/eigen3)
++ find_package(Eigen3 REQUIRED)
++ include_directories(${Eigen_INCLUDE_DIRS})
+ endmacro(IncludeEigen)
+
+ macro(AddExecutableSource)
+@@ -66,6 +68,7 @@
+ -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wstrict-overflow=5 -Wswitch-default -Wundef \
+ -Wno-variadic-macros -Wno-parentheses -Wno-unused-function -Wno-unused -Wno-documentation -fdiagnostics-show-option \
+ -pthread \
++ -fpermissive \
+ ${RPC_LIB_DEFINES} ${CMAKE_CXX_FLAGS}")
+
+ if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..54fb7e48dd32
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: acxz <akashpatel2008 at yahoo dot com>
+pkgname=airsim
+pkgver=1.2.2
+pkgrel=1
+pkgdesc="Open source simulator for autonomous vehicles built on Unreal Engine /
+Unity, from Microsoft AI & Research"
+url="https://microsoft.github.io/AirSim"
+arch=(x86_64)
+license=('MIT')
+depends=(unreal-engine rpclib eigen)
+makedepends=(cmake gcc)
+_pkgname=AirSim
+source=("https://github.com/microsoft/AirSim/archive/v.$pkgver.tar.gz"
+ "CMakeLists.patch")
+sha256sums=("5fca7fc84bd3b90d05a8c7739f6379a874fb727612c462a68b2becae0822ea86"
+ "2c57560538b9f284308e9dc7f782497b4d2473493e7f0aae50475c82ff99d4de")
+
+prepare() {
+ #mv CMakeLists.patch ${srcdir}
+ patch -s -p0 < CMakeLists.patch || return 1
+}
+
+build() {
+ mkdir -p "$srcdir/${_pkgname}-v.${pkgver}/cmake/build"
+ cd "$srcdir/${_pkgname}-v.${pkgver}/cmake/build"
+ cmake -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX="$pkgdir/opt" \
+ ..
+ make
+}
+
+package() {
+ cd "$srcdir/${_pkgname}-v.${pkgver}/cmake/build"
+
+ msg "Installing files"
+
+ # AirLib
+ mkdir -p ${pkgdir}/opt/airsim/AirLib/lib/x64/Release
+ cp output/lib/libAirLib.a ${pkgdir}/opt/airsim/AirLib/lib
+ cp -r output/lib/ ${pkgdir}/opt/airsim/AirLib/lib/x64/Release
+
+ # MavLinkCom
+ mkdir -p ${pkgdir}/opt/airsim/AirLib/deps/MavLinkCom/lib
+ cp output/lib/libMavLinkCom.a ${pkgdir}/opt/airsim/AirLib/deps/MavLinkCom/lib
+ cp -r ../../MavLinkCom/include ${pkgdir}/opt/airsim/AirLib/deps/MavLinkCom
+
+ # Unreal
+ mkdir -p ${pkgdir}/opt/airsim/Unreal/Plugins/AirSim/Source
+ cp -r ../../AirLib ${pkgdir}/opt/airsim/Unreal/Plugins/AirSim/Source
+ mkdir -p ${pkgdir}/opt/airsim/Unreal/Environments/Blocks/Plugins
+ cp -r ../../Unreal/Plugins/AirSim ${pkgdir}/opt/airsim/Unreal/Environments/Blocks/Plugins
+
+}