summaryrefslogtreecommitdiff
path: root/mk
blob: bf1c7e4e734d1ea48966ebb25adc9dda656b6db5 (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
#!/bin/bash


sudo echo "\n--- running pacman ---\n"
BASE_PKGS="$(pacman -Qg base-devel | cut -d ' ' -f 2)"
CALAMARES_PKGS="boost extra-cmake-modules git kpmcore qt5-tools polkit-qt5 yaml-cpp" # squashfs-tools os-prober
PARABOLA_PKGS="arch-install-scripts"
PKGS="$BASE_PKGS $CALAMARES_PKGS $PARABOLA_PKGS"
pacman -Qi calamares > /dev/null 2>&1 && sudo pacman -R calamares
pacman -Qi $PKGS > /dev/null || sudo pacman -S --needed $PKGS


echo "\n--- preparing build environment ---\n"
if [ ! -d build ]
then mkdir build
# else rm -f build/Makefile 2> /dev/null
fi
# if [ ! -d /etc/calamares/ ]
# then sudo mkdir                         /etc/calamares
#      sudo ln -s `pwd`/settings.conf     /etc/calamares/
#      sudo ln -s `pwd`/src/branding      /etc/calamares/
# fi


echo "\n--- running cmake ---\n"
cd build
cmake -DCMAKE_BUILD_TYPE=Debug                                                    \
      -DCMAKE_INSTALL_PREFIX=/usr                                                 \
      -DCMAKE_INSTALL_LIBDIR=lib                                                  \
      -DSKIP_MODULES="dracut dracutlukscfg dummycpp dummyprocess dummypython      \
                      dummypythonqt initramfs initramfscfg interactiveterminal    \
                      license plymouthcfg removeuser tracking webview"         ..


echo "\n--- running make uninstall ---\n"
[ -d /usr/share/calamares/ ] && sudo make uninstall
sudo rm -rf /usr/share/calamares/


echo "\n--- running make install ---\n"
[ -f Makefile  ] && sudo make install
cd ..


echo "\n--- launching calamares ---\n"
# [ "`lsmod | grep squashfs`" ] || sudo modprobe squashfs
[ -f /usr/bin/calamares     ] && sudo calamares
# [ -f build/calamares        ] && sudo build/calamares