Skip to content

Instantly share code, notes, and snippets.

@WorldSEnder
Created May 18, 2017 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WorldSEnder/dc453f59f92b84f0baa57e1dba0d315d to your computer and use it in GitHub Desktop.
Save WorldSEnder/dc453f59f92b84f0baa57e1dba0d315d to your computer and use it in GitHub Desktop.
HyPro build scripts
--- src/hypro/CMakeLists.txt 2017-05-18 02:45:40.075157748 +0200
+++ src/hypro/CMakeLists.txt 2017-05-18 03:05:58.791776366 +0200
@@ -87,7 +87,7 @@
cotire(${PROJECT_NAME})
-install(FILES ${headers} DESTINATION include)
+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h")
########################################################################################
Executed as
makepkg
makepkg -f
Only when the command is issued twice, the library is built without error.
hypro.patch: The patch file makes sure that the headers are installed in a way that upholds folder structure
pkgname=HyPro
pkgdesc="A C++ state set representation library for the analysis of hybrid systems"
url="https://github.com/hypro/hypro"
arch=("i686" "x86_64")
license=("mit")
depends=("gmp" "boost" "glpk" "carl")
makedepends=("make" "cmake")
conflicts=()
replaces=()
backup=()
source=("$pkgname::git+https://github.com/hypro/hypro.git" "hypro.patch")
pkgver=r2243.d23623d5
prepare() {
cd "$pkgname"
patch "src/hypro/CMakeLists.txt" < "${srcdir}/hypro.patch"
}
pkgver() {
cd "$pkgname"
( set -o pipefail
git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}
pkgrel=1
build() {
cd "$pkgname"
mkdir -p "build" && cd "build"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
make resources
( make || make )
}
check() {
cd "$pkgname/build"
( make test || make && make test )
}
package() {
cd "$pkgname/build"
make DESTDIR="$pkgdir/" install
cd "$pkgdir"
rm -r "home" || true # Remove mistakenly exported stuff
}
md5sums=('SKIP'
'fa5ed23ebfba3a901278f80cacb02899')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment