summaryrefslogtreecommitdiff
path: root/community/xdiskusage/PKGBUILD
blob: e1d5683a16ec71fbcc1192a18640acec07e07e22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# $Id: PKGBUILD 65246 2012-02-20 12:32:09Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
# Contributor: Jason Chu <jason@archlinux.org>

pkgname=xdiskusage
pkgver=1.48
pkgrel=7
pkgdesc="xdiskusage is a user-friendly program to show you what is using up all your disk space"
arch=('i686' 'x86_64' 'mips64el')
depends=('fltk')
makedepends=('libxi')
license=('GPL')
url="http://xdiskusage.sourceforge.net"
options=(!emptydirs)
source=(http://xdiskusage.sourceforge.net/$pkgname-$pkgver.tgz
	'stdin-is-null.patch')
md5sums=('a902aa9d73761ade98256c3cd5c1f533'
         '0181b66b44e382e44c91602d8de9a7b6')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  sed -i 's/-lGL -lGLU/-lXft/' makeinclude.in

  patch -Np1 -i "$srcdir/stdin-is-null.patch"

  [ $CARCH == "x86_64" ] && patch xdiskusage.C <<EOF
991c991
<   switch ((int)v) {
---
>   switch ((long long)v) {
1004c1004
<   int n = (int)v;
---
>   int n = (long long)v;
EOF

  ./configure --prefix=/usr
  install -d "$pkgdir/usr/bin" "$pkgdir/usr/share/man/man1"
  LDFLAGS=-lXi make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make prefix="$pkgdir/usr" mandir="$pkgdir/usr/share/man" install
  chmod 0644 $pkgdir/usr/share/man/man1/*
}