summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 430b3b95abf508242a8b79f3f83c6463de1a7e07 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Maintainer: ValHue <vhuelamo at gmail dot com>
# https://github.com/ValHue/AUR-PKGBUILDs
#
pkgname="multisystem"
pkgver="1.0395"
pkgrel="1"
pkgdesc="A GUI tool to create a usb system that can boot multiple distro's"
url="http://liveusb.info/dotclear/index.php"
arch=('i686' 'x86_64')
license=('GPL3')
if pacman -Qq vim-runtime >/dev/null 2>&1; then
    depends=('vim' 'cdrkit' 'cryptsetup' 'dosfstools' 'gksu' 'grub' 'gtkdialog-svn' 'gvfs' 'hdparm' 'imagemagick' 'lsb-release' 'lsof' 'mtools' 'parted' 'qemu' 'rsync' 'squashfs-tools' 'sudo' 'syslinux' 'unzip' 'wmctrl' 'xdotool' 'xterm' 'zenity');
else
    depends=('xxd' 'cdrkit' 'cryptsetup' 'dosfstools' 'gksu' 'grub' 'gtkdialog-svn' 'gvfs' 'hdparm' 'imagemagick' 'lsb-release' 'lsof' 'mtools' 'parted' 'qemu' 'rsync' 'squashfs-tools' 'sudo' 'syslinux' 'unzip' 'wmctrl' 'xdotool' 'xterm' 'zenity');
fi
optdepends=('fatresize: The FAT16/FAT32 non-destructive resizer.')
provides=("${pkgname}")
source=("http://liveusb.info/${pkgname}/${pkgname}.tar.bz2"
        "http://liveusb.info/${pkgname}/depot/dists/all/main/binary-i386/Packages")
sha256sums=('d6ad807148fb38567b5f480caccdf62b784a9044d21b531918eaab72d5118eff'
            '38508528c009c5ac34b77e294e3cb71cafb0c960b461b4d2a5404f8dfaea5ecf')

_multisystem="#!/usr/bin/sh
exec /usr/local/share/multisystem/gui_multisystem.sh
fi"

_update_grub2="#!/bin/sh
grub-mkconfig -o /boot/grub/grub.cfg"

_liveusb_desktop="[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Icon[fr_FR]=/usr/local/share/pixmaps/multisystem-liveusb.png
Name[fr_FR]=MultiSystem
Comment[fr_FR]=Grub2 MultiSystem boot iso
Exec=/usr/local/share/multisystem/gui_multisystem.sh
Name=MultiSystem
Comment=Grub2 MultiSystem boot iso
Icon=/usr/local/share/pixmaps/multisystem-liveusb.png
Categories=Application;Utility;"

_vbox_desktop="[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Icon[fr_FR]=/usr/local/share/pixmaps/multisystem-vbox.png
Name[fr_FR]=MultiSystem VirtualBox test iso
Comment[fr_FR]=Isofile drop and test with VirtualBox
Exec=/usr/local/share/multisystem/VBox_livecd_gui.sh
Name=MultiSystem VirtualBox test iso
Comment=Isofile drop and test with VirtualBox
Icon=/usr/local/share/pixmaps/multisystem-vbox.png
Categories=Application;Utility;"

pkgver() {
    cd "${srcdir}"
    cat Packages | grep -e 'Version: ' | sed -e '1d;s/Version: //'
}

build() {
    cd "${srcdir}"
    echo -e "$_multisystem" | tee multisystem_bin
    echo -e "$_update_grub2" | tee update-grub2    
    echo -e "$_liveusb_desktop" | tee multisystem-liveusb.desktop
    echo -e "$_vbox_desktop" | tee multisystem-vbox.desktop
    
    cd "${srcdir}/${pkgname}"
    sed -i '/fatresize/d' dependances.txt
    sed -i '/kvm/d' dependances.txt
    sed -i '227,236d' gui_multisystem.sh
}

package() {
    cd "${srcdir}/${pkgname}"
    install -d ${pkgdir}/usr/local/share/${pkgname}
    mv * ${pkgdir}/usr/local/share/${pkgname}
    install -d ${pkgdir}/usr/share/applications
    install -d ${pkgdir}/usr/bin
    install -d ${pkgdir}/usr/local/share/pixmaps

    cd "${srcdir}"
    install -m 644 *.desktop ${pkgdir}/usr/share/applications
    install -m 755 multisystem_bin ${pkgdir}/usr/bin/multisystem
    install -m 755 update-grub2 ${pkgdir}/usr/bin

    cd "${pkgdir}/usr/local/share/${pkgname}"
    install -m 644 img/*.png ${pkgdir}/usr/local/share/pixmaps
    install -m 644 pixmaps/multisystem-liveusb.png ${pkgdir}/usr/local/share/pixmaps
    install -m 644 pixmaps/multisystem-vbox.png ${pkgdir}/usr/local/share/pixmaps
}

# vim:set ts=4 sw=2 ft=sh et: