summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Poulin2015-06-09 23:04:28 -0400
committerMaxime Poulin2015-06-09 23:04:28 -0400
commitb41141c5ce3d8fb25a710ef96016da279cc05126 (patch)
tree3a08341681cd23e525217154ef2fe2c8ae6086a2
downloadaur-b41141c5ce3d8fb25a710ef96016da279cc05126.tar.gz
Create package
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD55
-rw-r--r--gdb.install19
3 files changed, 97 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..da651b180f21
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = gdb-ibuclaw-git
+ pkgdesc = The GNU Debugger
+ pkgver = 20150609
+ pkgrel = 1
+ url = http://www.gnu.org/software/gdb/
+ install = gdb.install
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ depends = expat
+ depends = ncurses
+ depends = python2
+ depends = xz
+ provides = gdb
+ conflicts = gdb
+ options = !libtool
+ backup = etc/gdb/gdbinit
+ source = gdb::git+https://github.com/ibuclaw/gdb.git
+ md5sums = SKIP
+
+pkgname = gdb-ibuclaw-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..83624126a70b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Maxime Poulin <maxpoulin64@gmail.com>
+# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com>
+# Contributor: Allan McRae <allan@archlinux.org>
+pkgname=gdb-ibuclaw-git
+pkgver=20150609
+pkgrel=1
+pkgdesc="The GNU Debugger"
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/gdb/"
+license=('GPL3')
+depends=('expat' 'ncurses' 'python2' 'xz')
+makedepends=('git')
+provides=('gdb')
+conflicts=('gdb')
+backup=('etc/gdb/gdbinit')
+options=('!libtool')
+install=gdb.install
+source=('gdb::git+https://github.com/ibuclaw/gdb.git')
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/gdb"
+ echo $(git rev-list --count master).$(git rev-parse --short master)
+}
+
+prepare() {
+ cd "$srcdir/gdb"
+
+ # fixes build, copied from the gdb PKGBUILD
+ # hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
+}
+
+build() {
+ cd "$srcdir/gdb"
+
+ ./configure --prefix=/usr --disable-nls \
+ --disable-werror \
+ --with-system-readline \
+ --with-python=/usr/bin/python2 \
+ --with-system-gdbinit=/etc/gdb/gdbinit
+
+ make
+}
+
+package() {
+ cd "$srcdir/gdb"
+
+ # install only gdb, otherwise it would install files already provided by binutils
+ make DESTDIR="$pkgdir/" install-gdb
+
+ # install "custom" system gdbinit
+ install -dm755 $pkgdir/etc/gdb
+ touch $pkgdir/etc/gdb/gdbinit
+}
diff --git a/gdb.install b/gdb.install
new file mode 100644
index 000000000000..ce37aa8ffbb6
--- /dev/null
+++ b/gdb.install
@@ -0,0 +1,19 @@
+infodir=/usr/share/info
+filelist=(annotate.info gdb.info gdb.info-1 gdb.info-2 gdb.info-3 gdb.info-4 gdbint.info gdbint.info-1 gdbint.info-2 stabs.info)
+
+post_install() {
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+