summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ad866ee7363d660fc8116624d0481132c8769a47 (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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Maintainer: ValHue <vhuelamo at gmail dot com>
#
# Contributor: ValHue <vhuelamo at gmail dot com>
#
pkgname="multisystem"
pkgver="1.0448"
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' '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' '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.')
source=("${pkgname}-${pkgver}.tar.bz2::http://liveusb.info/${pkgname}/${pkgname}.tar.bz2"
        "Packages::http://liveusb.info/${pkgname}/depot/dists/all/main/binary-i386/Packages"
)
sha256sums=('dc37326563f0857e20cd9a27fc891ab318717f7f7f34d254d5589991a2312b3c'
            '47880fbec56ae7fb450fd83fc5b7070d02020fe3271b9ee20c80a901e3759ba7')

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

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

_gvfs_mount="#!/usr/bin/sh

replacement=\"gio mount\"
help=\"gio help mount\"

>&2 echo \"This tool has been deprecated, use '\$replacement' instead.\"
>&2 echo \"See '\$help' for more info.\"
>&2 echo

if [ \"\$1\" = \"--help\" ] || [ \"\$1\" = \"-h\" ]; then
  exec \$help \"\$@:2\"
else
  exec \$replacement \"\$@\"
fi"

_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 "$_gvfs_mount" | tee gvfs-mount
    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/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
    install -m 755 gvfs-mount ${pkgdir}/usr/local/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=4 et syn=sh ft=sh: