>From 9681fd9f9e1aa4975a139dc13be5d139cb674cd0 Mon Sep 17 00:00:00 2001 From: Akihiro Kuroiwa <[email protected]> Date: Thu, 12 Nov 2009 15:59:15 +0900 Subject: [PATCH] swarm live
--- examples/makefiles/swarm/Makefile | 121 +++++++++++++++++++++++++++++++++++++ examples/makefiles/swarm/swarm.sh | 53 ++++++++++++++++ 2 files changed, 174 insertions(+), 0 deletions(-) create mode 100644 examples/makefiles/swarm/Makefile create mode 100644 examples/makefiles/swarm/swarm.sh diff --git a/examples/makefiles/swarm/Makefile b/examples/makefiles/swarm/Makefile new file mode 100644 index 0000000..bce0941 --- /dev/null +++ b/examples/makefiles/swarm/Makefile @@ -0,0 +1,121 @@ +################################################################################ +# Purpose: Builds Japanese localized Debian Live USB +# Inputs : Apt repository, or local apt-cacher proxy. +# Output : +# 0) Creates a chrooted Debian system. +# 1) Builds a binary image for USB flash drive. +# Usage : Choose from the following options. +# make build-swarm +# make build-swarm-ja +# make swarm-cacher MIRROR=favorite-mirror-domain.org/debian/ +# make swarm-cacher-ja +# make build-large +# make build-large-ja +# make large-cacher MIRROR=favorite-mirror-domain.org/debian/ +# make large-cacher-ja +# make config gnome japanese builder +# Remarks: "config" is first, "builder" is last. +# References: +# Robotics tutorial seminar at Shinshu University +# http://yakushi.shinshu-u.ac.jp/robotics/?DebianLive +# Mr. Hideki Yamane at Debian Wiki +# http://wiki.debian.org/HidekiYamane +# http://wiki.debian.org/KansaiDebianMeetingOSC2009 +# git clone git://github.com/nogajun/debian-study-live-cd.git +# License: GPL-3+ (http://www.gnu.org/) +# Created: 2009 Akihiro Kuroiwa ([email protected]) +################################################################################ + +MAKECMD=make + +#pager /usr/share/live-helper/includes.debian/lenny/install/README.mirrors.txt +ifndef MIRROR +MIRROR_URI=ftp.jp.debian.org/debian/ +#MIRROR_URI=ftp2.jp.debian.org/debian/ +else +MIRROR_URI=$(MIRROR) +endif + +#Not build. You can customize rules. +.PHONY: small large swarm +small: config xfce installer +large: config gnome installer +swarm: config gnome installer swarm.hook + +#Japanese +.PHONY: small-ja large-ja swarm-ja +small-ja: small japanese +large-ja: large japanese +swarm-ja: swarm japanese + +#Builder. It includes the rule to build a binary image. +.PHONY: build-small build-large build-swarm +build-small: small builder +build-large: large builder +build-swarm: swarm builder + +#Japanese builder. +.PHONY: build-small-ja build-large-ja build-swarm-ja +build-small-ja: small-ja builder +build-large-ja: large-ja builder +build-swarm-ja: swarm-ja builder + +#"*-cacher" needs to install apt-cacher. +.PHONY: small-cacher large-cacher swarm-cacher +small-cacher: small cacher builder +large-cacher: large cacher builder +swarm-cacher: swarm cacher builder + +#Japanese "*-cacher". +.PHONY: small-cacher-ja large-cacher-ja swarm-cacher-ja +small-cacher-ja: small-ja cacher builder +large-cacher-ja: large-ja cacher builder +swarm-cacher-ja: swarm-ja cacher builder + + +.PHONY: config gnome xfce installer cacher swarm.hook builder + +config: + lh_clean + lh_config \ + --distribution lenny \ + --categories "main contrib non-free" \ + --packages "openssh-client ntpdate" \ + --binary-images usb-hdd \ + --hostname="debian-live" \ + --bootappend-live "persistent quickreboot" + +gnome: + lh_config --packages-lists gnome + +xfce: + lh_config --packages-lists xfce + +cacher: + lh_config \ + --mirror-bootstrap "http://localhost:3142/$(MIRROR_URI)" \ + --mirror-chroot "http://localhost:3142/$(MIRROR_URI)" \ + --mirror-chroot-security "http://localhost:3142/security.debian.org/" \ + --mirror-binary "http://$(MIRROR_URI)" \ + --mirror-binary-security "http://security.debian.org/" + +installer: + lh_config --debian-installer enabled + +swarm.hook: + cp swarm.sh config/chroot_local-hooks/ + chmod +x config/chroot_local-hooks/swarm.sh + +builder: + lh_build + + +#Locale rules. +.PHONY: japanese + +japanese: + lh_config \ + --language ja \ + --tasks "japanese-desktop" \ + --bootappend-live "timezone=Asia/Tokyo utc=no locale=ja_JP.UTF-8 keyb=jp kmodel=jp106 persistent quickreboot" + diff --git a/examples/makefiles/swarm/swarm.sh b/examples/makefiles/swarm/swarm.sh new file mode 100644 index 0000000..a24bbda --- /dev/null +++ b/examples/makefiles/swarm/swarm.sh @@ -0,0 +1,53 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install swarm. +# It was originally written by Jakson Aquino +# and modified by Akihiro Kuroiwa <[email protected]>. +# +# To enable it, copy or symlink this hook into your config/chroot_local-hooks +# directory. +# +# This script quotes the manual "Objective-C SWARM at Ubuntu 8.04" +# written by Professor Jakson Aquino. +# http://www.swarm.org/ +# +# Copyright (C) 2009 Jakson Aquino <[email protected]> +# +# live-helper 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. + +cd /root/ + +# Autotools. +# Install the software necessary to download and compile swarm: +PACKAGES="gobjc gperf libxpm-dev libpng12-dev \ +automake emacs21-nox libhdf5-serial-dev blt-dev \ +autoconf libtool make xfonts-75dpi xfonts-100dpi" +apt-get install --yes ${PACKAGES} + +# Now, you can download the swarm source code from Paul Johnson's web site: +wget http://pj.freefaculty.org/Swarm/swarm-2.2.4.tar.gz +tar -xzf swarm-2.2.4.tar.gz +cd swarm-2.2.4 + +# If you want to get the source code from subversion repository, comment out above, and uncomment these lines. +# +#apt-get install --yes subversion +#svn co svn://svn.sv.gnu.org/swarm/trunk/swarm +#cd swarm + +# Then, you can compile swarm: +./autogen.sh +./configure --with-pic --enable-onelib --with-gnu-ld \ + --disable-jar --with-tcl=/usr/lib/tcl8.4/ \ + --without-jdkdir --with-tk=/usr/lib/tk8.4/ +make +make install + +# Swarm is already installed. You should now put this line at the end of your ~/.bashrc, +# because, by default, the Makefiles that come with swarm applications are configured to look for swarm at /usr, +# but since we installed it at /usr/local, we need to inform the Makefiles about this: +cat >> /etc/profile <<EOF +export SWARMHOME=/usr/local +EOF -- 1.6.3.3 -- Akihiro Kuroiwa E-mail: [email protected] -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]
