mirror of https://github.com/parazyd/arm-sdk.git
add blend try
This commit is contained in:
parent
e704882762
commit
2a621119c3
|
|
@ -0,0 +1,105 @@
|
|||
#!/usr/bin/env zsh
|
||||
# Copyright (c) 2016 Dyne.org Foundation
|
||||
# arm-sdk is written and maintained by Ivan J. <parazyd@dyne.org>
|
||||
#
|
||||
# This file is part of arm-sdk
|
||||
#
|
||||
# This source code is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This software is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this source code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
## build script for Dowse
|
||||
|
||||
blend=dowse
|
||||
|
||||
extra_packages+=(
|
||||
zsh
|
||||
iptables
|
||||
ebtables
|
||||
sqlite3
|
||||
procps
|
||||
gettext-base
|
||||
procps
|
||||
net-tools
|
||||
autoconf
|
||||
automake
|
||||
libssl-dev
|
||||
libbind-dev
|
||||
libpcap-dev
|
||||
unzip
|
||||
wget
|
||||
gcc
|
||||
g++
|
||||
make
|
||||
cmake
|
||||
libtool
|
||||
liblo-dev
|
||||
libnetfilter-conntrack3
|
||||
libnetfilter-queue-dev
|
||||
libsqlite3-dev
|
||||
sqlite3
|
||||
libjemalloc-dev
|
||||
libseccomp2
|
||||
libsodium-dev
|
||||
libhiredis-dev
|
||||
libkmod-dev
|
||||
bind9-host
|
||||
bison
|
||||
gawk
|
||||
libevent-dev
|
||||
libjansson-dev
|
||||
asciidoc
|
||||
uuid-dev
|
||||
libldns-dev
|
||||
python-redis
|
||||
python-hiredis
|
||||
)
|
||||
|
||||
preinst() {
|
||||
fn preinst
|
||||
req=(strapdir blend)
|
||||
ckreq || return 1
|
||||
|
||||
notice "executing $blend preinst"
|
||||
|
||||
install_extra_pkgs
|
||||
|
||||
cat <<EOF | sudo tee ${strapdir}/${blend}-preinst
|
||||
#!/bin/sh
|
||||
useradd -m dowse
|
||||
echo "dowse:dowse" | chpasswd
|
||||
|
||||
sudo -u dowse "git clone https://github.com/dyne/dowse.git /home/dowse/dowse-src"
|
||||
cd /home/dowse/dowse-src
|
||||
sudo -u dowse "make"
|
||||
make install
|
||||
EOF
|
||||
|
||||
sudo chmod +x $strapdir/${blend}-preinst
|
||||
sudo -E chroot $strapdir /${blend}-preinst
|
||||
}
|
||||
|
||||
postinst() {
|
||||
fn postinst
|
||||
req=(strapdir)
|
||||
ckreq || return 1
|
||||
|
||||
notice "executing $blend postinst"
|
||||
|
||||
sudo sed -i -e 's/exit 0//' $strapdir/etc/rc.local
|
||||
cat <<EOF | sudo tee -a ${strapdir}/etc/rc.local
|
||||
|
||||
sudo -u dowse "/home/dowse/dowse-src/start.sh"
|
||||
|
||||
exit 0
|
||||
EOF
|
||||
}
|
||||
16
sdk
16
sdk
|
|
@ -27,7 +27,7 @@ QUIET=0
|
|||
|
||||
[[ $DEBUG = 1 ]] && {
|
||||
CPVERBOSE="-v"
|
||||
LOG="armsdk.log"
|
||||
#LOG="armsdk.log"
|
||||
} || [[ $DEBUG = 0 ]] && {
|
||||
CPVERBOSE=""
|
||||
setopt pushdsilent
|
||||
|
|
@ -58,6 +58,7 @@ load() {
|
|||
fn load "$@"
|
||||
os="$1"
|
||||
dev="$2"
|
||||
blend="$3"
|
||||
req=(os dev)
|
||||
ckreq || return 1
|
||||
|
||||
|
|
@ -89,15 +90,22 @@ load() {
|
|||
"devuan" "$R/lib/libdevuansdk/libdevuansdk"
|
||||
)
|
||||
|
||||
blend_map=(
|
||||
"dowse" "$R/extra/blends/dowse.blend"
|
||||
)
|
||||
|
||||
boardlib="${board_map[$dev]}"
|
||||
oslib="${os_map[$os]}"
|
||||
|
||||
[[ -f $boardlib ]] || { die "no valid boards specified"; exit 1 }
|
||||
[[ -f $oslib ]] || { die "no valid distro specified"; exit 1 }
|
||||
[[ -n $blend ]] && { blendlib="${blend_map[$blend]}" }
|
||||
|
||||
source $boardlib && act "$device_name build script loaded"
|
||||
export OS=$os
|
||||
source $oslib
|
||||
[[ -f $boardlib ]] && source $boardlib \
|
||||
&& act "$device_name build script loaded"
|
||||
[[ -f $oslib ]] && source $oslib
|
||||
[[ -f $blendlib ]] && source $blendlib \
|
||||
&& act "blend $os loaded"
|
||||
|
||||
workdir="$R/tmp/${os}-${arch}-build"
|
||||
strapdir="$workdir/bootstrap"
|
||||
|
|
|
|||
Loading…
Reference in New Issue