updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / glib2-hardened / PKGBUILD
blobec40ce032f4dba8cff6eb1492ab41c25f2058ab6
3 pkgname=glib2-hardened
4 pkgver=2.28.8
5 pkgrel=1
6 pkgdesc="Common C routines used by GTK+ and other libs"
7 url="http://www.gtk.org/"
8 arch=(i686 x86_64)
9 license=('LGPL')
10 depends=('pcre>=8.12')
11 makedepends=('pkgconfig' 'python2')
12 checkdepends=('pygobject' 'dbus-python')
13 options=('!libtool' '!docs')
14 replaces=('glib2<=2.28.8-1')
15 conflicts=('glib2>2.28.8-1')
16 provides=('glib2=2.28.8-1')
17 source=(http://ftp.gnome.org/pub/GNOME/sources/glib/2.28/glib-${pkgver}.tar.xz
18         glib2.sh
19         glib2.csh)
20 sha256sums=('4d7ca95dbde8e8f60ab428c765b0dbb8a44be9eb9316491803ce5ee7b4748353'
21             '9456872cdedcc639fb679448d74b85b0facf81033e27157d2861b991823b5a2a'
22             '8d5626ffa361304ad3696493c0ef041d0ab10c857f6ef32116b3e2878ecf89e3')
24 build() {
25   pkgname="glib2"
27   export CFLAGS="${CFLAGS} -fstack-protector --param ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
28   export CXXFLAGS="${CFLAGS}"
29   export LDFLAGS="${LDFLAGS} -Wl,-z,relro -Wl,-z,now"
31   cd "${srcdir}/glib-${pkgver}"
32   ./configure --prefix=/usr \
33       --sysconfdir=/etc \
34       --with-pcre=system \
35       --disable-fam
36   make
39 check() {
40   pkgname="glib2"
41   cd "${srcdir}/glib-${pkgver}"
42   sed -i 's|!/usr/bin/env python|!/usr/bin/env python2|' gio/tests/gdbus-testserver.py
43   make -k check || true
46 package() {
47   pkgname="glib2"
48   cd "${srcdir}/glib-${pkgver}"
49   make DESTDIR="${pkgdir}" install
51   install -d "${pkgdir}/etc/profile.d"
52   install -m755 "${srcdir}/glib2.sh" "${pkgdir}/etc/profile.d/"
53   install -m755 "${srcdir}/glib2.csh" "${pkgdir}/etc/profile.d/"
55   for _i in "${pkgdir}/etc/bash_completion.d/"*; do
56       chmod -x "${_i}"
57   done
58 pkgname="glib2-hardened"