summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2018-06-21 17:13:41 +0000
committerDaniel Bermond2018-06-21 18:57:03 +0000
commit7468ea269b51f130a7c538051f7d47f7fa2a2ae5 (patch)
treedfe1c9f07fb001bf89106314d10200361099d110
parent4fe145f050e6d277e473df5098f6f53fab7771cd (diff)
downloadaur-7468ea269b51f130a7c538051f7d47f7fa2a2ae5.tar.gz
Change runtool modules path. Change prefix assignment method.
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD43
-rw-r--r--intel-seapi-git-change-install-prefix.patch11
3 files changed, 38 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e4a21914b0ee..b7ab5cda6840 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = intel-seapi-git
pkgdesc = Intel Single Event API (Intel SEAPI) (git version)
pkgver = 17.01.28.r25.gf41831f
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/intel/IntelSEAPI/
arch = i686
arch = x86_64
@@ -13,7 +13,7 @@ pkgbase = intel-seapi-git
makedepends = java-environment
makedepends = classpath
depends = gcc-libs
- optdepends = python: for using runtool scripts
+ optdepends = python: for using runtool modules
provides = intel-seapi
provides = intel-ittnotify
provides = intel-ittnotify-git
@@ -21,7 +21,9 @@ pkgbase = intel-seapi-git
conflicts = intel-ittnotify
conflicts = intel-ittnotify-git
source = git+https://github.com/intel/IntelSEAPI.git
+ source = intel-seapi-git-change-install-prefix.patch
sha256sums = SKIP
+ sha256sums = 2b8b415490503e19bbd432b0dc958ca9b4ee154dcfd1e97642e3025a7d6c9d7e
pkgname = intel-seapi-git
diff --git a/PKGBUILD b/PKGBUILD
index babc5e223aec..42d780e77652 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,61 +1,64 @@
# Maintainer: Daniel Bermond < yahoo-com: danielbermond >
+_srcname=IntelSEAPI
pkgname=intel-seapi-git
pkgver=17.01.28.r25.gf41831f
-pkgrel=2
+pkgrel=3
pkgdesc='Intel Single Event API (Intel SEAPI) (git version)'
arch=('i686' 'x86_64')
url='https://github.com/intel/IntelSEAPI/'
license=('BSD' 'GPL')
depends=('gcc-libs')
makedepends=('git' 'python' 'cmake' 'java-environment' 'classpath')
-optdepends=('python: for using runtool scripts')
+optdepends=('python: for using runtool modules')
provides=('intel-seapi' 'intel-ittnotify' 'intel-ittnotify-git')
conflicts=('intel-seapi' 'intel-ittnotify' 'intel-ittnotify-git')
-source=('git+https://github.com/intel/IntelSEAPI.git')
-sha256sums=('SKIP')
+source=('git+https://github.com/intel/IntelSEAPI.git'
+ 'intel-seapi-git-change-install-prefix.patch')
+sha256sums=('SKIP'
+ '2b8b415490503e19bbd432b0dc958ca9b4ee154dcfd1e97642e3025a7d6c9d7e')
[ "$CARCH" = 'i686' ] && _architecture='32'
[ "$CARCH" = 'x86_64' ] && _architecture='64'
prepare() {
- cd "$pkgname"
-
- # set install prefix
- if ! grep -q "(\"\-DCMAKE_INSTALL_PREFIX:PATH='/usr'\"),$" buildall.py
- then
- local _unix_line="$(sed -n "/generator[[:space:]]=[[:space:]]'Unix[[:space:]]Makefiles'/=" buildall.py)"
-
- sed -i "$((_unix_line + 4))i\\ \\(\"-DCMAKE_INSTALL_PREFIX:PATH='/usr'\")," buildall.py
- fi
+ cd "$_srcname"
+
+ # change install prefix to '/usr' instead of '/usr/local'
+ patch -Np1 -i "${srcdir}/intel-seapi-git-change-install-prefix.patch"
}
pkgver() {
- cd "$pkgname"
+ cd "$_srcname"
# git, tags available
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//;s/,//'
}
build() {
- cd "$pkgname"
+ cd "$_srcname"
python ./buildall.py --force_bits "$_architecture"
}
package() {
- cd "${pkgname}/build_linux/${_architecture}"
+ cd "${_srcname}/build_linux/${_architecture}"
+
make DESTDIR="$pkgdir" install
+ # library
mv -f "${pkgdir}/usr/bin/libIntelSEAPI${_architecture}.so" "${pkgdir}/usr/lib"
- mkdir -p "${pkgdir}/usr/share/${pkgname}"
- mv -f "$pkgdir"/usr/runtool/* "${pkgdir}/usr/share/${pkgname}"
- rm -rf "${pkgdir}/usr/runtool"
+ # python
+ local _pythonver="$(python --version | sed 's/^Python[[:space:]]//' | grep -o '^[0-9]*\.[0-9]*')"
+ mkdir -p "${pkgdir}/usr/lib/python${_pythonver}/${pkgname%%-git}"
+ mv -f "$pkgdir"/usr/runtool/* "${pkgdir}/usr/lib/python${_pythonver}/${pkgname%%-git}"
+ # cleanup
+ rm -rf "${pkgdir}/usr/runtool"
rm -f "${pkgdir}/usr/README.txt"
# license
- cd "${srcdir}/${pkgname}/ittnotify/src/ittnotify"
+ cd "${srcdir}/${_srcname}/ittnotify/src/ittnotify"
install -D -m644 LICENSE.BSD "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.BSD"
}
diff --git a/intel-seapi-git-change-install-prefix.patch b/intel-seapi-git-change-install-prefix.patch
new file mode 100644
index 000000000000..688ea051f7be
--- /dev/null
+++ b/intel-seapi-git-change-install-prefix.patch
@@ -0,0 +1,11 @@
+diff -Naurp a/buildall.py b/buildall.py
+--- a/buildall.py 2018-06-21 17:17:32.000000000 +0000
++++ b/buildall.py 2018-06-21 17:18:30.671276905 +0000
+@@ -289,6 +289,7 @@ def main():
+ run_shell('%s "%s" -G"%s" %s' % (cmake, work_dir, generator, " ".join([
+ ("-DFORCE_32=ON" if bits == '32' else ""),
+ ("-DCMAKE_BUILD_TYPE=Debug" if args.debug else ""),
++ ("-DCMAKE_INSTALL_PREFIX:PATH='/usr'"),
+ ("-DYOCTO=1" if yocto else ""),
+ (('-DJDK="%s"' % jdk_path) if jdk_path else ""),
+ ('-DCO_PILOT=1' if perf_co_pilot else ""),