1 # Contributor: 3ED <krzysztof1987__at__gmail__dot__com>
6 pkgdesc="The defragmenter is written using a simple combination of filefrag (a readily available fragmentation checker for Linux) and atomic copy. Inspired by Gentoo's fragcheck.pl and Con Kolivas's defrag script. (pfbh branch)"
8 url="https://code.launchpad.net/~brywilharris/pyfragtools/pfbh"
11 depends=('python2' 'rsync')
12 optdepends=("psyco27-svn: JIT compiler for Python 2.7 (development version)")
14 _bzrtrunk='lp:~brywilharris/pyfragtools/pfbh'
20 msg2 "Connecting to the server...."
21 if [ ! -d "${srcdir}/${_bzrmod}" ]; then
22 bzr co ${_bzrtrunk} ${_bzrmod} -r ${pkgver}
24 bzr up ${_bzrmod} -r ${pkgver}
26 msg2 "BZR checkout done or server timeout"
28 msg2 "Applying patch for python2..."
30 install -dm755 "${srcdir}"/patched
31 install -m 755 "${srcdir}/${_bzrmod}"/pydefrag "${srcdir}"/patched/pydefrag
33 # in that way because this is bzr... :[
34 if head -n1 "${srcdir}"/patched/pydefrag|grep -q 'python$'; then
35 sed 's:python$:python2:' -i "${srcdir}"/patched/pydefrag
39 install -dm755 "${pkgdir}"/usr/sbin
40 install -m 755 "${srcdir}"/patched/pydefrag "${pkgdir}"/usr/sbin