diff options
author | J. Kim | 2019-01-03 18:29:48 +0900 |
---|---|---|
committer | J. Kim | 2019-01-03 18:32:40 +0900 |
commit | cf35188e263c65305ca805fa6ed2e926bd3c9275 (patch) | |
tree | fc59a512f39ccd5411c4e26814e361a10d1d0f59 | |
download | aur-cf35188e263c65305ca805fa6ed2e926bd3c9275.tar.gz |
Initial commit for HawkTracer
Signed-off-by: J. Kim <jeongseok.kim@sk.com>
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | 0001-build-Install-examples-into-DOC-directory.patch | 30 | ||||
-rw-r--r-- | PKGBUILD | 47 |
3 files changed, 96 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..791e4af0a5b6 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = hawktracer-git + pkgdesc = HawkTracer - a highly portable, low-overhead, configurable profiling tool (git version) + pkgver = 0.6.0.r59.ga90df7a + pkgrel = 1 + url = https://github.com/loganek/hawktracer + arch = i686 + arch = x86_64 + license = MIT + makedepends = git + makedepends = cmake + provides = hawktracer + conflicts = hawktracer + source = git+https://github.com/loganek/hawktracer.git + source = 0001-build-Install-examples-into-DOC-directory.patch + sha512sums = SKIP + sha512sums = b600931bb8e0ff40e6a4a16e80e7e32881f57491fc8bec8658cd863f3b42e3b73ee4c95912adaa0489b41df7681d9e7820b92b4601bcfaa7573b7578faa4b692 + +pkgname = hawktracer-git + diff --git a/0001-build-Install-examples-into-DOC-directory.patch b/0001-build-Install-examples-into-DOC-directory.patch new file mode 100644 index 000000000000..6ba3e3f57e47 --- /dev/null +++ b/0001-build-Install-examples-into-DOC-directory.patch @@ -0,0 +1,30 @@ +From 603daa59ef609950cb98bd1941457b2819ad5ff9 Mon Sep 17 00:00:00 2001 +From: "J. Kim" <jeongseok.kim@sk.com> +Date: Wed, 2 Jan 2019 20:58:40 +0900 +Subject: [PATCH] [build] Install examples into DOC directory + +${prefix}/examples is too general location. +--- + CMakeLists.txt | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3797b05..1dee6ea 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -90,7 +90,11 @@ endif(ENABLE_TESTS) + if(ENABLE_EXAMPLES) + add_subdirectory(examples) + endif(ENABLE_EXAMPLES) +-install(DIRECTORY examples DESTINATION .) ++if(WIN32 AND NOT CYGWIN) ++ install(DIRECTORY examples DESTINATION doc) ++else() ++ install(DIRECTORY examples DESTINATION share/doc/hawktracer) ++endif() + + if(ENABLE_BENCHMARKS) + add_subdirectory(benchmarks) +-- +2.20.1 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..964fcd5578e3 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: Justin Kim <justin.joy.9to5@gmail.com> + +pkgname=hawktracer-git +_srcname=hawktracer +pkgver=0.6.0.r59.ga90df7a +pkgrel=1 +pkgdesc='HawkTracer - a highly portable, low-overhead, configurable profiling tool (git version)' +arch=('i686' 'x86_64') +url='https://github.com/loganek/hawktracer' +license=('MIT') +makedepends=('git' 'cmake') +provides=('hawktracer') +conflicts=('hawktracer') +source=('git+https://github.com/loganek/hawktracer.git' + '0001-build-Install-examples-into-DOC-directory.patch') +sha512sums=('SKIP' + 'b600931bb8e0ff40e6a4a16e80e7e32881f57491fc8bec8658cd863f3b42e3b73ee4c95912adaa0489b41df7681d9e7820b92b4601bcfaa7573b7578faa4b692') + +pkgver() { + cd "$_srcname" + + # git, tags available + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//' +} + +prepare() { + cd "$_srcname" + patch -Np1 < ${srcdir}/0001-build-Install-examples-into-DOC-directory.patch +} + +build() { + cd "$_srcname" + + mkdir -p build + cd build + cmake \ + -DCMAKE_INSTALL_PREFIX:PATH='/usr' \ + .. + + cmake --build . +} + +package() { + cd "${_srcname}/build" + + make DESTDIR="$pkgdir" install +} |