1 # Maintainer : Jekyll Wu < adaptee at gmail dot com>
2 # Contributor: Jacco Koning <archlinux@menollo.nl>, with help from qwak
8 pkgdesc="Create bootable USB from a LiveCD or disc image of Ubuntu. "
10 url="https://launchpad.net/usb-creator"
21 'kdebindings-python: for KDE frontend'
22 'pygtk: for GTK frontend'
23 'python2-gobject: for GTK frontend'
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"
33 local extractdir="${srcdir}/${pkgname}"
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
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}"
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.
56 # But this assumption does not hold in archlinux, which will make
57 # usb-creator-kde fail to load its ui file.
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}"
71 md5sums=('50bd6a9c72b6bd0be4ee34c165b4ecb8'
72 'bc80c990f59f7cab2db8cfa76746be61'
73 '290389e299688274592c5697578ba4cd')