updated on Mon Jan 16 00:01:41 UTC 2012
[aur-mirror.git] / usb-creator / PKGBUILD
blobd5f5554555364fe5439a7192fc6f91f46799f919
1 # Maintainer : Jekyll Wu  < adaptee at gmail dot com>
2 # Contributor: Jacco Koning <archlinux@menollo.nl>, with help from qwak
4 pkgname=usb-creator
5 pkgver=0.2.34
6 _pkgver=0.2.34
7 pkgrel=2
8 pkgdesc="Create bootable USB from a LiveCD or disc image of Ubuntu. "
9 arch=('i686' 'x86_64')
10 url="https://launchpad.net/usb-creator"
11 license=('GPL3')
12 depends=(
13             'udisks'
14             'syslinux'
15             'dosfstools'
16             'mtools'
17             'cdrkit'
18             'dbus-python'
19         )
20 optdepends=(
21             'kdebindings-python: for KDE frontend'
22             'pygtk: for GTK frontend'
23             'python2-gobject: for GTK frontend'
24            )
25 makedepends=('python-distutils-extra')
26 install=usb-creator.install
27 source=(    "https://launchpad.net/ubuntu/+archive/primary/+files/usb-creator_${pkgver}.tar.gz"
28             "0001-change-the-path-of-parted.patch"
29             "0002-remove-blackcode-using-lsb-release-and-python-debian.patch"
30         )
32 build() {
33     local extractdir="${srcdir}/${pkgname}"
35     cd "${extractdir}"
37     # command `parted` is located at /usr/sbin/parted in archlinux
38     patch -Np1 -i "${srcdir}/0001-change-the-path-of-parted.patch"
40     # archlinux can't provide thoso equivalents; further more, these code
41     # are maily for dealing version differences between current ubuntu and
42     # the ubuntu iso. So just remove them, a dirty but simple solution.
43     patch -Np1 -i "${srcdir}/0002-remove-blackcode-using-lsb-release-and-python-debian.patch"
45     # force using python2 as interpreter
46     find . -type f | \
47         xargs grep -l '^#!/usr/bin/python$' | \
48                 xargs sed -i 's_#!/usr/bin/python_#!/usr/bin/python2_'
50     python2 setup.py install --root="${pkgdir}"
52     # FIXME:
53     # That setup.py is written with the assumption that /usr/share/kde4/apps is
54     # part of $(kde-prefix --path data), which is true for # ubuntu.
55     #
56     # But this assumption does not hold in archlinux, which will make
57     # usb-creator-kde fail to load its ui file.
58     #
59     # So we must put usbcreator-kde.ui to an appropriate place!
60     install --mode=0644 -D "${extractdir}/gui/usbcreator-kde.ui" \
61                             "${pkgdir}/usr/share/apps/usb-creator-kde/usbcreator-kde.ui"
63     # FIXME: install manpages, manually...
64     local MANDIR="${pkgdir}/usr/share/man/man8"
65     for manpage in ${pkgname}-{gtk,kde}.8 ; do
66         install --mode=0644 -D "${extractdir}/man/${manpage}" "${MANDIR}/${manpage}"
67     done
71 md5sums=('50bd6a9c72b6bd0be4ee34c165b4ecb8'
72          'bc80c990f59f7cab2db8cfa76746be61'
73          '290389e299688274592c5697578ba4cd')