commit
7205fc2642
12 changed files with 196 additions and 0 deletions
@ -0,0 +1,16 @@ |
||||
#!/usr/bin/perl -w |
||||
|
||||
use esmith::Build::CreateLinks qw(:all); |
||||
|
||||
# Templates to expand |
||||
foreach my $event (qw/webapps-update bootstrap-console-save/){ |
||||
templates2events("/etc/jappix/hosts.xml", $event); |
||||
templates2events("/etc/jappix/main.xml", $event); |
||||
templates2events("/etc/jappix/installed.xml", $event); |
||||
} |
||||
|
||||
# Conf are XML files |
||||
safe_touch("root/etc/e-smith/templates/etc/jappix/hosts.xml/template-begin"); |
||||
safe_touch("root/etc/e-smith/templates/etc/jappix/main.xml/template-begin"); |
||||
safe_touch("root/etc/e-smith/templates/etc/jappix/installed.xml/template-begin"); |
||||
|
@ -0,0 +1 @@ |
||||
url |
@ -0,0 +1 @@ |
||||
enabled |
@ -0,0 +1 @@ |
||||
webapp |
@ -0,0 +1,64 @@ |
||||
{ |
||||
my $access = $jappix{'access'} || 'private'; |
||||
my $allow = ($access eq 'public')?"$localAccess $externalSSLAccess":'all'; |
||||
my $maxsize = $jappix{'MaxUploadSize'} || '100'; |
||||
$maxsize=$maxsize.'M'; |
||||
|
||||
my $requiressl = (($jappix{'RequireSSL'} || 'yes') =~ /^(enabled|yes|on)$/i) ? |
||||
"SSLRequireSSL on":"# RequireSSL is disabled"; |
||||
|
||||
my $alias = (($jappix{'AliasOnPrimary'} || 'enabled') eq 'enabled') ? |
||||
'Alias /jappix /usr/share/jappix' : ''; |
||||
|
||||
if (($jappix{'status'} || 'disabled') eq 'enabled'){ |
||||
|
||||
$OUT .=<<"END" |
||||
|
||||
# Jappix Configuration |
||||
$alias |
||||
|
||||
<Directory /usr/share/jappix> |
||||
Options +FollowSymlinks |
||||
AllowOverride None |
||||
$requiressl |
||||
AddType application/x-httpd-php .php |
||||
php_admin_value open_basedir /usr/share/jappix/:/etc/jappix:/var/lib/jappix:/var/log/jappix:/var/cache/jappix |
||||
php_admin_flag file_uploads on |
||||
php_admin_value upload_max_filesize $maxsize |
||||
php_admin_value post_max_size $maxsize |
||||
php_admin_value memory_limit 64M |
||||
php_admin_value max_execution_time 900 |
||||
php_admin_value allow_url_fopen on |
||||
php_admin_value upload_tmp_dir /var/lib/jappix/tmp |
||||
php_admin_value session.save_path /var/lib/jappix/tmp |
||||
order deny,allow |
||||
deny from all |
||||
allow from $allow |
||||
Satisfy all |
||||
</Directory> |
||||
|
||||
<Directory /usr/share/jappix/lang> |
||||
Order Deny,Allow |
||||
Deny from all |
||||
</Directory> |
||||
|
||||
<Directory /var/lib/jappix/tmp> |
||||
Order Deny,Allow |
||||
Deny from all |
||||
</Directory> |
||||
|
||||
END |
||||
|
||||
} |
||||
else{ |
||||
$OUT .=<<'EOF'; |
||||
|
||||
# Jappix is disabled |
||||
# You can enabled it with the following commands |
||||
# db configuration setprop jappix status enabled |
||||
# signal-event webapps-update |
||||
|
||||
EOF |
||||
} |
||||
} |
||||
|
@ -0,0 +1,14 @@ |
||||
{ |
||||
my $sslport = $modSSL{'TCPPort'} || '443'; |
||||
my $alias = $jappix{'AliasOnPrimary'} || 'enabled'; |
||||
my $requiressl = $jappix{'RequireSSL'} || 'yes'; |
||||
|
||||
if (($port ne $sslport) && ($requiressl !~ /^(disabled|off|no)$/i) && ($alias ne 'disabled')){ |
||||
|
||||
## Redirect Web Address to Secure Address |
||||
$OUT .= " RewriteEngine on\n"; |
||||
$OUT .= " RewriteRule ^/jappix(/.*|\$) https://%{HTTP_HOST}/jappix\$1 \[L,R\]\n"; |
||||
|
||||
} |
||||
} |
||||
|
@ -0,0 +1,13 @@ |
||||
<?xml version="1.0" encoding="utf-8" ?> |
||||
<jappix xmlns="jappix:conf:hosts"> |
||||
<main>{$jappix{'Domain'} || $DomainName}</main> |
||||
<muc>{$jappix{'Server'} || $DomainName}</muc> |
||||
<pubsub>{$jappix{'Server'} || $DomainName}</pubsub> |
||||
<vjud>{$jappix{'Server'} || $DomainName}</vjud> |
||||
<anonymous>{$jappix{'Server'} || $DomainName}</anonymous> |
||||
<bosh>{$jappix{'BoshUrl'} || 'https://' . ($jappix{'Server'} || $DomainName) . '/http-bind/'}</bosh> |
||||
<bosh_main></bosh_main> |
||||
<bosh_mini></bosh_mini> |
||||
<static></static> |
||||
<upload></upload> |
||||
</jappix> |
@ -0,0 +1,5 @@ |
||||
<?xml version="1.0" encoding="utf-8" ?> |
||||
<jappix xmlns="jappix:conf:installed"> |
||||
<installed>true</installed> |
||||
</jappix> |
||||
|
@ -0,0 +1,2 @@ |
||||
<?xml version="1.0" encoding="utf-8" ?> |
||||
<jappix xmlns="jappix:conf:main"> |
@ -0,0 +1,14 @@ |
||||
<name>{$jappix{'Title'} || 'Jappix'}</name> |
||||
<desc>{$jappix{'WelcomMessage'} || 'a free social network'}</desc> |
||||
<resource>{$jappix{'Ressource'} || 'Jappix'}</resource> |
||||
<lock>{$OUT .= (($jappix{'LockServer'} || 'enabled') =~ m/^enabled|yes|on$/i) ? 'on':'off'}</lock> |
||||
<anonymous>{$OUT .= (($jappix{'Anonymous'} || 'disabled') =~ m/^enabled|yes|on$/i) ? 'on':'off'}</anonymous> |
||||
<registration>{$OUT .= (($jappix{'Registration'} || 'disabled') =~ m/^enabled|yes|on$/i) ? 'on':'off'}</registration> |
||||
<bosh_proxy>off</bosh_proxy> |
||||
<manager_link>off</manager_link> |
||||
<encryption>on</encryption> |
||||
<https_storage>on</https_storage> |
||||
<https_force>off</https_force> |
||||
<compression>on</compression> |
||||
<multi_files>off</multi_files> |
||||
<developer>off</developer> |
@ -0,0 +1 @@ |
||||
</jappix> |
@ -0,0 +1,64 @@ |
||||
# Authority: vip-ire |
||||
# Name: Daniel Berteaud |
||||
|
||||
%define name smeserver-jappix |
||||
%define version 0.1 |
||||
%define release 3 |
||||
Summary: sme server integration of jappix |
||||
Name: %{name} |
||||
Version: %{version} |
||||
Release: %{release}%{?dist} |
||||
License: GNU GPL |
||||
URL: http://www.firewall-services.com |
||||
Group: SMEserver/addon |
||||
Source: %{name}-%{version}.tar.gz |
||||
|
||||
Patch0: smeserver-jappix-0.1-session_save_path.patch |
||||
Patch1: smeserver-jappix-0.1-split_main_conf_templates.patch |
||||
|
||||
BuildArchitectures: noarch |
||||
BuildRequires: e-smith-devtools |
||||
BuildRoot: /var/tmp/%{name}-%{version} |
||||
Requires: e-smith-base |
||||
Requires: jappix |
||||
Requires: smeserver-webapps-common |
||||
AutoReqProv: no |
||||
|
||||
%description |
||||
smserver integration of Jappix. |
||||
Jappix is a feature complete, web based XMPP client |
||||
|
||||
%changelog |
||||
* Tue Dec 20 2011 Daniel Berteaud <daniel@firewall-services.com> 0.1-3 |
||||
- CASification ready |
||||
|
||||
* Tue Dec 20 2011 Daniel Berteaud <daniel@firewall-services.com> 0.1-2 |
||||
- Set session.save_path |
||||
|
||||
* Sun Jul 10 2011 Daniel Berteaud <daniel@firewall-services.com> 0.1-1 |
||||
- Initial release |
||||
|
||||
%prep |
||||
%setup |
||||
%patch0 -p1 |
||||
%patch1 -p1 |
||||
|
||||
%build |
||||
perl ./createlinks |
||||
|
||||
%install |
||||
rm -rf $RPM_BUILD_ROOT |
||||
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
||||
rm -f %{name}-%{version}-filelist |
||||
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
||||
> %{name}-%{version}-filelist |
||||
|
||||
%files -f %{name}-%{version}-filelist |
||||
%defattr(-,root,root) |
||||
|
||||
%clean |
||||
rm -rf $RPM_BUILD_ROOT |
||||
|
||||
|
||||
%postun |
||||
|
Loading…
Reference in new issue