summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kolab-webadmin.spec.in4
-rwxr-xr-xphp/admin/templates/versions.tpl4
-rw-r--r--www/admin/kolab/versions.php7
3 files changed, 14 insertions, 1 deletions
diff --git a/kolab-webadmin.spec.in b/kolab-webadmin.spec.in
index d85edf7..9ece2a7 100644
--- a/kolab-webadmin.spec.in
+++ b/kolab-webadmin.spec.in
@@ -48,11 +48,15 @@ PreReq: php-smarty >= 2.6.3
AutoReq: no
AutoReqProv: no
+%option kolab_version snapshot
+
%description
Web based administration interface for The Kolab Groupware Server
%prep
%setup -q
+ %{l_shtool} subst -e 's;@kolab_version@;%{kolab_version};g' \
+ www/admin/kolab/versions.php
%build
./configure -prefix=%{l_prefix}
diff --git a/php/admin/templates/versions.tpl b/php/admin/templates/versions.tpl
index 3264287..2e4b89f 100755
--- a/php/admin/templates/versions.tpl
+++ b/php/admin/templates/versions.tpl
@@ -5,7 +5,9 @@
End:
*}
<div class="contenttext">
-<h1>{tr msg="Kolab2 Groupware Server Versions"}</h1>
+<h1>{tr msg="Kolab2 Groupware Server Version"}</h1>
+<pre>{$kolabversion}</pre>
+<h1>{tr msg="Kolab2 Groupware Server Component Versions"}</h1>
<pre>{$kolabversions}</pre>
<h1>{tr msg="Kolab2 Patched OpenPKG Package Versions"}</h1>
<pre>{$kolabpatchedversions}</pre>
diff --git a/www/admin/kolab/versions.php b/www/admin/kolab/versions.php
index b406e63..5f4878e 100644
--- a/www/admin/kolab/versions.php
+++ b/www/admin/kolab/versions.php
@@ -27,6 +27,12 @@ $kolabversions = shell_exec("$kolab_prefix/bin/openpkg rpm -q perl-kolab kolabd
$kolabpatchedversions = shell_exec("$kolab_prefix/bin/openpkg rpm -q amavisd apache imapd postfix" );
$openpkgversion = shell_exec("$kolab_prefix/bin/openpkg rpm -q openpkg");
+$kolabversion = '@kolab_version@';
+if( $kolabversion[0] == '@' ) {
+ // Unofficial/non-openpkg package
+ $kolabversion = '2.0-unofficial';
+}
+
/**** Insert into template and output ***/
$smarty = new MySmarty();
$smarty->assign( 'topdir', $topdir );
@@ -35,6 +41,7 @@ $smarty->assign( 'group', $auth->group() );
$smarty->assign( 'page_title', $menuitems[$sidx]['title'] );
$smarty->assign( 'menuitems', $menuitems );
$smarty->assign( 'submenuitems', $menuitems[$sidx]['submenu'] );
+$smarty->assign( 'kolabversion', $kolabversion );
$smarty->assign( 'kolabversions', $kolabversions );
$smarty->assign( 'kolabpatchedversions', $kolabpatchedversions );
$smarty->assign( 'openpkgversion', $openpkgversion );