updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / gnu-fdisk / PKGBUILD
blob1cd2d310e5be9e33e5d33154a581a04ae2ee670b
1 # Maintainer : Keshav P R <(skodabenz) (aatt) (rocketmail) (ddoott) (ccoomm)>
3 __pkgname="fdisk"
4 _pkgname="gnu-${__pkgname}"
5 pkgname="${_pkgname}"
7 pkgver="1.3.0a"
8 pkgrel=1
9 pkgdesc="GNU clone of util-linux fdisk and cfdisk"
10 arch=('i686' 'x86_64')
11 url="https://www.gnu.org/software/fdisk/"
12 license=('GPL')
13 makedepends=()
14 depends=('parted' 'ncurses')
15 optdepends=()
16 install="${pkgname}.install"
17 conflicts=("${_pkgname}")
18 provides=("${_pkgname}")
19 source=("ftp://ftp.gnu.org/gnu/fdisk/fdisk-${pkgver}.tar.bz2"
20                 "ftp://ftp.gnu.org/gnu/fdisk/fdisk-${pkgver}.tar.bz2.sig"
21                 "https://bitbucket.org/gtrentalancia/fdisk-1.2.5/downloads/fdisk-1.2.5-update-sys-types.patch")
23 sha256sums=('c788ebd0f58aa13891774fcd561349e762e3750d0d144c1a0cf738600add5fbc'
24             'd6ee88c2ad4a5d016d925938e26f74af5c04b6282f7ab5a539c1420d77d56510'
25             'bef342deb56bc7c5e1ceb6b300c5e44e84fecf32a38f8150b5b123c4b3533959')
27 build() {
28         
29         cd "${srcdir}/${__pkgname}-${pkgver}/"
30         
31         # patch -Np1 -i "${srcdir}/fdisk-1.2.5-PED_ASSERT-remove-action-argument.patch"
32         # patch -Np1 -i "${srcdir}/fdisk-1.2.5-update-sys-types.patch"
33         
34         mkdir -p "${srcdir}/${__pkgname}-${pkgver}/BUILD"
35         cd "${srcdir}/${__pkgname}-${pkgver}/BUILD"
36         
37         CFLAGS="" ../configure --with-gnu-ext \
38                                                         --prefix=/usr \
39                                                         --bindir=/bin \
40                                                         --sbindir=/sbin \
41                                                         --mandir=/usr/share/man \
42                                                         --infodir=/usr/share/info \
43                                                         --sysconfdir=/etc
44         echo
45         
46         CFLAGS="" make
47         echo
48         
51 package() {
52         
53         cd "${srcdir}/${__pkgname}-${pkgver}/BUILD"
54         
55         make DESTDIR="${pkgdir}" install
56         echo
57         
58         install -D -m0755 "${pkgdir}/sbin/fdisk" "${pkgdir}/sbin/gnu-fdisk"
59         install -D -m0755 "${pkgdir}/sbin/cfdisk" "${pkgdir}/sbin/gnu-cfdisk"
60         
61         cd "${pkgdir}/sbin/"
62         
63         rm -f gfdisk
64         rm -f lfdisk
65         
66         ln -s gnu-fdisk gfdisk
67         ln -s gnu-fdisk lfdisk
68         
69         cd "${srcdir}/${__pkgname}-${pkgver}/BUILD"
70         
71         install -D -m0644 "${pkgdir}/usr/share/info/fdisk.info" "${pkgdir}/usr/share/info/gnu-fdisk.info"
72         install -D -m0644 "${pkgdir}/usr/share/info/cfdisk.info" "${pkgdir}/usr/share/info/gnu-cfdisk.info"
73         
74         install -D -m0644 "${pkgdir}/usr/share/man/man8/fdisk.8" "${pkgdir}/usr/share/man/man8/gnu-fdisk.8"
75         install -D -m0644 "${pkgdir}/usr/share/man/man8/cfdisk.8" "${pkgdir}/usr/share/man/man8/gnu-cfdisk.8"
76         
77         rm -f "${pkgdir}/sbin/fdisk"
78         rm -f "${pkgdir}/sbin/cfdisk"
79         
80         rm -f "${pkgdir}/usr/share/info/fdisk.info"
81         rm -f "${pkgdir}/usr/share/info/cfdisk.info"
82         
83         rm -f "${pkgdir}/usr/share/man/man8/fdisk.8"
84         rm -f "${pkgdir}/usr/share/man/man8/cfdisk.8"
85