summaryrefslogtreecommitdiff
path: root/core/gdbm/PKGBUILD
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /core/gdbm/PKGBUILD
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'core/gdbm/PKGBUILD')
-rw-r--r--core/gdbm/PKGBUILD59
1 files changed, 59 insertions, 0 deletions
diff --git a/core/gdbm/PKGBUILD b/core/gdbm/PKGBUILD
new file mode 100644
index 000000000..e3c8a2449
--- /dev/null
+++ b/core/gdbm/PKGBUILD
@@ -0,0 +1,59 @@
+# $Id: PKGBUILD 105198 2011-01-07 13:58:42Z stephane $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: judd <jvinet@zeroflux.org>
+
+pkgname=gdbm
+pkgver=1.8.3
+pkgrel=8
+pkgdesc="GNU database library"
+url="http://www.gnu.org/software/gdbm/gdbm.html"
+license=('GPL')
+arch=('i686' 'x86_64')
+depends=('glibc' 'sh')
+source=(ftp://ftp.gnu.org/gnu/gdbm/${pkgname}-${pkgver}.tar.gz
+ gdbm-1.8.3-zeroheaders.patch
+ gdbm-1.8.3-fhs.patch)
+options=('!libtool' '!makeflags')
+install=gdbm.install
+md5sums=('1d1b1d5c0245b1c00aff92da751e9aa1'
+ 'a2ed344be9258775bd718074cf2e4ec6'
+ '66a7c235416c136dc89efc7d03352514')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # Prevent gdbm from storing uninitialized memory content
+ # to database files. This patch improves security, as the
+ # uninitialized memory might contain sensitive informations
+ # from other applications.
+ # https://bugzilla.redhat.com/show_bug.cgi?id=4457
+ # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=208927
+ patch -Np1 -i ../gdbm-1.8.3-zeroheaders.patch
+
+ # Make gdbm buildable.
+ patch -Np1 -i ../gdbm-1.8.3-fhs.patch
+
+ libtoolize --force --copy
+ aclocal
+ autoconf
+
+ ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
+
+ # flock does not work on nfs, we use fcntl instead
+ # https://bugzilla.redhat.com/show_bug.cgi?id=477300
+ echo "/* We use fcntl locking (POSIX) instead of flock (BSD) */" >> autoconf.h
+ echo "#undef HAVE_FLOCK" >> autoconf.h
+
+ make prefix=/usr
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make prefix=$pkgdir/usr \
+ manprefix=$pkgdir/usr/share/man \
+ man3dir=$pkgdir/usr/share/man/man3 \
+ infodir=$pkgdir/usr/share/info \
+ install install-compat
+
+ ln -sf gdbm/gdbm.h $pkgdir/usr/include
+}