slitaz-forge rev 469

arm: add basic web interface
author Christophe Lincoln <pankso@slitaz.org>
date Mon Mar 03 01:01:31 2014 +0100 (2014-03-03)
parents 86dc27f7b879
children e60fe47200b2
files arm/favicon.ico arm/images/logo.png arm/index.html arm/style.css arm/tools.cgi
line diff
     1.1 Binary file arm/favicon.ico has changed
     2.1 Binary file arm/images/logo.png has changed
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/arm/index.html	Mon Mar 03 01:01:31 2014 +0100
     3.3 @@ -0,0 +1,123 @@
     3.4 +<!DOCTYPE html>
     3.5 +<html lang="en">
     3.6 +<head>
     3.7 +	<title>SliTaz ARM</title>
     3.8 +	<meta charset="utf-8" />
     3.9 +	<link rel="stylesheet" type="text/css" href="style.css" />
    3.10 +	<link rel="shortcut icon" href="favicon.ico" />
    3.11 +</head>
    3.12 +<body>
    3.13 +
    3.14 +<div id="header">
    3.15 +	<div id="logo"></div>
    3.16 +	<div id="network">
    3.17 +		<!-- <a href="http://scn.slitaz.org/">SCN</a>
    3.18 +		<a href="http://doc.slitaz.org/">Doc</a>
    3.19 +		<a href="http://forum.slitaz.org/">Forum</a> -->
    3.20 +		<a href="http://bugs.slitaz.org/">Bugs</a>
    3.21 +		<a href="http://hg.slitaz.org/slitaz-arm">Hg</a>
    3.22 +		<a href="http://cook.slitaz.org/cross/arm/">Cooker</a>
    3.23 +	</div>
    3.24 +	<h1><a href="./">SliTaz ARM</a></h1>
    3.25 +</div>
    3.26 +
    3.27 +<!-- Content -->
    3.28 +<div id="content">
    3.29 +	
    3.30 +<h2>Welcome to SliTaz ARM</h2>
    3.31 +
    3.32 +<p>
    3.33 +	This website provide informations, notes and links about the SliTaz
    3.34 +	GNU/Linux port to the ARM architecture.
    3.35 +</p>
    3.36 +
    3.37 +<h3>Packages</h3>
    3.38 +
    3.39 +<p>
    3.40 +	All SliTaz ARM packages are automaticaly built by the
    3.41 +	<a href="http://cook.slitaz.org/cross/arm/">ARM Cooker</a>. To properly
    3.42 +	handle SLITAZ_ARCH varibale the recommended Packages Manager is
    3.43 +	<a href="http://hg.slitaz.org/spk">spk</a>. The recommended way to
    3.44 +	start with Spk Toolset is to generate a distro and include latest Hg
    3.45 +	version with 'sat gen --spk' and then emulate the system to try it
    3.46 +	out. 
    3.47 +</p>
    3.48 +
    3.49 +<p>
    3.50 +	Run 'spk-up --list' to get the latest 
    3.51 +	<a href="tools.cgi?pkgs">packages list</a>.
    3.52 +</p>
    3.53 +
    3.54 +<p>
    3.55 +	Current ARM packages mirror URL:
    3.56 +	<a href="http://cook.slitaz.org/cross/arm/packages/"
    3.57 +		>http://cook.slitaz.org/cross/arm/packages/</a>
    3.58 +</p>
    3.59 +
    3.60 +<h3>SliTaz ARM Tools</h3>
    3.61 +
    3.62 +<p>
    3.63 +	To create some custom ARM SliTaz flavors we use a tool called 'sat'
    3.64 +	witch stand for SliTaz ARM Tool. Sat is a cmdline tool all written
    3.65 +	in SHell script and in the spirit of SliTaz, light, fast, easy to
    3.66 +	use! You may want to browse 
    3.67 +	<a href="http://hg.slitaz.org/slitaz-arm">slitaz-arm</a>
    3.68 +	Hg repo and have a look to the 
    3.69 +	<a href="tools.cgi?doc&amp;tool=sat">README</a>.
    3.70 +</p>
    3.71 +
    3.72 +<pre>
    3.73 +$ hg clone http://hg.slitaz.org/slitaz-arm
    3.74 +</pre>
    3.75 +
    3.76 +<p>
    3.77 +	Sat in under heavy development so dont forget to update your Hg repo
    3.78 +	- March 2014
    3.79 +</p>
    3.80 +
    3.81 +<h3>Raspberry Pi</h3>
    3.82 +
    3.83 +<p>
    3.84 +	Currently SliTaz official ARM port works on the Raspberry Pi and can
    3.85 +	be used to setup a small server. DirectFB is also ported and provide
    3.86 +	nice and light GUI support. A new tool is on the stove to create
    3.87 +	custom Rpi flavors with official Kernel, cutom boot options and more.
    3.88 +</p>
    3.89 +
    3.90 +<p>
    3.91 +	Official Raspberry Pi website:
    3.92 +	<a href="http://www.raspberrypi.org/">www.raspberrypi.org</a>
    3.93 +</p>
    3.94 +
    3.95 +<h3>Prebuilt ARM Toolchain</h3>
    3.96 +
    3.97 +<p>
    3.98 +	To compile SliTaz packages to ARM you need a working cross compilation
    3.99 +	toolchain. You can built your own with 'cross' or use our prebuilt
   3.100 +	toolchains avalaible from SliTaz Mirror:
   3.101 +	<a href="http://mirror.slitaz.org/packages/cross/"
   3.102 +		>http://mirror.slitaz.org/packages/cross/</a>
   3.103 +</p>
   3.104 +
   3.105 +<h3>Cross compiling</h3>
   3.106 +
   3.107 +<p>
   3.108 +	SliTaz provide all the necesary tools for cross compiling Open Source
   3.109 +	software. The <a href="http://hg.slitaz.org/cookutils">cookutils</a>
   3.110 +	package provide 'cross' witch is used to create cross compilation
   3.111 +	toolchains and 'cook' is used to cross compile SliTaz packages.
   3.112 +</p>
   3.113 +
   3.114 +<p>
   3.115 +	README, howto and doc: <a href="tools.cgi?doc&amp;tool=cross">cross</a>
   3.116 +	- <a href="tools.cgi?doc&amp;tool=cook">cook</a>
   3.117 +</p>
   3.118 +
   3.119 +</div>
   3.120 +
   3.121 +<div id="footer">
   3.122 +	&copy; 2014 - <a href="http://www.slitaz.org/">SliTaz GNU/Linux</a>
   3.123 +</div>
   3.124 +
   3.125 +</body>
   3.126 +</html>
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/arm/style.css	Mon Mar 03 01:01:31 2014 +0100
     4.3 @@ -0,0 +1,139 @@
     4.4 +/* CSS style for SliTaz Network (minimal version) */
     4.5 +
     4.6 +html { min-height: 102%; }
     4.7 +body { font: 13px sans-serif, vernada, arial; margin: 0; }
     4.8 +h1 { margin: 0; padding: 8px; color: #fff; font-size: 20px; }
     4.9 +h1 a { color: #fff; text-decoration: none; }
    4.10 +h2 { color: #444; }
    4.11 +h3 { color: #666; font-size: 140%; border-bottom: 1px dashed #afafaf; }
    4.12 +a { text-decoration: underline; color: #215090; }
    4.13 +a:hover { text-decoration: none; }
    4.14 +img { border: 0pt none; vertical-align: middle; }
    4.15 +pre {
    4.16 +	overflow: auto;
    4.17 +	font-size: 98%;
    4.18 +}
    4.19 +
    4.20 +/* Header */
    4.21 +
    4.22 +#header {
    4.23 +	background: #222;
    4.24 +	height: 40px;
    4.25 +	border-bottom: 4px solid #afafaf;
    4.26 +}
    4.27 +
    4.28 +#header h1 {
    4.29 +	margin: 0;
    4.30 +	padding: 8px 0 0 42px;
    4.31 +	width: 250px;
    4.32 +}
    4.33 +
    4.34 +#header h1 a { 
    4.35 +	color: white; 
    4.36 +	text-decoration: none;
    4.37 +	font-size: 20px;
    4.38 +	font-style: italic;
    4.39 +}
    4.40 +
    4.41 +#header h1 a:hover { 
    4.42 +	color: #afafaf;
    4.43 +}
    4.44 +
    4.45 +/* Header links */
    4.46 +
    4.47 +#network { 
    4.48 +	float: right; 
    4.49 +	padding: 14px 5px 0; 
    4.50 +	font-size: 12px;
    4.51 +}
    4.52 +
    4.53 +#network a, #network span {
    4.54 +	padding: 0 4px;
    4.55 +	color: #fff; 
    4.56 +	font-weight: bold;
    4.57 +	text-decoration: none;
    4.58 +}
    4.59 +
    4.60 +#network a:hover, #network span { color: #afafaf; }
    4.61 +
    4.62 +/* Logo */
    4.63 +
    4.64 +#logo {
    4.65 +	background: url(images/logo.png) no-repeat left;
    4.66 +	position: absolute;
    4.67 +	float: left;
    4.68 +	left: 0px;
    4.69 +	top: 0px;
    4.70 +	width: 40px;
    4.71 +	height: 40px;
    4.72 +}
    4.73 +
    4.74 +/* Search */
    4.75 +
    4.76 +#search {
    4.77 +	position: absolute;
    4.78 +	right: 20px;
    4.79 +	top: 60px;
    4.80 +}
    4.81 +
    4.82 +#search input[type="text"] {
    4.83 +	width: 200px;
    4.84 +	
    4.85 +	padding: 4px;
    4.86 +	margin: 4px 0px;
    4.87 +	font-size: 14px;
    4.88 +	line-height: 1.2em;
    4.89 +	background: #fefefe;
    4.90 +	border: 2px solid #afafaf;
    4.91 +	-webkit-appearance: none;
    4.92 +	-webkit-padding-end: 12px;
    4.93 +	-webkit-padding-start: 6px;
    4.94 +}
    4.95 +
    4.96 +/* Content */
    4.97 +
    4.98 +#content {
    4.99 +	margin: 40px auto;
   4.100 +	padding: 0 20px;
   4.101 +	text-align: justify;
   4.102 +	max-width: 720px;
   4.103 +}
   4.104 +
   4.105 +.box {
   4.106 +	padding: 6px;
   4.107 +	margin: 4px 0px;
   4.108 +}
   4.109 +
   4.110 +pre, .box {
   4.111 +	background-color: #f8f8f8;
   4.112 +	border: 1px solid #ddd;
   4.113 +}
   4.114 +
   4.115 +pre {
   4.116 +	padding: 10px;
   4.117 +}
   4.118 +
   4.119 +pre img { margin: 4px 4px 4px 0px; }
   4.120 +
   4.121 +.error { color: red; }
   4.122 +.ok { color: green; }
   4.123 +.date { color: #666; font-size: 96%; }
   4.124 +
   4.125 +/* Round corner */
   4.126 +
   4.127 +pre, img, .box, input[type="text"] {
   4.128 +	-moz-border-radius: 4px;
   4.129 +	-webkit-border-radius: 4px;
   4.130 +	border-radius: 4px;
   4.131 +}
   4.132 +
   4.133 +/* Footer */
   4.134 +
   4.135 +#footer {
   4.136 +	text-align: center;
   4.137 +	padding: 20px;
   4.138 +	border-top: 1px solid #ddd;
   4.139 +	font-size: 90%;
   4.140 +}
   4.141 +
   4.142 +#footer a { padding: 0 2px; }
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/arm/tools.cgi	Mon Mar 03 01:01:31 2014 +0100
     5.3 @@ -0,0 +1,88 @@
     5.4 +#!/bin/sh
     5.5 +#
     5.6 +# SliTaz ARM CGI Tools.
     5.7 +#
     5.8 +. /usr/lib/slitaz/httphelper.sh
     5.9 +
    5.10 +repos="/home/slitaz/repos"
    5.11 +pkgs="/home/slitaz/cooking/arm/packages"
    5.12 +mirror="http://cook.slitaz.org/cross/arm/packages/"
    5.13 +hgsat="$repos/slitaz-arm"
    5.14 +hgcook="$repos/cookutils"
    5.15 +
    5.16 +#
    5.17 +# Functions
    5.18 +#
    5.19 +
    5.20 +html_header() {
    5.21 +	cat << EOT
    5.22 +<!DOCTYPE html>
    5.23 +<html lang="en">
    5.24 +<head>
    5.25 +	<title>SliTaz ARM $title</title>
    5.26 +	<meta charset="utf-8" />
    5.27 +	<link rel="stylesheet" type="text/css" href="style.css" />
    5.28 +</head>
    5.29 +<body>
    5.30 +
    5.31 +<div id="header">
    5.32 +	<div id="logo"></div>
    5.33 +	<div id="network">
    5.34 +		<a href="http://bugs.slitaz.org/">Bugs</a>
    5.35 +		<a href="http://hg.slitaz.org/slitaz-arm">Hg</a>
    5.36 +		<a href="http://cook.slitaz.org/cross/arm/">Cooker</a>
    5.37 +	</div>
    5.38 +	<h1><a href="./">SliTaz ARM</a></h1>
    5.39 +</div>
    5.40 +
    5.41 +<!-- Content -->
    5.42 +<div id="content">
    5.43 +EOT
    5.44 +}
    5.45 +
    5.46 +html_footer() {
    5.47 +	cat << EOT
    5.48 +</div>
    5.49 +
    5.50 +</body>
    5.51 +</html>
    5.52 +EOT
    5.53 +}
    5.54 +
    5.55 +#
    5.56 +# Handle GET actions
    5.57 +#
    5.58 +
    5.59 +case " $(GET) " in
    5.60 +	*\ doc\ *)
    5.61 +		header "Content-Type: text/plain"
    5.62 +		case "$(GET tool)" in
    5.63 +			cook) cat ${hgcook}/README ;;
    5.64 +			cross) cat ${hgcook}/doc/cross.txt ;;
    5.65 +			sat) cat ${hgsat}/README ;;
    5.66 +			*) echo "No README file for: $(GET tool)" ;;
    5.67 +		esac ;;
    5.68 +	*\ pkgs\ *)
    5.69 +		# TODO: link packages and add link to raw lists
    5.70 +		title="- Packages"
    5.71 +		count="$(cat $pkgs/packages.list | wc -l)"
    5.72 +		html_header
    5.73 +		echo "<h2>Packages: $count</h2>"
    5.74 +		IFS="|"
    5.75 +		cat $pkgs/packages.desc | while read pkg vers desc web deps
    5.76 +		do
    5.77 +			cat << EOT
    5.78 +<div>
    5.79 +	<b>$pkg</b> $vers
    5.80 +	<pre>  $desc</pre>
    5.81 +</div>
    5.82 +EOT
    5.83 +		done
    5.84 +		unset IFS
    5.85 +		html_footer ;;
    5.86 +	*)
    5.87 +		header "Content-Type: text/plain"
    5.88 +		echo "Hello World!" ;;
    5.89 +esac
    5.90 +
    5.91 +exit 0