diff options
author | Score_Under | 2016-05-01 17:26:07 +0100 |
---|---|---|
committer | Score_Under | 2016-05-01 17:31:06 +0100 |
commit | 90a4098f8cb8ed095cc1764d7b0a5f34637abcd0 (patch) | |
tree | 8ab53e33e2c7e45bbc9fa61baad9f46ed0daceb6 | |
parent | a76e5bece0c28a3f9c9edffa0880bf713b9ff873 (diff) | |
download | aur-90a4098f8cb8ed095cc1764d7b0a5f34637abcd0.tar.gz |
Patch things around again to get them working
- Set cmake install prefix correctly
- Use /usr/lib instead of /usr/share for native libraries
- Change wrapper script to reflect change of path
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 22 | ||||
-rwxr-xr-x | ksm-wrapper | 6 |
3 files changed, 24 insertions, 10 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Sun May 1 15:13:32 UTC 2016 +# Sun May 1 16:31:02 UTC 2016 pkgbase = ksm_preload-git pkgdesc = Library which allows legacy applications to use Kernel Same-page Merging pkgver = 0.10.8.rfa46b5c - pkgrel = 1 + pkgrel = 2 url = http://vleu.net/ksm_preload/ arch = i686 arch = x86_64 @@ -13,7 +13,7 @@ pkgbase = ksm_preload-git source = git+https://github.com/unbrice/ksm_preload.git source = ksm-wrapper sha256sums = SKIP - sha256sums = 348c6c707eef3f6efed5896492faa6482ad8fe964a0eab8eec8fec1217069610 + sha256sums = 19d1d6f701415d4643297c3c789b4d94f062d67a178e5a9e332ed5877d161d89 pkgname = ksm_preload-git @@ -2,7 +2,7 @@ _pkgname=ksm_preload pkgname=$_pkgname-git pkgver=0.10.8.rfa46b5c -pkgrel=1 +pkgrel=2 pkgdesc='Library which allows legacy applications to use Kernel Same-page Merging' url=http://vleu.net/ksm_preload/ arch=(i686 x86_64) @@ -12,7 +12,7 @@ source=("git+https://github.com/unbrice/$_pkgname.git" optdepends=('sh: ksm-wrapper script') makedepends=(cmake) sha256sums=('SKIP' - '348c6c707eef3f6efed5896492faa6482ad8fe964a0eab8eec8fec1217069610') + '19d1d6f701415d4643297c3c789b4d94f062d67a178e5a9e332ed5877d161d89') cdgit() { cd -- "$_pkgname"; } @@ -25,14 +25,28 @@ pkgver() { printf '%s\n' "$version" } +prepare() { + cdgit + + # Use (/usr)/lib/ksm_preload rather than (/usr)/share for native + # libraries, because /usr/share is supposed to be arch-independent... + # This will still need a little hacking of ksm-wrapper to get it + # working with lib32 programs too. + sed -i.orig 's.\(LIBRARY DESTINATION\) share/.\1 lib/.g' CMakeLists.txt +} + build() { cdgit - cmake . + cmake -D CMAKE_INSTALL_PREFIX=/usr . make } package() { - install -m755 -Dt "$pkgdir/usr/bin" ksm-wrapper cdgit make install DESTDIR="$pkgdir" + + # Install replacement ksm-wrapper afterwards + # The original is unnecessarily complex and is full of silly mistakes. + # I will one day get around to poking the author about that... + install -m755 -Dt "$pkgdir/usr/bin" ../ksm-wrapper } diff --git a/ksm-wrapper b/ksm-wrapper index f5618c2cabc1..e410957a2459 100755 --- a/ksm-wrapper +++ b/ksm-wrapper @@ -1,8 +1,8 @@ #!/bin/sh -# Rewrite of ksm-wrapper to work in /usr/bin -sofile=libksm_preload.so +# Rewrite of ksm-wrapper to use /usr/lib +sofile=/usr/lib/ksm_preload/libksm_preload.so case " $LD_PRELOAD " in - (*" $sofile "*) ;; + (*[: ]"$sofile"[: ]*) ;; (*) LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD }$sofile" export LD_PRELOAD;; esac |