From 8b3f6d4778fe0fe50c989c365ea6aee29e1fd49e Mon Sep 17 00:00:00 2001 From: Rohan Garg Date: Wed, 11 May 2016 16:14:24 +0200 Subject: [PATCH] Make sure we only build for amd64, adjust settings accordingly --- debian/control | 8 +- .../{settings.conf.amd64 => settings.conf} | 0 etc/calamares/settings.conf.armhf | 31 ------- lib/live/config/1200-calamares | 81 +++++++++++++++++++ 4 files changed, 83 insertions(+), 37 deletions(-) rename etc/calamares/{settings.conf.amd64 => settings.conf} (100%) delete mode 100644 etc/calamares/settings.conf.armhf create mode 100644 lib/live/config/1200-calamares diff --git a/debian/control b/debian/control index 704fe3f..e947378 100644 --- a/debian/control +++ b/debian/control @@ -4,15 +4,11 @@ Priority: optional Maintainer: Rohan Garg Build-Depends: debhelper (>= 9), Standards-Version: 3.9.6 -Homepage: https://github.com/calamares/calamares -Vcs-Git: http://github.com/calamares/calamares-debian.git -Vcs-Browser: https://github.com/calamares/calamares-debian.git +Homepage: https://github.com/netrunner-core/calamares-core Package: calamares-core -Architecture: all +Architecture: amd64 Depends: calamares -Breaks: calamares-branding, calamares-core-settings -Replaces: calamares-branding, calamares-core-settings Description: distribution-independent installer framework distribution-independent installer framework. . diff --git a/etc/calamares/settings.conf.amd64 b/etc/calamares/settings.conf similarity index 100% rename from etc/calamares/settings.conf.amd64 rename to etc/calamares/settings.conf diff --git a/etc/calamares/settings.conf.armhf b/etc/calamares/settings.conf.armhf deleted file mode 100644 index f458820..0000000 --- a/etc/calamares/settings.conf.armhf +++ /dev/null @@ -1,31 +0,0 @@ ---- -modules-search: [ local ] - -instances: - - - config: resize.conf - id: resize - module: interactiveterminal - -sequence: - - show: - - welcome - - locale - - keyboard - - users - - interactiveterminal@resize - - exec: - - machineid - - locale - - localecfg - - keyboard - - users - - networkcfg - - services - - displaymanager - - show: - - finished - -branding: netrunner-core -dont-chroot: true -prompt-install: false diff --git a/lib/live/config/1200-calamares b/lib/live/config/1200-calamares new file mode 100644 index 0000000..05137cf --- /dev/null +++ b/lib/live/config/1200-calamares @@ -0,0 +1,81 @@ +#!/bin/sh + +## live-config(7) - System Configuration Components +## Copyright (C) 2014 Rohan Garg +## +## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. +## This is free software, and you are welcome to redistribute it +## under certain conditions; see COPYING for details. + + +set -e + +Cmdline () +{ + # Reading kernel command line + for _PARAMETER in ${LIVE_CONFIG_CMDLINE} + do + case "${_PARAMETER}" in + live-config.no_calamares=|no_calamares=) + NO_CALAMARES="true" + ;; + + live-config.username=*|username=*) + LIVE_USERNAME="${_PARAMETER#*username=}" + ;; + esac + done +} + +Init () +{ + # Checking if package is installed or already configured + if [ ! -e /usr/bin/calamares ] + then + exit 0 + fi + + echo -n " calamares" +} + +Config () +{ + if [ ! -e /usr/bin/calamares ] + then + exit 0 + fi + + if [ "${NO_CALAMARES}" != "true" ] + then + if [ ! -e /home/${LIVE_USERNAME}/Desktop ] + then + mkdir -p "/home/${LIVE_USERNAME}/Desktop" + fi + +cat > "/home/${LIVE_USERNAME}/Desktop/calamares.desktop" << EOF +#!/usr/bin/env xdg-open +[Desktop Entry] +Type=Application +Version=1.0 +Name=Install Netrunner Core Edition +GenericName=Install Netrunner Core Edition +TryExec=calamares +Exec=pkexec /usr/bin/calamares +Comment=Calamares — System Installer +Icon=calamares +Terminal=false +StartupNotify=false +Categories=Qt;System; +EOF + + chmod a+x "/home/${LIVE_USERNAME}/Desktop/calamares.desktop" + chown -R ${LIVE_USERNAME}:${LIVE_USERNAME} "/home/${LIVE_USERNAME}/Desktop" + + fi + # Creating state file + touch /var/lib/live/config/calamares +} + +Cmdline +Init +Config