diff options
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | LICENSE | 28 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rwxr-xr-x | arm-mem.install | 16 |
4 files changed, 104 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d8f98c472a40 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = arm-mem-git + pkgdesc = ARM-accelerated versions of selected functions from string.h + pkgver = 22.3aee5f4 + pkgrel = 1 + url = https://github.com/bavison/arm-mem + install = arm-mem.install + arch = armv6h + arch = armv7 + license = BSD + makedepends = git + provides = libcofi_rpi-git + conflicts = libcofi_rpi-git + source = arm-mem::git://github.com/bavison/arm-mem.git + source = LICENSE + md5sums = SKIP + md5sums = 28d63fe2467e38160c025156d21e4e91 + +pkgname = arm-mem-git + diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000000..4f38ca4548a2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,28 @@ +/* +Copyright (c) 2013, Raspberry Pi Foundation +Copyright (c) 2013, RISC OS Open Ltd +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the copyright holder nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e7535ece27e6 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Jesse Jaara <gmail.com: jesse.jaara> + +# armv7h & armv6h +buildarch=20 + +pkgname=arm-mem-git +pkgver=22.3aee5f4 +pkgrel=1 +pkgdesc="ARM-accelerated versions of selected functions from string.h" +arch=('armv6h' 'armv7') +url="https://github.com/bavison/arm-mem" +license=('BSD') +makedepends=('git') +conflicts=('libcofi_rpi-git') +provides=('libcofi_rpi-git') +install=arm-mem.install +source=('arm-mem::git://github.com/bavison/arm-mem.git' + 'LICENSE') +md5sums=('SKIP' + '28d63fe2467e38160c025156d21e4e91') + +pkgver() { + cd "${srcdir}/arm-mem" + echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD) +} + +build() { + cd "${srcdir}/arm-mem" + + make +} + +package() { + cd "${srcdir}/arm-mem" + + mkdir -p "${pkgdir}/"{etc/profile.d,usr/lib,usr/share/licenses/arm-mem-git} + + cp "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/arm-mem-git/" + cp libarmmem.so "${pkgdir}/usr/lib/" +} + diff --git a/arm-mem.install b/arm-mem.install new file mode 100755 index 000000000000..03024b4cbbe6 --- /dev/null +++ b/arm-mem.install @@ -0,0 +1,16 @@ +post_install() { + echo "/usr/lib/libarmmem.so" >> /etc/ld.so.preload +} + +post_upgrade() { + touch /etc/ld.so.preload + grep -q "/usr/lib/libarmmem.so" /etc/ld.so.preload + if [[ $? -ne 0 ]]; then + post_install + fi +} + +pre_remove() { + sed '|/usr/lib/libarmmem.so|d' -i /etc/ld.so.preload +} + |