forked from maemo-leste/image-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
leste.blend
85 lines (68 loc) · 1.89 KB
/
leste.blend
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
#!/usr/bin/env zsh
# See LICENSE file for copyright and license details
vars+=(codename)
codename="leste" && source "$R/../${codename}.config"
blend_preinst() {
fn blend_preinst
req=()
ckreq || return 1
}
blend_postinst() {
fn blend_postinst
req=(strapdir)
[ -n "$armsdk_version" ] && req+=(device_name)
ckreq || return 1
notice "copying rootfs overlays"
sudo rsync -vraX "$R/../rootfs-overlay/common/" "${strapdir}"
[ -n "$armsdk_version" ] && \
sudo rsync -vraX "$R/../rootfs-overlay/${device_name}/" "${strapdir}"
case "$device_name" in
droid4)
cat <<EOF | sudo tee ${strapdir}/droid4-finalize >/dev/null
#!/bin/sh
rc-update add droid4-lcd sysinit
EOF
chroot-script -d droid4-finalize || zerr
;;
esac
blend_finalize || zerr
return 0
}
blend_finalize() {
fn blend_finalize
req=(strapdir)
ckreq || return 1
notice "Finalizing installation"
cat <<EOF | sudo tee ${strapdir}/blend-finalize >/dev/null
#!/bin/sh
apt-get --yes --force-yes purge ${finalize_purge_packages}
apt-get --yes --force-yes --purge autoremove
apt-get update
apt-get clean
updatedb
EOF
chroot-script -d blend-finalize || zerr
}
blend_bootstrap_setup() {
fn blend_bootstrap_setup
req=(repo_key strapdir)
ckreq || return 1
cat <<EOF | sudo tee ${strapdir}/blend-bootstrap-setup >/dev/null
#!/bin/sh
echo " * Adding maemo repository key to apt..."
wget -O- ${repo_key} | apt-key add -
EOF
chroot-script -d blend-bootstrap-setup || zerr
}
conf_print_sourceslist() {
fn conf_print_sourceslist "(override)"
req=(codename)
[ -n "$armsdk_version" ] && req+=(device_name)
ckreq || return 1
cat <<EOF
deb http://pkgmaster.devuan.org/merged ascii main contrib non-free
deb http://pkgmaster.devuan.org/merged ascii-updates main contrib non-free
deb http://pkgmaster.devuan.org/merged ascii-security main contrib non-free
deb http://maedevu.maemo.org/${codename} ${codename} main contrib non-free ${device_name}
EOF
}