summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBidski2021-09-01 12:16:40 +1000
committerBidski2021-09-01 12:21:30 +1000
commit03010f4419285e5fb4024cd4d4bbfd0400ce3672 (patch)
tree7deba35f2194aca22e7838f263ba5c6c18a95f00
downloadaur-03010f4419285e5fb4024cd4d4bbfd0400ce3672.tar.gz
Adds NUClear package
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD52
2 files changed, 73 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..287ce5e41f8f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = nuclear-git
+ pkgdesc = NUClear is a C++ software framework designed to aid in the development of real time modular systems.
+ pkgver = r890.f4a60c7
+ pkgrel = 1
+ url = https://github.com/Fastcode/NUClear
+ arch = x86_64
+ arch = i686
+ groups = devel
+ license = MIT
+ makedepends = git
+ makedepends = make
+ makedepends = cmake>=3.1,
+ makedepends = gcc>=4.9
+ optdepends = python-sphinx: documentation
+ optdepends = doxygen: documentation
+ provides = nuclear
+ conflicts = nuclear
+ source = nuclear::git+https://github.com/Fastcode/NUClear.git#branch=master
+ md5sums = SKIP
+
+pkgname = nuclear-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6ea902ca4704
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Bidski <bidskii at gmail dot com>
+_pkgname=nuclear
+pkgname=${_pkgname}-git
+pkgver=r890.f4a60c7
+pkgrel=1
+pkgdesc="NUClear is a C++ software framework designed to aid in the development of real time modular systems."
+arch=('x86_64' 'i686')
+url="https://github.com/Fastcode/NUClear"
+license=('MIT')
+groups=('devel')
+makedepends=('git' 'make' 'cmake>=3.1', 'gcc>=4.9')
+optdepends=('python-sphinx: documentation' 'doxygen: documentation')
+provides=("${_pkgname}")
+conflicts=("${_pkgname}")
+source=("${_pkgname}"::'git+https://github.com/Fastcode/NUClear.git#branch=master')
+md5sums=('SKIP')
+# Check for optional dependencies
+_installed_pkgs=$(pacman -Qq)
+_sphinx_installed=$(echo "${_installed_pkgs}" | grep "python-sphinx" > /dev/null ; echo $?)
+_doxygen_installed=$(echo "${_installed_pkgs}" | grep "doxygen" > /dev/null ; echo $?)
+pkgver() {
+ cd "${srcdir}/${_pkgname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+build() {
+ cd "${srcdir}/${_pkgname}"
+ # Check to see if we should build documentation
+ optional_args="-DBUILD_DOCUMENTATION=OFF"
+ if [[ ( "${_sphinx_installed}" == 0 ) && ( "${_doxygen_installed}" == 0 ) ]];
+ then
+ optional_args="-DBUILD_DOCUMENTATION=ON"
+ fi
+ echo "${optional_args}" "${_sphinx_installed}" "${_doxygen_installed}"
+ mkdir -p build && cd build
+ cmake .. -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_TESTS=ON \
+ ${optional_args}
+ make
+}
+check() {
+ cd "${srcdir}/${_pkgname}/build"
+ ./tests/test_nuclear
+}
+package() {
+ cd "${srcdir}/${_pkgname}/build"
+ make DESTDIR="${pkgdir}/" install
+ cd "${srcdir}/${_pkgname}"
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
+}
+