updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / parted-git / PKGBUILD
blob284a7ad71d8fc0dd402ee2aed315699756793817
1 # Maintainer : Keshav P R <(the.ridikulus.rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
2 # Contributor: Gen2ly <toddrpartridge@gmail.com>
3 # Contributor: Aaron Griffin <aaron@archlinux.org>
4 # Contributor: dorphell <dorphell@archlinux.org>
6 _pkgname="parted"
7 pkgname="${_pkgname}-git"
9 pkgver=20120110
10 pkgrel=1
11 pkgdesc="A program for creating, destroying, resizing, checking and copying partitions"
12 arch=('i686' 'x86_64')
13 license=('GPL3')
14 url="http://www.gnu.org/software/parted/parted.html"
16 makedepends=('git' 'rsync' 'gperf' 'bc' 'libtool')
17 checkdepends=('valgrind' 'perl-digest-crc')
18 depends=('device-mapper' 'util-linux' 'gettext' 'e2fsprogs' 'ncurses' 'readline')
19 optdepends=('reiserfsprogs: for reiserfs partitions')
21 conflicts=("${_pkgname}")
22 provides=("${_pkgname}")
23 options=(!libtool)
25 source=()
26 sha256sums=()
28 install="${pkgname}.install"
30 _gitroot="git://git.savannah.gnu.org/parted.git"
31 _gitname="${_pkgname}"
32 _gitbranch="master"
34 _update_git() {
35         
36         cd "${srcdir}/"
37         
38         msg "Connecting to GIT server...."
39         
40         if [[ -d "${srcdir}/${_gitname}/" ]]; then
41                 cd "${srcdir}/${_gitname}/"
42                 git reset --hard
43                 
44                 git remote rm origin
45                 git remote add origin "${_gitroot}"
46                 
47                 git fetch
48                 git checkout "${_gitbranch}"
49                 git merge "remotes/origin/${_gitbranch}"
50                 msg "The local GIT repo has been updated."
51         else
52                 git clone "${_gitroot}" "${_gitname}"
53                 cd "${srcdir}/${_gitname}/"
54                 git checkout "${_gitbranch}"
55                 msg "GIT checkout done or server timeout"
56         fi
57         
58         echo
59         
62 build() {
63         
64         _update_git
65         
66         rm -rf "${srcdir}/${_gitname}_build/" || true
67         cp -r "${srcdir}/${_gitname}" "${srcdir}/${_gitname}_build"
68         
69         cd "${srcdir}/${_gitname}_build/"
70         
71         install -d "${srcdir}/${_gitname}_build/build-aux/" || true
72         install -D -m0755 "/usr/share/libtool/config/ltmain.sh" "${srcdir}/${_gitname}_build/build-aux/ltmain.sh"
73         
74         ./bootstrap
75         echo
76         
77         mkdir -p "${srcdir}/${_gitname}_build/BUILD"
78         cd "${srcdir}/${_gitname}_build/BUILD"
79         
80         CFLAGS="" ../configure \
81                 --host="${CARCH}-unknown-linux-gnu" \
82                 --prefix="/usr" \
83                 --bindir="/usr/bin" \
84                 --sbindir="/usr/bin" \
85                 --libexecdir="/usr/lib" \
86                 --with-readline \
87                 --disable-silent-rules \
88                 --enable-mtrace \
89                 --enable-device-mapper \
90                 --enable-dynamic-loading \
91                 --enable-nls \
92                 --enable-debug \
93                 --enable-pc98
94         echo
95         
96         make clean || true
97         echo
98         
99         CFLAGS="" LDFLAGS="" make
100         echo
101         
104 check() {
105         
106         cd "${srcdir}/${_gitname}_build/BUILD"
107         
108         ## Normal test-suite for 512 byte sectors
109         make check
110         echo
111         
112         ## Check whether test-suite works for 4K byte sectors - seems like already done by the top "make check" command
113         # PARTED_SECTOR_SIZE="4096" CK_FORK="no" make check
114         echo
115         
118 package() {
119         
120         cd "${srcdir}/${_gitname}_build/BUILD"
121         
122         make DESTDIR="${pkgdir}/" install
123         echo
124