Commit 6b46ac68 authored by Alexandre Bourget's avatar Alexandre Bourget
Browse files

WEBSITE update: added build instructions. Fix get_page.

We can now retrieve files from the git repository without passing them
through `asciidoc`. This allows us to retrieve images, etc..
parent 3a5608d5
...@@ -5,18 +5,42 @@ Build notes ...@@ -5,18 +5,42 @@ Build notes
----------- -----------
sflphoned
~~~~~~~~~
Instructions to build `sflphoned`:
libiax2 libiax2
~~~~~~~ ^^^^^^^
If you don't have `libiax2` installed (check version in Go to `libs/libiax2` and run:
sflink:Dependencies[the dependencies]), go to the `libs` directory, and run:
------------------------- -------------------------
./libiax2.sh
cd libiax2
./configure --prefix=/usr ./configure --prefix=/usr
make make
sudo make install sudo make install
------------------------- -------------------------
\ No newline at end of file
the daemon
^^^^^^^^^^
Then, go to the root of the repository, and run:
---------------------------------------------------
./configure --prefix=/usr (or whatever your prefix)
make
sudo make install
---------------------------------------------------
sflphone-qt
~~~~~~~~~~~
`sflphone-qt` gets built with sflphoned, for now.
sflphone-gtk
~~~~~~~~~~~~
Merging of `sflphone-gtk` to come.
...@@ -9,4 +9,3 @@ sflimage::images/SflphonePOuetpoUEt.png[SFLphone qt3] ...@@ -9,4 +9,3 @@ sflimage::images/SflphonePOuetpoUEt.png[SFLphone qt3]
.Screenshot de SFLphone 0.7 .Screenshot de SFLphone 0.7
sflimage::images/sflphone0.7.png[SFLphone 0.7] sflimage::images/sflphone0.7.png[SFLphone 0.7]
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* Copyright (C) 2007 - Savoir-Faire Linux Inc. * Copyright (C) 2007 - Savoir-Faire Linux Inc.
* Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com> * Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>
* *
* LICENCE: GPL * LICENCE: GPLv3
*/ */
...@@ -23,9 +23,7 @@ require_once('config.inc.php'); ...@@ -23,9 +23,7 @@ require_once('config.inc.php');
* @param string File name (including the extension) in the $PREFIX dir. * @param string File name (including the extension) in the $PREFIX dir.
* @return HTML content * @return HTML content
*/ */
function get_page($page) { function get_page($page, $compile = TRUE) {
// Compile it
// Get the latest HASH for that page. // Get the latest HASH for that page.
$hash = get_git_hash($page); $hash = get_git_hash($page);
...@@ -36,11 +34,22 @@ function get_page($page) { ...@@ -36,11 +34,22 @@ function get_page($page) {
$cnt = get_cache_hash($hash); $cnt = get_cache_hash($hash);
if (!$cnt) { if (!$cnt) {
$cnt = compile_page($hash, $page /* for ref only */); if ($compile) {
// Compile it
$cnt = compile_page($hash, $page /* for ref only */);
put_cache_hash($hash, $cnt);
put_cache_hash($hash, $cnt); return $cnt;
}
else {
// Grab it as is.
$cnt = get_git_hash_content($hash);
put_cache_hash($hash, $cnt);
return $cnt; return $cnt;
}
} }
return $cnt; return $cnt;
...@@ -53,8 +62,8 @@ function get_page($page) { ...@@ -53,8 +62,8 @@ function get_page($page) {
* *
* @param string File name (including the ext.) in the $PREFIX dir. * @param string File name (including the ext.) in the $PREFIX dir.
*/ */
function show_page($page) { function show_page($page, $compile = TRUE) {
print get_page($page); print get_page($page, $compile);
} }
...@@ -131,9 +140,37 @@ function compile_page($hash, $page) { ...@@ -131,9 +140,37 @@ function compile_page($hash, $page) {
/** /**
* Retrieve file from git's object-ocean * Retrieve the page (without compilation)
* *
* UNUSED * This function is just like compile_page(), but it doesn't call asciidoc on it.
* @param hash The hash for the required content
* @param file The filename (only for error reporting)
* @return string Original content of the file.
*/
/*
//DUPLICATES get_git_file_content()
function retr_file($hash, $file) {
global $GIT_REPOS;
$output = '';
$p = popen("GIT_DIR=".$GIT_REPOS." git-show $hash", 'r');
if (!$p) {
return "Unable to retrieve: $file ($hash)\n";
}
while (!feof($p)) {
$output .= fread($p, 1024);
}
pclose($p);
return $output;
}
*/
/**
* Retrieve file from git's object-ocean
*/ */
function get_git_file_content($file) { function get_git_file_content($file) {
$hash = get_git_hash($file); $hash = get_git_hash($file);
...@@ -146,8 +183,6 @@ function get_git_file_content($file) { ...@@ -146,8 +183,6 @@ function get_git_file_content($file) {
/** /**
* Retrieve hash's content from git's object-ocean * Retrieve hash's content from git's object-ocean
*
* UNUSED
*/ */
function get_git_hash_content($hash) { function get_git_hash_content($hash) {
global $GIT_REPOS; global $GIT_REPOS;
...@@ -163,6 +198,7 @@ function get_git_hash_content($hash) { ...@@ -163,6 +198,7 @@ function get_git_hash_content($hash) {
* *
* Used for comparison of cached/to cache/cache filename. * Used for comparison of cached/to cache/cache filename.
* *
* @param string Filename without the $PREFIX (ex: Features.txt, images/pouet.png)
* @return string SHA-1 hash * @return string SHA-1 hash
*/ */
function get_git_hash($file) { function get_git_hash($file) {
...@@ -190,7 +226,8 @@ function get_git_hash($file) { ...@@ -190,7 +226,8 @@ function get_git_hash($file) {
/** /**
* Get file name (parsed and clear for git-ls-tree) * Get file name (parsed and clear for git-ls-tree)
* *
* @return string Parsed file name * @param string Filename without the $PREFIX (ex: Features.txt, images/pouet.png)
* @return string Parsed file name, with $PREFIX prepended, and slashes cleaned up.
*/ */
function git_filename($file) { function git_filename($file) {
global $PREFIX; global $PREFIX;
......
<h1>Build instructions</h1>
<?php show_page('Build.txt'); ?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment