diff options
author | Carsten Teibes | 2014-07-23 18:32:02 +0200 |
---|---|---|
committer | Carsten Teibes | 2014-07-23 18:32:02 +0200 |
commit | 69635a77808ac2e5fc4609f53437215c7ad37693 (patch) | |
tree | f0070ea22308ad9dc9ecfe9bd5f7dbf68964d1f7 | |
download | aur-69635a77808ac2e5fc4609f53437215c7ad37693.tar.gz |
[add] usb-creator 0.2.59
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | PKGBUILD | 44 | ||||
-rw-r--r-- | remove-ubuntu-version-check.patch | 61 | ||||
-rw-r--r-- | usb-creator.install | 19 |
4 files changed, 150 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..565278803cca --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,26 @@ +pkgbase = usb-creator + pkgdesc = Create bootable USB from a LiveCD or disc image of Ubuntu + pkgver = 0.2.59 + pkgrel = 1 + url = https://launchpad.net/usb-creator + install = usb-creator.install + arch = any + license = GPL3 + makedepends = python-distutils-extra + depends = udisks2 + depends = syslinux + depends = dosfstools + depends = mtools + depends = cdrkit + depends = python-dbus + depends = python-gobject + depends = hicolor-icon-theme + optdepends = kdebindings-python: for KDE frontend + optdepends = gtk3: for GTK frontend + source = https://launchpad.net/ubuntu/+archive/primary/+files/usb-creator_0.2.59.tar.xz + source = remove-ubuntu-version-check.patch + sha256sums = 5cc13df772cb59a146d346ea0d4cd20bca51e110c8c49b0009541fe2428dcd09 + sha256sums = bdc29966cda4921e395b07530e0d6a0bda81f99d4b0948fadfda983e05ab51cb + +pkgname = usb-creator + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6a5416b63630 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: carstene1ns <arch carsten-teibes de> - http://git.io/ctPKG +# Contributor: Jekyll Wu <adaptee at gmail dot com> +# Contributor: Jacco Koning <archlinux@menollo.nl>, with help from qwak +# Contributor: twa022 <twa022@gmail.com> + +pkgname=usb-creator +pkgver=0.2.59 +pkgrel=1 +pkgdesc="Create bootable USB from a LiveCD or disc image of Ubuntu" +arch=('any') +url="https://launchpad.net/usb-creator" +license=('GPL3') +depends=('udisks2' 'syslinux' 'dosfstools' 'mtools' 'cdrkit' 'python-dbus' 'python-gobject' + 'hicolor-icon-theme') +makedepends=('python-distutils-extra') +optdepends=('kdebindings-python: for KDE frontend' 'gtk3: for GTK frontend') +install=usb-creator.install +source=("https://launchpad.net/ubuntu/+archive/primary/+files/${pkgname}_${pkgver}.tar.xz" + "remove-ubuntu-version-check.patch") +sha256sums=('5cc13df772cb59a146d346ea0d4cd20bca51e110c8c49b0009541fe2428dcd09' + 'bdc29966cda4921e395b07530e0d6a0bda81f99d4b0948fadfda983e05ab51cb') + +prepare() { + cd $pkgname-$pkgver + + patch -Np1 < ../remove-ubuntu-version-check.patch +} + +package() { + cd $pkgname-$pkgver + + python3 setup.py install --root="$pkgdir/" --optimize=1 + + # FIXME by adaptee: + # That setup.py is written with the assumption that /usr/share/kde4/apps is part of + # $(kde-prefix --path data), which is true for ubuntu. But this assumption does not + # hold in archlinux, which will make usb-creator-kde fail to load its ui file. + # So we must put usbcreator-kde.ui to an appropriate place! + install -Dm0644 gui/usbcreator-kde.ui "$pkgdir"/usr/share/apps/usb-creator-kde/usbcreator-kde.ui + + # FIXME: install manual pages + install -d "$pkgdir"/usr/share/man/man8 + install -Dm0644 man/$pkgname-{gtk,kde}.8 "$pkgdir"/usr/share/man/man8 +} diff --git a/remove-ubuntu-version-check.patch b/remove-ubuntu-version-check.patch new file mode 100644 index 000000000000..1b16ccde2a29 --- /dev/null +++ b/remove-ubuntu-version-check.patch @@ -0,0 +1,61 @@ +diff -Naur usb-creator-0.2.59.orig/usbcreator/install.py usb-creator-0.2.59/usbcreator/install.py +--- usb-creator-0.2.59.orig/usbcreator/install.py 2013-12-02 21:03:23.000000000 +0100 ++++ usb-creator-0.2.59/usbcreator/install.py 2014-07-23 18:04:25.636786909 +0200 +@@ -198,31 +198,8 @@ + if os.path.exists(ldlinux): + os.remove(ldlinux) + +- def os_vers(self): +- """Return a tuple of the target OS version and our OS version.""" +- import lsb_release +- try: +- from debian import debian_support +- except ImportError: +- from debian_bundle import debian_support +- +- target_os_ver = None +- our_os_ver = debian_support.Version( +- lsb_release.get_distro_information()['RELEASE']) +- +- if os.path.exists(os.path.join(self.target, '.disk', 'info')): +- with open(os.path.join(self.target, '.disk', 'info'),'r') as f: +- contents = f.readline().split() +- if len(contents) > 2: +- # Consider point releases the same as the initial release +- # (10.04.4 -> 10.04) +- target_os_ver = debian_support.Version(contents[1]) +- +- return target_os_ver, our_os_ver +- + def need_syslinux_legacy(self): +- target_os_ver, our_os_ver = self.os_vers() +- return our_os_ver >= '10.10' and target_os_ver <= '10.04' ++ return False + + def install_bootloader(self, grub_location=''): + logging.debug('install_bootloader') +@@ -280,7 +257,6 @@ + if os.path.basename(filename) == 'gfxboot.cfg': + continue + f = None +- target_os_ver, our_os_ver = self.os_vers() + try: + f = open(filename, 'r') + label = '' +@@ -298,16 +274,6 @@ + line.insert(1, 'cdrom-detect/try-usb=true') + if label not in ('memtest', 'hd'): + line.insert(1, 'noprompt') +- #OS version specific mangles +- #The syntax in syslinux changed with the version +- #shipping in Ubuntu 10.10 +- elif (target_os_ver and our_os_ver and +- target_os_ver != our_os_ver): +- #10.10 or newer image, burning on 10.04 or lower +- if (command.lower() == 'ui' and +- our_os_ver <= '10.04' and +- target_os_ver >= '10.10'): +- line.remove('ui') + + to_write.append(' '.join(line) + '\n') + f.close() diff --git a/usb-creator.install b/usb-creator.install new file mode 100644 index 000000000000..f495986e2669 --- /dev/null +++ b/usb-creator.install @@ -0,0 +1,19 @@ + +post_install() { + echo "This package provides two frontends:" + echo " usb-creator-gtk for GTK3 and usb-creator-kde for KDE4" + echo "Choose your preferred frontend and install it's runtime dependency." + echo "" + echo "Note: Writing disk images prior to Ubuntu 10.10 will not work with this package," + echo "because syslinux syntax changed." + + xdg-icon-resource forceupdate --theme hicolor &> /dev/null +} + +post_upgrade() { + post_install +} + +post_remove() { + xdg-icon-resource forceupdate --theme hicolor &> /dev/null +} |