summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Nudelman2020-03-20 13:54:43 +0200
committerYuri Nudelman2020-03-20 13:54:43 +0200
commitb648178418b1779ebb70eeb058521db022cb6e02 (patch)
tree8f115fc77fcbd9819b6fedfe701f3e979e16103e
downloadaur-b648178418b1779ebb70eeb058521db022cb6e02.tar.gz
Initial commit
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD51
2 files changed, 71 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..15951e349618
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = crash-lzo-git
+ pkgdesc = Linux kernel crashdump analysis tool with lzo
+ pkgver = 7.2.8.r7.g007f844
+ pkgrel = 1
+ url = https://github.com/crash-utility/crash
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = git
+ makedepends = wget
+ depends = lzo
+ depends = xz
+ depends = ncurses
+ depends = zlib
+ conflicts = crash
+ source = git+https://github.com/crash-utility/crash
+ md5sums = SKIP
+
+pkgname = crash-lzo-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7f51ba78ef12
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: Yuri Nudelman <yuranu@gmail.com>
+pkgname=crash-lzo-git
+pkgver=7.2.8.r7.g007f844
+pkgrel=1
+pkgdesc="Linux kernel crashdump analysis tool with lzo"
+arch=('i686' 'x86_64')
+url="https://github.com/crash-utility/crash"
+license=('GPL')
+makedepends=('git' 'wget')
+depends=('lzo' 'xz' 'ncurses' 'zlib')
+conflicts=('crash')
+source=('git+https://github.com/crash-utility/crash')
+md5sums=('SKIP')
+
+pkgver() {
+ cd crash
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd crash
+ # Crash makefile will use wget to grab sources of gdb in compile time
+ # So we may come 2 this point with a couple of error states:
+ # 1. Sources archive partially validated
+ # 2. Sources archive partially extracted
+ # Download is pretty long, so wouldn't want to do it if not needed, so check tar validity
+ # and re-download in case of a problem.
+ # For the extract, there is no <good> way to verify it, reextract.
+ if ls gdb-*.tar.gz >/dev/null 2>/dev/null ; then
+ if ! tar -tvf gdb-*.tar.gz >/dev/null 2>/dev/null ; then
+ echo 'Found broken gdb download, deleting'
+ rm gdb-*.tar.gz
+ else
+ echo 'Found valid gdb download, validating extract'
+ tar -xvf gdb-*.tar.gz
+ fi
+ fi
+}
+
+build() {
+ cd crash
+ CPPFLAGS="$CPPFLAGS -O2" make lzo
+}
+
+package() {
+ cd crash
+ mkdir -p "$pkgdir"/usr/bin "$pkgdir"/usr/share/man/man8 "$pkgdir"/usr/include/crash/
+ install crash "$pkgdir"/usr/bin/
+ install crash.8 "$pkgdir"/usr/share/man/man8/
+ install defs.h "$pkgdir"/usr/include/crash/
+}