summaryrefslogtreecommitdiff
path: root/extra/gpart/PKGBUILD
blob: 3229f4205afa61231c6ea8ec4f6d42666593abe9 (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
48
49
# $Id: PKGBUILD 143745 2011-11-28 20:14:39Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: dale <dale@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=gpart
pkgver=0.1h
pkgrel=5.1
pkgdesc="Partition table rescue/guessing tool"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.stud.uni-hannover.de/user/76201/gpart/"
license=('GPL')
depends=('glibc')
source=("http://www.sfr-fresh.com/linux/misc/${pkgname}-${pkgver}.tar.gz"
        'gpart-0.1h-errno.patch' 
        'gpart-0.1h-vfat.patch' 
        'gpart-0.1h-ntfs.patch'
        'gpart-0.1h-reiserfs-3.6.patch'
        'gpart-0.1h-l64seek.patch'
        'gpart-0.1h-openmode.patch')
md5sums=('ee3a2d2dde70bcf404eb354b3d1ee6d4'
         '81eee5d9985df9bf9c23624e46cf945f'
         'ae6d86b0268618d34e618824dcd82754'
         '8161c02116ee4575906587eb09e35bde'
         '5da425c355740cbf06286755c902b996'
         '9cd7f91c321a83cc1aa202744d1c7cd2'
         'c982a01385e99b86b32de536c1fbecfb')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  patch -Np1 -i ${srcdir}/gpart-0.1h-errno.patch
  patch -Np1 -i ${srcdir}/gpart-0.1h-vfat.patch
  patch -Np1 -i ${srcdir}/gpart-0.1h-ntfs.patch
  patch -Np2 -i ${srcdir}/gpart-0.1h-reiserfs-3.6.patch
  patch -Np1 -i ${srcdir}/gpart-0.1h-l64seek.patch
  patch -Np1 -i ${srcdir}/gpart-0.1h-openmode.patch

  sed -i -e "/^CFLAGS/s: -O2 : ${CFLAGS} :" make.defs
  sed -i -e "/^LDFLAGS/s:=:=${LDFLAGS} :" make.defs

  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make prefix=${pkgdir}/usr mandir=${pkgdir}/usr/share/man install
}