summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2012-11-20 14:39:43 (GMT)
committer Jaromil <jaromil@dyne.org>2012-11-20 14:39:43 (GMT)
commitd47845f945422fe66aaab0ca2affbfb94d6b9400 (patch)
treeee3a792260be3f5315abb5d92ff6ccea7e504404
parentd81e0260d770593834183ae4800652566cd7c598 (diff)
bugfixes and improvements to buildv0.6.1
both cosmetics and backend, rounding up to release
-rw-r--r--.gitignore1
-rw-r--r--VERSION2
-rw-r--r--build/conf.zsh12
-rw-r--r--build/system/Sources5
-rw-r--r--build/system/conf.zsh53
-rw-r--r--build/system/etc/skel/zshrc15
-rwxr-xr-xbuild/system/etc/zlogin1
-rw-r--r--pack/conf.zsh38
-rw-r--r--pack/media.tree35
-rw-r--r--pack/system.aliases5
-rw-r--r--pack/system.tree4
-rw-r--r--pack/system.version2
-rw-r--r--termapk/AndroidManifest.xml4
-rw-r--r--termapk/res/layout-land/main.xml12
-rw-r--r--termapk/res/layout/main.xml2
-rw-r--r--termapk/src/org/dyne/zshaolin/startup/installer.java13
-rwxr-xr-xzmake60
17 files changed, 156 insertions, 108 deletions
diff --git a/.gitignore b/.gitignore
index 2ed9635..6ceec95 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
*~
*.tar.gz
*.tar.bz2
+*.opk
*.done
*.log
*.installed
diff --git a/VERSION b/VERSION
index 2eb3c4f..ee6cdce 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.5
+0.6.1
diff --git a/build/conf.zsh b/build/conf.zsh
index a7c608a..01dbc7e 100644
--- a/build/conf.zsh
+++ b/build/conf.zsh
@@ -16,6 +16,10 @@ pkgs=(
{ test "$module" = "all" } || { pkgs=("$module") }
+{ test -r $module } || {
+ error "Module not found: $module"
+ return 1 }
+
case $operation in
clean)
for i in $pkgs; do
@@ -24,6 +28,7 @@ case $operation in
for s in `cat Sources | awk '!/^#/ { print $1 }'`; do
act "clean $s"
rm -rf ${s} ${s}.done ${s}.installed
+ { test -r extract } && { rm -rf extract }
done
popd
done
@@ -35,7 +40,14 @@ case $operation in
pushd $ZHOME/build
enter $i ${=@}
popd
+ notice "Copying scripts and configurations present in module $i"
+ { test -r ${i}/bin } && { rsync -dar ${i}/bin $PREFIX/ }
+ { test -r ${i}/etc } && { rsync -dar ${i}/etc $PREFIX/ }
+ { test -r ${i}/var } && { rsync -dar ${i}/var $PREFIX/ }
+ { test -r ${i}/share } && { rsync -dar ${i}/share $PREFIX/ }
done
+
+
notice "Build completed, summary:"
for i in $pkgs; do
notice "$i module"
diff --git a/build/system/Sources b/build/system/Sources
index f9b5827..08c5291 100644
--- a/build/system/Sources
+++ b/build/system/Sources
@@ -11,11 +11,12 @@ grep -2.9 .tar.gz http://www.gnu.org
diffutils -3.2 .tar.gz http://www.gnu.org
most -5.0.0a .tar.bz2 http://www.jedsoft.org/slang/
htop -1.0 .tar.gz
-netcat -0.7.1 .tar.gz
nano -2.2.6 .tar.gz
wipe -2.3.1 .tar.bz2
-opkg -0.1.8 .tar.gz
+file -5.11 .tar.gz
+# netcat -0.7.1 .tar.gz
+# opkg -0.1.8 .tar.gz
# man -1.6g .tar.gz
# openssl -1.0.0g .tar.gz
# shellinabox -2.10 .tar.gz
diff --git a/build/system/conf.zsh b/build/system/conf.zsh
index b2b78fc..f8e4679 100644
--- a/build/system/conf.zsh
+++ b/build/system/conf.zsh
@@ -32,14 +32,23 @@ zinstall ncurses
ln -sf $PREFIX/include/ncursesw/* $PREFIX/include/
## s-lang
-compile slang default nomake --disable-static
-pushd slang/src && make static >> $LOGS
-popd
+notice "Building S-Lang"
+{ test -r slang.done } || {
+ pushd slang
+ zconfigure default --disable-static
+ { test $? = 0 } && {
+ pushd src && make static >> $LOGS
+ { test $? = 0 } && { touch ../../slang.done }
+ popd }
+ popd }
zinstall slang install-static
## zsh
compile zsh default
zinstall zsh
+{test $? = 0 } && {
+ # zcompile the grmlrc script to gain loading speed
+ zcompile $PREFIX/etc/grmlrc }
# awk
compile gawk default
@@ -61,23 +70,22 @@ zinstall diffutils
compile htop default "--disable-native-affinity --enable-unicode"
zinstall htop
-## netcat
-compile netcat default
-zinstall netcat
-
## nano
compile nano default
zinstall nano
## most
-compile most default nomake
+notice "Building most"
{ test -r most.done } || {
-pushd most
-gcc -c src/chkslang.c -o src/objs/chkslang.o
-gcc src/objs/chkslang.o -o src/objs/chkslang
-make >> $LOGS
-{ test $? = 0 } && { touch most.done }
-popd
+ pushd most
+ zconfigure default
+ { test $? = 0 } && {
+ gcc -Isrc -c src/chkslang.c -o src/objs/chkslang.o
+ gcc src/objs/chkslang.o -o src/objs/chkslang
+ zmake
+ { test $? = 0 } && { touch ../most.done }
+ }
+ popd
}
zinstall most
@@ -91,9 +99,13 @@ compile wipe default
act "Wipe installed."
}
+## file
+compile file default
+zinstall file
+
## Opkg
-compile opkg default "--disable-curl --disable-gpg --disable-shave"
-zinstall opkg
+# compile opkg default "--disable-curl --disable-gpg --disable-shave"
+# zinstall opkg
## manual page browser
#compile man default
@@ -131,15 +143,6 @@ zinstall opkg
###########################################
## COPY CONFIGURATIONS AND SCRIPTS
-echo "Copying scripts and configurations..."
-{ test -r bin } && { echo -n " bin"; rsync -dar bin $PREFIX/ }
-{ test -r etc } && {
- echo -n " etc"; rsync -dar etc $PREFIX/
- # zcompile the grmlrc script to gain loading speed
- zcompile $PREFIX/etc/grmlrc }
-{ test -r var } && { echo -n " var"; rsync -dar var $PREFIX/ }
-{ test -r share } && { echo -n " share"; rsync -dar share $PREFIX/ }
-echo
# TODO busybox by hand for now
diff --git a/build/system/etc/skel/zshrc b/build/system/etc/skel/zshrc
index d371777..bcc156f 100644
--- a/build/system/etc/skel/zshrc
+++ b/build/system/etc/skel/zshrc
@@ -1,5 +1,7 @@
-# ZShaolin user configuration
-# put your tweaks in this file
+# ZShaolin shell configuration
+
+# Distributed configuration
+# put your tweaks in ~/.profile instead of here
# setup zsh modules path
fpath=(
@@ -9,5 +11,12 @@ fpath=(
# GRML configuration - grml.org/zsh
source $SYS/etc/grmlrc
-source ~/.grml.conf
+{ test -r ~/.grml.conf } && { source ~/.grml.conf }
+
+# Vim configuration
+export VIMRUNTIME=${SYS}/share/vim/vim73
+
+# Custom user configuration
+{ test -r ~/.profile } && { source ~/.profile }
+return 0 \ No newline at end of file
diff --git a/build/system/etc/zlogin b/build/system/etc/zlogin
index 5cd6b59..eb25d18 100755
--- a/build/system/etc/zlogin
+++ b/build/system/etc/zlogin
@@ -1,3 +1,4 @@
+#!env sh
# ZShaolin initialization
# detect if we are running in a debugging mode from zmake
diff --git a/pack/conf.zsh b/pack/conf.zsh
index 7d65dce..9209710 100644
--- a/pack/conf.zsh
+++ b/pack/conf.zsh
@@ -6,11 +6,18 @@
sync_module() {
- notice "Syncing from sysroot"
+ notice "Syncing from system"
rm -rf system
mkdir -p system
+
+ rm -f all.tree && touch all.tree
+ rm -f all.aliases && touch all.aliases
+ for t in `find . -name '*.tree'`; do
+ cat $t | sort >> all.tree; done
+ for a in `find . -name '*.aliases'`; do
+ cat $a | sort >> all.aliases; done
- rsync -dar --files-from=all.tree $ZHOME/sysroot/ system/
+ rsync -dar --files-from=all.tree $ZHOME/system/ system/
}
strip_module() {
@@ -24,6 +31,11 @@ strip_module() {
done
}
+zcompile_module() {
+ notice "Zcompiling zsh scripts"
+ zcompile system/etc/grmlrc
+}
+
alias_module() {
notice "Setting aliases"
if [ -r $ZHOME/pack/all.aliases ]; then
@@ -42,8 +54,8 @@ alias_module() {
}
pack_module() {
- ver=${ver:-`cat system.version`}
- notice "Packing system version $ver"
+ ver=${ver:-`cat ${ZHOME}/VERSION`}
+ notice "Packing system version: $ver"
tar cf system-${ver}.tar system
{ test -r system-${ver}.tar.lzma } && { rm -f system-${ver}.tar.lzma }
lzma -z -7 system-${ver}.tar
@@ -52,24 +64,22 @@ pack_module() {
}
install_module() {
- ver=${ver:-`cat system.version`}
+ ver=${ver:-`cat ${ZHOME}/VERSION`}
cp $ZHOME/pack/system-$ver.tar.lzma $ZHOME/termapk/assets/system-$ver.tar.lzma.mp3
act "Including busybox binary:"
- ls -l $ZHOME/build/busybox/busybox
- cp $ZHOME/build/busybox/busybox \
+ ls -l $ZHOME/build/busybox/busybox.bin && \
+ cp $ZHOME/build/busybox/busybox.bin \
$ZHOME/termapk/assets/busybox.mp3
}
-rm -f all.tree && touch all.tree
-rm -f all.aliases && touch all.aliases
-for t in `find . -name '*.tree'`; do
- cat $t | sort >> all.tree; done
-for a in `find . -name '*.aliases'`; do
- cat $a | sort >> all.aliases; done
-ver=`cat system.version`
+
+ver=`cat ${ZHOME}/VERSION`
+
+notice "Packing system version $ver"
sync_module
strip_module
+zcompile_module
alias_module
pack_module
install_module
diff --git a/pack/media.tree b/pack/media.tree
index 8ab7b23..d408edf 100644
--- a/pack/media.tree
+++ b/pack/media.tree
@@ -27,41 +27,6 @@
./share/ffmpeg/libx264-ipod640.ffpreset
./share/ffmpeg/libx264-ipod320.ffpreset
./share/ffmpeg/libvpx-360p.ffpreset
-./share/man/man1/ffprobe.1
-./share/man/man1/oggz-codecs.1
-./share/man/man1/play.1
-./share/man/man1/animate.1
-./share/man/man1/oggz-merge.1
-./share/man/man1/oggz-known-codecs.1
-./share/man/man1/ffmpeg.1
-./share/man/man1/speexenc.1
-./share/man/man1/oggz-sort.1
-./share/man/man1/identify.1
-./share/man/man1/metaflac.1
-./share/man/man1/convert.1
-./share/man/man1/oggz.1
-./share/man/man1/sox.1
-./share/man/man1/montage.1
-./share/man/man1/stream.1
-./share/man/man1/mogrify.1
-./share/man/man1/oggz-diff.1
-./share/man/man1/oggz-comment.1
-./share/man/man1/oggz-info.1
-./share/man/man1/compare.1
-./share/man/man1/oggz-dump.1
-./share/man/man1/oggz-scan.1
-./share/man/man1/speexdec.1
-./share/man/man1/conjure.1
-./share/man/man1/oggz-chop.1
-./share/man/man1/soxi.1
-./share/man/man1/composite.1
-./share/man/man1/oggz-rip.1
-./share/man/man1/oggz-validate.1
-./share/man/man1/import.1
-./share/man/man1/ImageMagick.1
-./share/man/man1/display.1
-./share/man/man1/flac.1
-./share/man/man1/rec.1
./bin/oggz-info
./bin/speexdec
./bin/montage
diff --git a/pack/system.aliases b/pack/system.aliases
index 7661473..1f160d7 100644
--- a/pack/system.aliases
+++ b/pack/system.aliases
@@ -2,13 +2,8 @@ sbin/dropbear sshd
bin/dbclient ssh
bin/dropbearkey ssh-keygen
bin/htop top
-bin/netcat nc
bin/zsh sh
bin/zsh ash
bin/zsh bash
bin/gawk awk
-share/man/man1/dbclient.1 ssh.1
-share/man/man1/gawk.1 awk.1
-share/man/man1/htop.1 top.1
-
diff --git a/pack/system.tree b/pack/system.tree
index 3603969..600c8f5 100644
--- a/pack/system.tree
+++ b/pack/system.tree
@@ -1,10 +1,10 @@
./var/pid
./var/log
-./etc/grml.conf
./etc/grmlrc
-./etc/zshrc
./etc/zlogin
+./etc/zinit
./etc/init.d
+./etc/skel
./share/nano
./share/terminfo
./share/awk
diff --git a/pack/system.version b/pack/system.version
index 2eb3c4f..5a2a580 100644
--- a/pack/system.version
+++ b/pack/system.version
@@ -1 +1 @@
-0.5
+0.6
diff --git a/termapk/AndroidManifest.xml b/termapk/AndroidManifest.xml
index b837940..1c4d29f 100644
--- a/termapk/AndroidManifest.xml
+++ b/termapk/AndroidManifest.xml
@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.dyne.zshaolin"
- android:versionName="0.5"
- android:versionCode="2">
+ android:versionName="0.6.1"
+ android:versionCode="4">
<!--android:installLocation="preferExternal" -->
<uses-permission android:name="android.permission.INTERNET" />
diff --git a/termapk/res/layout-land/main.xml b/termapk/res/layout-land/main.xml
index 2722057..2e486de 100644
--- a/termapk/res/layout-land/main.xml
+++ b/termapk/res/layout-land/main.xml
@@ -61,13 +61,23 @@
android:layout_height="wrap_content"
android:text="Options"/>
+
<Button android:id="@+id/main_help"
android:layout_width="200dip"
android:layout_height="wrap_content"
- android:text="Help"/>
+ android:text="Website"/>
+
+ <TextView android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:textColor="#ffffff"
+ android:textSize="12dip"
+ android:text="ZShaolin.org\n
+by Jaromil @ dyne.org (2012)"/>
</LinearLayout>
+
</LinearLayout>
</FrameLayout>
diff --git a/termapk/res/layout/main.xml b/termapk/res/layout/main.xml
index e7f09c4..bdc2fb4 100644
--- a/termapk/res/layout/main.xml
+++ b/termapk/res/layout/main.xml
@@ -60,7 +60,7 @@
<Button android:id="@+id/main_help"
android:layout_width="200dip"
android:layout_height="wrap_content"
- android:text="Documentation"/>
+ android:text="Website"/>
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content"
diff --git a/termapk/src/org/dyne/zshaolin/startup/installer.java b/termapk/src/org/dyne/zshaolin/startup/installer.java
index bb2abaa..f63f30e 100644
--- a/termapk/src/org/dyne/zshaolin/startup/installer.java
+++ b/termapk/src/org/dyne/zshaolin/startup/installer.java
@@ -38,9 +38,9 @@ import org.dyne.zshaolin.startup.setup.filemanager;
public class installer extends Activity implements OnClickListener{
//THE MAIN INSTALL VALUE
- public static int CURRENT_INSTALL_SYSTEM_NUM = 1;
- public static String CURRENT_INSTALL_SYSTEM = "System v0.5";
- public static String CURRENT_INSTALL_ASSETFILE = "system-0.5.tar.lzma.mp3";
+ public static int CURRENT_INSTALL_SYSTEM_NUM = 4;
+ public static String CURRENT_INSTALL_SYSTEM = "System v0.6.1";
+ public static String CURRENT_INSTALL_ASSETFILE = "system-0.6.1.tar.lzma.mp3";
private ProgressDialog mInstallProgress;
@@ -206,9 +206,10 @@ public class installer extends Activity implements OnClickListener{
mInstallHandler.sendMessage(msg);
File etc = new File(system,"etc");
-
+ File skel = new File(etc, "skel");
// zshrc
- File zshrc = new File(etc,"zshrc");
+
+ File zshrc = new File(skel,"zshrc");
File zshrcu = new File(home,".zshrc");
if(!zshrcu.exists() || mOverwriteAll){
pp = Runtime.getRuntime().exec
@@ -218,7 +219,7 @@ public class installer extends Activity implements OnClickListener{
}
// grml.conf
- File grml = new File(etc,"grml.conf");
+ File grml = new File(skel,"grml.conf");
File grmlu = new File(home,".grml.conf");
if(!grmlu.exists() || mOverwriteAll){
pp = Runtime.getRuntime().exec
diff --git a/zmake b/zmake
index af02294..bd2240c 100755
--- a/zmake
+++ b/zmake
@@ -89,7 +89,7 @@ typeset CC CXX LD AR RANLIB OBJCOPY STRIP
#TOOLCHAIN=$ZHOME/toolchains/google-ndk
TOOLCHAIN=$ZHOME/toolchains/crosstool-ng/x-tools
# configure the install prefix
-PREFIX=$ZHOME/sysroot
+PREFIX=$ZHOME/system
# configure the compilers
CC=${ZHOME}/wrap/static-cc
CXX=${ZHOME}/wrap/static-c++
@@ -171,13 +171,46 @@ prepare_sources() {
}
# decompress the file
{ test -r ${name} } || {
- act "decompressing in ${name}"
+ act "decompressing ${name}"
case $arch in
- .tar.gz) tar xfz ${file} ;;
- .tar.bz2) tar xfj ${file} ;;
+ ## OPK
+ .opk)
+ mkdir -p extract
+ pushd extract
+ ln -sf ../${file} .
+ ar x ${file}
+ if [ -r data.tar.gz ]; then
+ tar xfz data.tar.gz
+ if [ $? = 0 ]; then
+ touch ../${name}.done
+ touch ../${name}.installed
+ else error "error decompressing tarred package"; fi
+ else error "data not found in package"; fi
+ popd
+ ;;
+
+ ## IPK
+ .ipk)
+ mkdir -p extract
+ pushd extract
+ ln -sf ../${file} ${name}${ver}.tar.gz
+ tar xfz ${name}${ver}.tar.gz
+ if [ -r data.tar.gz ]; then
+ tar xfz data.tar.gz
+ if [ $? = 0 ]; then
+ touch ../${name}.done
+ touch ../${name}.installed
+ else error "error decompressing tarred package"; fi
+ else error "data not found in package"; fi
+ popd
+ ;;
+
+ ## BARE SOURCE
+ .tar.gz) tar xfz ${file}; mv ${name}${ver} ${name} ;;
+ .tar.bz2) tar xfj ${file}; mv ${name}${ver} ${name} ;;
*) error "compression not supported: $arch"
esac
- mv ${name}${ver} ${name}
+
}
act "${name} source ready"
done
@@ -329,17 +362,24 @@ zinstall() {
return 1
fi
- notice "$1 installed in sysroot"
+ notice "$1 installed"
touch ${1}.installed
return 0
}
list_sources() {
touch /tmp/zshaolin.list
- for i in `find ${ZHOME}/build -type f -name Sources`; do
+ typeset -a modules
+ if [ "${#@}" = "0" ]; then modules=(`find ${ZHOME}/build -type f -name Sources`)
+ else
+ shift
+ for m in ${=@}; do
+ modules+=(${ZHOME}/build/${m}/Sources); done
+ fi
+ for i in $modules; do
cat $i | awk '!/^#/ { print $1 $2 }' >> /tmp/zshaolin.list
done
- cat /tmp/zshaolin.list | sort | uniq
+ cat /tmp/zshaolin.list | sort | uniq | sed 's/_arm//;s/eabi//'
rm -f /tmp/zshaolin.list
}
@@ -369,12 +409,12 @@ case "$1" in
zconfigure ${args}
;;
test)
- ZHOME=$ZHOME zsh sysroot/etc/zlogin
+ ZHOME=$ZHOME zsh system/etc/zlogin
;;
source)
return ;;
list)
- list_sources
+ list_sources ${=@}
;;
help|-h)
error "No help. We're all on our own, for now."