File live-fat-stick.spec of Package live-fat-stick
#
# spec file for package live-fat-stick
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: live-fat-stick
Version: 0.4.2
Release: 0
Summary: Create live usb stick on fat partition
License: GPL-2.0+
Group: System/Management
Url: https://github.com/cyberorg/live-fat-stick
Source0: live-fat-stick
Source1: live-usb-gui
Source2: live-usb-gui.desktop
Source3: live-grub-stick
Requires: dd_rescue
Requires: fuseiso
Requires: parted
Requires: syslinux
Requires: util-linux
%if 0%{?fedora_version}
Requires: qemu-kvm
%else
Requires: qemu-tools
%endif
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# depends on syslinux, which exists only for the following arches:
ExclusiveArch: %ix86 x86_64 noarch
BuildArch: noarch
%description
Create multi boot USB stick/hard disk with whole iso/s on vfat/fat32 partition
keeping existing data untouched.
If --isohybrid option is used then it removes all existing data and creates
new partitions.
run this command as root (su -, not sudo)
live-fat-stick isopath stickpartition
e.g.:
live-fat-stick /home/geeko/openSUSE-Edu-li-f-e-12.2-1-i686.iso /dev/sdXY
To add various distribution iso to the stick, run the following:
For openSUSE : live-fat-stick --suse /path/to/openSUSE-filename.iso /dev/sdXY
For Ubuntu : live-fat-stick --ubuntu /path/to/ubuntu-filename.iso /dev/sdXY
For Mint : live-fat-stick --mint /path/to/mint-filename.iso /dev/sdXY
For Fedora : live-fat-stick --fedora /path/to/fedora-filename.iso /dev/sdXY
For isohybrid : live-fat-stick --isohybrid /path/to/isohybrid-filename.iso /dev/sdX
isopath should be full absolute path of iso image and the device should be
actual partition on the stick like /dev/sdb1, /dev/sdc1,/dev/sdc2...
The stick partition has to be vfat/fat32 format.
run live-fat-stick -l(or --list) to list the possible usb storage devices available.
It is possible to boot multiple distributions and iso images from same device,
should work with all recent openSUSE or Ubuntu live iso images. Fedora iso is
not copied but is extracted as it does not support booting from iso.
%package -n live-grub-stick
Requires: dd_rescue
Requires: fuseiso
Requires: grub2
Requires: parted
Requires: util-linux
%if 0%{?fedora_version}
Requires: qemu-kvm
%else
Requires: qemu-tools
%endif
Summary: Create multiboot live usb stick using grub2
Group: System/Management
%description -n live-grub-stick
Create multi boot USB stick/hard disk with whole iso/s on any partition
keeping existing data untouched using grub2.
If --isohybrid option is used then it removes all existing data and creates
new partitions.
run this command as root (su -, not sudo)
live-grub-stick isopath stickpartition
e.g.:
live-grub-stick /home/geeko/openSUSE-Edu-li-f-e.x86_64-42.1.1.iso /dev/sdXY
To add various distribution iso to the stick, run the following:
For openSUSE : live-grub-stick --suse /path/to/openSUSE-filename.iso /dev/sdXY
For Ubuntu : live-grub-stick --ubuntu /path/to/ubuntu-filename.iso /dev/sdXY
For Mint : live-grub-stick --mint /path/to/mint-filename.iso /dev/sdXY
For Fedora : live-grub-stick --fedora /path/to/fedora-filename.iso /dev/sdXY
For isohybrid : live-grub-stick --isohybrid /path/to/isohybrid-filename.iso /dev/sdX
isopath should be full absolute path of iso image and the device should be
actual partition on the stick like /dev/sdb1, /dev/sdc1,/dev/sdc2...
The stick partition has to be in any format supported by grub2.
run live-grub-stick -l(or --list) to list the possible usb storage devices available.
It is possible to boot multiple distributions and iso images from same device.
%package -n live-usb-gui
Requires: live-fat-stick = %{version}
Requires: live-grub-stick = %{version}
%if 0%{?suse_version}
Recommends: zenity kdialog
%else
Requires: zenity
%endif
Summary: Create live usb stick on fat partition
Group: System/Management
%description -n live-usb-gui
A simple zenity/kdialog based GUI to run live-fat-stick script that creates
bootable USB device(stick/HDD) using iso image on a vfat partition, keeps
existing data untouched.
It also supports creating bootable USB sticks from iso images processed with
isohybrid, such as openSUSE installation DVD and other Linux distributions.
%prep
%build
%install
%__install -d -m 755 %{buildroot}/%_bindir/
%__install -d -m 755 %{buildroot}/%_datadir/applications/
cp %{SOURCE0} %{buildroot}/%_bindir/
cp %{SOURCE1} %{buildroot}/%_bindir/
cp %{SOURCE3} %{buildroot}/%_bindir/
cp %{SOURCE2} %{buildroot}/%_datadir/applications/
chmod 755 %{buildroot}/usr/bin/*
%if 0%{?suse_version}
%suse_update_desktop_file live-usb-gui
%endif
%post -n live-usb-gui
%desktop_database_post
%postun -n live-usb-gui
%desktop_database_postun
%files
%defattr(-,root,root)
%_bindir/live-fat-stick
%files -n live-grub-stick
%defattr(-,root,root)
%_bindir/live-grub-stick
%files -n live-usb-gui
%defattr(-,root,root)
%_bindir/live-usb-gui
%_datadir/applications/live-usb-gui.desktop
%changelog