- Add a first bunch of scripts to package a .deb
- Add a CMake script - Fix Emoji issue in the Chat widgetpull/16/head
-
47CMakeLists.txt
-
4app/helpers/StringHelper.php
-
4app/models/contact/Contact.php
-
25app/widgets/Chat/Chat.php
-
BINapp/widgets/Roster/img/clients/adium.png
-
BINapp/widgets/Roster/img/clients/empathy.png
-
BINapp/widgets/Roster/img/clients/gajim.png
-
BINapp/widgets/Roster/img/clients/gtalk.png
-
BINapp/widgets/Roster/img/clients/ichat.png
-
BINapp/widgets/Roster/img/clients/miranda.png
-
BINapp/widgets/Roster/img/clients/pidgin.png
-
BINapp/widgets/Roster/img/clients/psi.png
-
BINapp/widgets/Roster/img/clients/qip.png
-
BINapp/widgets/Roster/img/clients/xabber.png
-
21debian/config
-
6debian/etc/apache2/conf-available/movim.conf
-
152debian/postinst
-
25debian/postrm
-
6debian/templates
@ -0,0 +1,47 @@ |
|||
project(movim) |
|||
cmake_minimum_required(VERSION 2.8) |
|||
|
|||
exec_program("cat ../VERSION | cut -d . -f 1 2>/dev/null" |
|||
OUTPUT_VARIABLE MOVIM_VERSION_MAJOR) |
|||
exec_program("cat ../VERSION | cut -d . -f 2 2>/dev/null" |
|||
OUTPUT_VARIABLE MOVIM_VERSION_MINOR) |
|||
exec_program("bzr revno 2>/dev/null" |
|||
OUTPUT_VARIABLE MOVIM_VERSION_PATCH) |
|||
|
|||
set(VERSION_MAJOR "${MOVIM_VERSION_MAJOR}") |
|||
set(VERSION_MINOR "${MOVIM_VERSION_MINOR}") |
|||
set(VERSION_PATCH "${MOVIM_VERSION_PATCH}") |
|||
|
|||
#install(DIRECTORY "config" DESTINATION "/etc/${CMAKE_PROJECT_NAME}") |
|||
install(DIRECTORY "debian/etc" DESTINATION "/") |
|||
install(DIRECTORY "app" DESTINATION "/usr/share/${CMAKE_PROJECT_NAME}") |
|||
install(DIRECTORY "src" DESTINATION "/usr/share/${CMAKE_PROJECT_NAME}") |
|||
install(DIRECTORY "system" DESTINATION "/usr/share/${CMAKE_PROJECT_NAME}") |
|||
install(DIRECTORY "lib" DESTINATION "/var/lib/${CMAKE_PROJECT_NAME}") |
|||
install(DIRECTORY "locales" DESTINATION "/var/lib/${CMAKE_PROJECT_NAME}") |
|||
install(DIRECTORY "themes" DESTINATION "/var/lib/${CMAKE_PROJECT_NAME}") |
|||
install(DIRECTORY "vendor" DESTINATION "/var/lib/${CMAKE_PROJECT_NAME}" REGEX ".git" EXCLUDE) |
|||
|
|||
install(FILES index.php bootstrap.php daemon.php linker.php mud.php "VERSION" DESTINATION "/usr/share/${CMAKE_PROJECT_NAME}") |
|||
install(FILES "config/db.example.inc.php" DESTINATION "/etc/${CMAKE_PROJECT_NAME}") |
|||
|
|||
# package settings |
|||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Kick Ass Social Network, decentralized and fully based on XMPP ") |
|||
set(CPACK_PACKAGE_VENDOR "Jaussoin Timothée") |
|||
set(CPACK_PACKAGE_CONTACT "edhelas@movim.eu") |
|||
set(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}") |
|||
set(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}") |
|||
set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}") |
|||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${VERSION}") |
|||
set(ACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${VERSION}") |
|||
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Movim is a kickass distributed social networking platform that protect your privacy an comes with a set of awesome features.") |
|||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "php5 (>= 5.4.0), php5-gd (>= 5.4.0), php5-curl (>= 5.4.0), php5-imagick (>= 3.0.0), dbconfig-common(>= 1.8.0)") |
|||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Jaussoin Timothée") |
|||
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://movim.eu/") |
|||
|
|||
SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/debian/config;${CMAKE_CURRENT_SOURCE_DIR}/debian/postinst;${CMAKE_CURRENT_SOURCE_DIR}/debian/postrm;${CMAKE_CURRENT_SOURCE_DIR}/debian/templates;") |
|||
|
|||
set(PACK "DEB" CACHE STRING "Generate a Package") |
|||
set(CPACK_GENERATOR ${PACK}) |
|||
|
|||
include(CPack) |
|||
|
Before Width: 34 | Height: 28 | Size: 1.7 KiB |
|
Before Width: 34 | Height: 28 | Size: 1.2 KiB |
|
Before Width: 34 | Height: 28 | Size: 870 B |
|
Before Width: 34 | Height: 28 | Size: 1.3 KiB |
|
Before Width: 34 | Height: 28 | Size: 1.1 KiB |
|
Before Width: 34 | Height: 28 | Size: 1.2 KiB |
|
Before Width: 34 | Height: 28 | Size: 1.6 KiB |
|
Before Width: 34 | Height: 28 | Size: 1.4 KiB |
|
Before Width: 34 | Height: 28 | Size: 1.4 KiB |
|
Before Width: 34 | Height: 28 | Size: 1.4 KiB |
@ -0,0 +1,21 @@ |
|||
#!/bin/sh |
|||
|
|||
set -e |
|||
|
|||
. /usr/share/debconf/confmodule |
|||
|
|||
if [ -f /usr/share/dbconfig-common/dpkg/config ]; then |
|||
. /usr/share/dbconfig-common/dpkg/config |
|||
|
|||
dbc_dbtypes="pgsql, mysql" |
|||
dbc_authmethod_user="password" |
|||
|
|||
. /usr/share/dbconfig-common/dpkg/config |
|||
|
|||
dbc_go movim $@ |
|||
fi |
|||
|
|||
db_input high movim/httpserver || true |
|||
db_go || true |
|||
|
|||
exit 0 |
|||
@ -0,0 +1,6 @@ |
|||
Alias /movim/ /usr/share/movim/ |
|||
|
|||
<Directory /usr/share/movim/> |
|||
DirectoryIndex index.php |
|||
Options +FollowSymLinks -Indexes |
|||
</Directory> |
|||
@ -0,0 +1,152 @@ |
|||
#!/bin/sh |
|||
|
|||
httpserver_init() { |
|||
db_get movim/httpserver |
|||
httpservers="$RET" |
|||
for httpserver in $httpservers; do |
|||
httpserver=${httpserver%,} |
|||
|
|||
#if [ "$httpserver" = "nginx" ] ; then |
|||
# nginx_install |
|||
#else |
|||
apache_install $1 $httpserver |
|||
#fi |
|||
done |
|||
} |
|||
|
|||
apache_install() { |
|||
server="apache2" |
|||
CONF="movim" |
|||
COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) |
|||
|
|||
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then |
|||
. /usr/share/apache2/apache2-maintscript-helper |
|||
apache2_invoke enconf $CONF || exit $? |
|||
elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then |
|||
[ -d /etc/apache2/conf.d/ ] && [ ! -L /etc/apache2/conf.d/$CONF.conf ] \ |
|||
&& ln -s ../conf-available/$CONF.conf /etc/apache2/conf.d/$CONF.conf |
|||
reload_server $server |
|||
fi |
|||
} |
|||
|
|||
#nginx_install() { |
|||
#server="apache2" |
|||
#CONF="movim" |
|||
#COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) |
|||
|
|||
#if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then |
|||
#. /usr/share/apache2/apache2-maintscript-helper |
|||
#apache2_invoke enconf $CONF || exit $? |
|||
#elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then |
|||
#[ -d /etc/apache2/conf.d/ ] && [ ! -L /etc/apache2/conf.d/$CONF.conf ] \ |
|||
#&& ln -s ../conf-available/$CONF.conf /etc/apache2/conf.d/$CONF.conf |
|||
#reload_server $server |
|||
#fi |
|||
#} |
|||
|
|||
# |
|||
# fixperms 0644 /usr/share/movim |
|||
# |
|||
fixperms () { |
|||
PERMS="$1" |
|||
FILE="$2" |
|||
chmod ${PERMS} "${FILE}" |
|||
} |
|||
|
|||
# |
|||
# fixownership user:group /var/cache/movim |
|||
# |
|||
fixownership () |
|||
{ |
|||
OWNER="$1" |
|||
FILE="$2" |
|||
chown ${OWNER} "${FILE}" |
|||
} |
|||
|
|||
reload_server() { |
|||
server=$1 |
|||
if [ -x /usr/sbin/invoke-rc.d ]; then |
|||
invoke-rc.d $server reload 3>/dev/null || true |
|||
else |
|||
/etc/init.d/$server reload 3>/dev/null || true |
|||
fi |
|||
} |
|||
|
|||
. /usr/share/debconf/confmodule |
|||
|
|||
db_get movim/debconf_install |
|||
if [ "$RET" = false ]; then |
|||
exit 0; |
|||
fi |
|||
|
|||
. /usr/share/dbconfig-common/dpkg/postinst |
|||
dbc_go movim $@ |
|||
|
|||
if [ "$dbc_dbtype" == 'mysql' ]; then |
|||
dbport='3306' |
|||
else |
|||
dbport='5432' |
|||
fi |
|||
|
|||
# We create the Movim configuration file |
|||
#touch /etc/movim/db.inc.php |
|||
echo "<?php |
|||
# This is the database configuration of Movim |
|||
# You need to copy an rename this file to 'db.inc.php' and complete the values |
|||
\$conf = array( |
|||
# The type can be 'pgsql' or 'mysql' |
|||
'type' => '$dbc_dbtype', |
|||
# The database username |
|||
'username' => '$dbc_dbuser', |
|||
# The password |
|||
'password' => '$dbc_dbpass', |
|||
# Where can we find the database ? |
|||
'host' => 'localhost', |
|||
# The port number, 3306 for MySQL and 5432 for PostGreSQL |
|||
'port' => $dbport, |
|||
# The database name |
|||
'database' => '$dbc_dbname' |
|||
); |
|||
" > /etc/movim/db.inc.php |
|||
|
|||
httpserver_init $1 |
|||
|
|||
# We create some links |
|||
ln -s /etc/movim/ /usr/share/movim/config 2>/dev/null |
|||
ln -s /var/lib/movim/lib /usr/share/movim/ 2>/dev/null |
|||
ln -s /var/lib/movim/locales /usr/share/movim/ 2>/dev/null |
|||
ln -s /var/lib/movim/themes /usr/share/movim/ 2>/dev/null |
|||
ln -s /var/lib/movim/vendor /usr/share/movim/ 2>/dev/null |
|||
|
|||
# We create the cache folder |
|||
mkdir /var/cache/movim 2>/dev/null |
|||
ln -s /var/cache/movim /usr/share/movim/cache 2>/dev/null |
|||
fixperms 0775 /var/cache/movim |
|||
fixownership "root:www-data" /var/cache/movim |
|||
|
|||
# We create the user folder |
|||
mkdir /var/cache/movim/users 2>/dev/null |
|||
ln -s /var/cache/movim/users /usr/share/movim/users 2>/dev/null |
|||
fixperms 0775 /var/cache/movim/users |
|||
fixownership "root:www-data" /var/cache/movim/users |
|||
|
|||
# We create the log folder |
|||
mkdir /var/log/movim 2>/dev/null |
|||
ln -s /var/log/movim /usr/share/movim/log 2>/dev/null |
|||
fixperms 0775 /var/log/movim |
|||
fixownership "root:www-data" /var/log/movim |
|||
|
|||
# Fix rights |
|||
fixperms 0775 /usr/share/movim |
|||
fixownership "root:www-data" /usr/share/movim |
|||
|
|||
fixperms 0775 /usr/share/movim/daemon.php |
|||
fixownership "root:www-data" /usr/share/movim/daemon.php |
|||
|
|||
# And we install/update the Movim database |
|||
echo "Creating and/or updating the Movim database… please be patient" |
|||
chmod +x /usr/share/movim/mud.php |
|||
/usr/share/movim/mud.php db set |
|||
|
|||
# We clean some log created by the install to prevent issues |
|||
rm /usr/share/movim/log/* /usr/share/movim/cache/* |
|||
@ -0,0 +1,25 @@ |
|||
#!/bin/sh |
|||
|
|||
if [ "$1" = "remove" ] || [ "$1" = "purge" ] ; then |
|||
CONF="movim" |
|||
COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) |
|||
|
|||
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then |
|||
. /usr/share/apache2/apache2-maintscript-helper |
|||
apache2_invoke disconf $CONF || exit $? |
|||
elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then |
|||
[ ! -L /etc/apache2/conf.d/$CONF.conf ] || rm /etc/apache2/conf.d/$CONF.conf |
|||
fi |
|||
|
|||
if [ "$1" = purge ]; then |
|||
rm -rf /var/cache/movim /etc/movim /usr/share/movim /var/log/movim |
|||
fi |
|||
fi |
|||
|
|||
if [ -f /usr/share/debconf/confmodule ]; then |
|||
. /usr/share/debconf/confmodule |
|||
fi |
|||
if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then |
|||
. /usr/share/dbconfig-common/dpkg/postrm |
|||
dbc_go movim $@ |
|||
fi |
|||
@ -0,0 +1,6 @@ |
|||
Template: movim/httpserver |
|||
Type: multiselect |
|||
Choices: apache2 |
|||
Description: Web server to reconfigure automatically: |
|||
Please choose the web server that should be automatically configured |
|||
to run Movim. |
|||