summaryrefslogtreecommitdiff
path: root/~lukeshu/not-working/codeanalyst/PKGBUILD
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-07-06 18:31:18 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-07-06 18:31:18 -0600
commit55677d14e4829d6a7859333d3560db346c228fdf (patch)
tree1e8d9fd82cd459b95a1968005f9f397773cdfac6 /~lukeshu/not-working/codeanalyst/PKGBUILD
parente7cffdc291186ce0e021c7595bb5f33298c9734f (diff)
downloadabslibre-55677d14e4829d6a7859333d3560db346c228fdf.tar.gz
abslibre-55677d14e4829d6a7859333d3560db346c228fdf.tar.bz2
abslibre-55677d14e4829d6a7859333d3560db346c228fdf.zip
Revert fauno deleting everything. The actual changes he made are:
- delete pcr/ruby-haml/ruby-yard (improperly nested) - update pcr/transmission-remote-cli - update social/asterisk
Diffstat (limited to '~lukeshu/not-working/codeanalyst/PKGBUILD')
-rw-r--r--~lukeshu/not-working/codeanalyst/PKGBUILD91
1 files changed, 91 insertions, 0 deletions
diff --git a/~lukeshu/not-working/codeanalyst/PKGBUILD b/~lukeshu/not-working/codeanalyst/PKGBUILD
new file mode 100644
index 000000000..885e06f0e
--- /dev/null
+++ b/~lukeshu/not-working/codeanalyst/PKGBUILD
@@ -0,0 +1,91 @@
+# Maintainer (Parabola): Luke Shumaker <lukeshu@sbcglobal.net>
+# Maintainer (AUR): Felipe Bugno <capent@yahoo.com>
+
+# A note about the oprofile fork:
+# The docs claim that the fork is just for adding support for
+# processors that aren't upstream yet (at the time, they are now that
+# 0.9.7 is out). So, shouldn't we just link against 0.9.7? Well:
+# * AMD also added a bunch of CodeAnalyst-specific code.
+# * Several external variables/types have different names; the API is
+# incompatible.
+# * [extra]/oprofile-0.9.7-3 only includes about half of the headers.
+
+pkgbase=CodeAnalyst
+pkgname=(codeanalyst codeanalyst-cakm)
+pkgver=3.3.18.0361
+_pkgver="${pkgver//./_}"
+pkgrel=4.1
+pkgdesc="AMD performance profiler. Includes a fork of oprofile."
+url="http://developer.amd.com/tools/${pkgbase}/"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('gcc' 'qt>=4.1' 'libdwarf')
+makedepends=('linux-headers' 'elfutils' 'findutils' 'file')
+options=('!strip')
+install=codeanalyst.install
+source=("http://download2-developer.amd.com/amd/${pkgbase}/${pkgbase}${_pkgver}Public.tar.gz"
+ 'gcc47.patch'
+ 'skipSetup.patch'
+ 'kernel3.4.patch'
+ 'codeanalyst.sudo'
+ 'codeanalyst.desktop'
+ 'codeanalyst.svg')
+
+build() {
+ build_codeanalyst
+ build_codeanalyst-cakm
+}
+
+build_codeanalyst() {
+ cd "${srcdir}/${pkgbase}-${_pkgver}-Public"
+ patch -Np1 -i "${srcdir}/gcc47.patch"
+ patch -Np1 -i "${srcdir}/skipSetup.patch"
+ rm -rf src/dwarf-* # easiest way to ensure using the system install
+
+ ./autogen.sh
+ ./configure --prefix=/usr \
+ --with-libdwarf-includes=/usr/include/libdwarf \
+ --with-libdwarf-libraries=/usr/lib
+ make
+}
+
+build_codeanalyst-cakm() {
+ cd "${srcdir}/${pkgbase}-${_pkgver}-Public"/src/cakm
+ cp -r kernel2.6.38 kernel3.4
+ cd kernel3.4
+ patch -Np1 -i "${srcdir}/kernel3.4.patch"
+ make
+}
+
+package_codeanalyst() {
+ provides=('oprofile=0.9.6cvs')
+ conflicts=('oprofile')
+
+ cd "${srcdir}/${pkgbase}-${_pkgver}-Public"
+ make DESTDIR="${pkgdir}" install
+ rm -f "${pkgdir}/usr/sbin/ca_user_manager" # either codeanalyst.install does this, or it is trivial
+
+ find "${pkgdir}"/usr/{bin,sbin} -type f -exec file '{}' +|sed -n 's/:\s*ELF .*//p'|xargs strip
+
+ cd "${srcdir}"
+ install -D -m644 codeanalyst.sudo "${pkgdir}/etc/sudoers.d/codeanalyst"
+ install -D -m644 codeanalyst.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/codeanalyst.svg"
+ install -D -m644 codeanalyst.desktop "${pkgdir}/usr/share/applications/codeanalyst.desktop"
+}
+
+package_codeanalyst-cakm() {
+ pkgdesc="CodeAnalyst kernel module, oprofile-ca.ko, a replacement for oprofile.ko"
+ depends=(codeanalyst)
+ provides=()
+
+ cd "${srcdir}/${pkgbase}-${_pkgver}-Public"/src/cakm/kernel3.4
+ install -D -m644 oprofile.ko "${pkgdir}/lib/modules/`uname -r`/kernel/arch/x86/oprofile/oprofile-ca.ko"
+}
+
+md5sums=('f1e29bc7c7da259df228ce59281ee1d7'
+ '063d0fc9680641a92ce5e310ffe1c9c0'
+ 'ce549e59c4a5916fd19e8d085e863627'
+ '3a5d820a43a0360d561bb0c4d67d9735'
+ '3cc8f64fe84c5a886d0172ee8d99f690'
+ '3a18d3f7fb01f199a8ed5ae2908c18e4'
+ '1822a4157b82904b82e72fc1e9bcbd42')