summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1eeeb2b479eb3dc3548da3dc04e089bc322cd5b8 (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
pkgname=ucloner
pkgver=10.10.2
rev=beta1
pkgrel=1
pkgdesc="UCloner is a backup/restore/clone tool. Modified for Arch Linux"
arch=('any')
url="https://code.google.com/p/ucloner"
license=('GPL')
depends=('pygtk' 'vte' 'squashfs-tools' 'zenity' 'rsync' 'polkit')
optdepends=('jfsutils: Create jfs file system in ucloner.'
            'reiserfsprogs: Create reiserfs file system in ucloner.'
            'xfsprogs: Create xfs file system in ucloner.')
source=(
    'https://ucloner.googlecode.com/files/UCloner-10.10.2-beta1.tar.gz'
    'ucloner.sh'
    'ucloner-cmd.sh'
    'ucloner.desktop'
    'ucloner.png'
    'modify_for_arch.patch'
)

md5sums=('b7bf49a5516cb9e00943e06e3e73adf2'
         '3dac4b28900e7be1068b502b7b848028'
         '15efc60875b77125f8d5399797306955'
         '48ad21726f315719c215fa2172959371'
         '1f913fe9ca34481134bc36e1045e9a20'
         '47c1f138ebb7b4ef961be9f9dccd543a')


prepare() {
    cd "${srcdir}/UCloner-$pkgver-$rev"
    patch -p1 < "${srcdir}/modify_for_arch.patch"
    cd program
    rm *.pyc
    find -name '*.py' | xargs sed -i 's|#!/usr/bin/python$|#!/usr/bin/env python2|'
    python2 -m compileall .
}


package() {
  install -dm 755 "$pkgdir/opt"
  cp -r "${srcdir}/UCloner-$pkgver-$rev/program" "$pkgdir/opt/ucloner"
  install -Dm 755 "${srcdir}/ucloner.sh" "$pkgdir/usr/bin/ucloner"
  install -Dm 755 "${srcdir}/ucloner-cmd.sh" "$pkgdir/usr/bin/ucloner-cmd"
  install -Dm 755 "${srcdir}/ucloner.desktop" "$pkgdir/usr/share/applications/ucloner.desktop"
  install -Dm 755 "${srcdir}/ucloner.png" "$pkgdir/usr/share/pixmaps/ucloner.png"
  #install -Dm 755 "${srcdir}/ucloner.gui.policy" "$pkgdir//usr/share/polkit-1/actions/ucloner.gui.policy"
}