[indefero] Initial import

Guillaume Kulakowski llaumgui at fedoraproject.org
Mon Jan 14 20:12:16 UTC 2013


commit 24fbada6c8029749aee61c50dd38bfed77d7158e
Author: Guillaume Kulakowski <guillaume at llaumgui.com>
Date:   Mon Jan 14 21:12:02 2013 +0100

    Initial import

 .gitignore                   |    1 +
 bootstrap.php.sample         |   18 ++++
 indefero-httpd.conf          |   34 +++++++
 indefero.spec                |  209 ++++++++++++++++++++++++++++++++++++++++++
 indefero_activity.cron.daily |    8 ++
 indefero_update.sh           |   29 ++++++
 sources                      |    1 +
 7 files changed, 300 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..e8583ea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/indefero-1.3.3.tar.bz2
diff --git a/bootstrap.php.sample b/bootstrap.php.sample
new file mode 100644
index 0000000..df229d1
--- /dev/null
+++ b/bootstrap.php.sample
@@ -0,0 +1,18 @@
+<?php
+require '/etc/indefero/path.php';
+require 'Pluf.php';
+Pluf::start('/etc/indefero/idf.php');
+Pluf_Dispatcher::loadControllers(Pluf::f('idf_views'));
+
+$user = new Pluf_User();
+$user->first_name = 'John';
+$user->last_name = 'Doe'; // Required!
+$user->login = 'doe'; // must be lowercase!
+$user->email = 'doe at example.com';
+$user->password = 'yourpassword'; // the password is salted/hashed
+                                  // in the database, so do not worry :)
+$user->administrator = true;
+$user->active = true;
+$user->create();
+print "Bootstrap ok\n";
+?>
diff --git a/indefero-httpd.conf b/indefero-httpd.conf
new file mode 100644
index 0000000..8e53e5a
--- /dev/null
+++ b/indefero-httpd.conf
@@ -0,0 +1,34 @@
+Alias /@IDFNAME@/media/upload @IDFUPLOADDIR@
+<Directory @IDFUPLOADDIR@>
+    # Apache 2.4
+    <IfModule mod_authz_core.c>
+        Require all granted
+    </IfModule>
+
+    # Apache 2.2
+    <IfModule !mod_authz_core.c>
+        Order allow,deny
+        Allow from all
+    </IfModule>
+</Directory>
+
+Alias /@IDFNAME@ @IDFDIR@
+<Directory @IDFDIR@>
+    # Apache 2.4
+    <IfModule mod_authz_core.c>
+        Require all granted
+    </IfModule>
+
+    # Apache 2.2
+    <IfModule !mod_authz_core.c>
+        Order allow,deny
+        Allow from all
+    </IfModule>
+
+    # Uncomment following lines to activate rewrite rules
+    #RewriteEngine On
+    #RewriteBase /@IDFNAME@
+    #RewriteCond %{REQUEST_FILENAME} !-f
+    #RewriteCond %{REQUEST_FILENAME} !-d
+    #RewriteRule ^(.*) index.php/$1
+</Directory>
diff --git a/indefero.spec b/indefero.spec
new file mode 100644
index 0000000..f95c6d7
--- /dev/null
+++ b/indefero.spec
@@ -0,0 +1,209 @@
+Name:           indefero
+Version:        1.3.3
+Release:        1%{?dist}
+Summary:        Simple code and project management
+
+Group:          Applications/Publishing
+License:        GPLv2+
+URL:            http://www.indefero.net/
+Source0:        http://projects.ceondo.com/p/indefero/downloads/get/%{name}-%{version}.tar.bz2
+Source1:        %{name}-httpd.conf
+Source2:        %{name}_activity.cron.daily
+Source3:        bootstrap.php.sample
+Source4:        indefero_update.sh
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:      noarch
+
+BuildRequires:  python2-devel
+
+Requires:       httpd
+Requires:       php-common >= 5.3
+Requires:       php-pluf >= 1.0-3
+Requires:       php-pear(File_Passwd)
+Requires:       php-pear(Mail)
+Requires:       php-pear(Mail_Mime)
+Requires:       php-zip
+Requires:       php-zipstream
+
+
+%description
+InDefero is a simple code and project management software with a total
+integration of Git, Subversion and Mercurial repositories together with issue
+tracking, documentation wiki, code review and file distribution.
+
+
+%prep
+%setup -qn %{name}
+mv src/IDF/conf ./
+
+# IDF configuration: idf.php
+sed -i -e "s|\$cfg\['idf_base'\] = '/index.php';|\$cfg['idf_base'] = '/%{name}/index.php';|g" conf/idf.php-dist
+sed -i -e "s|\$cfg\['url_media'\] = 'http://localhost/media';|\$cfg['url_media'] = 'http://localhost/%{name}/media';|g" conf/idf.php-dist
+sed -i -e "s|\$cfg\['url_upload'\] = 'http://localhost/media/upload';|\$cfg['url_upload'] = 'http://localhost/%{name}/media/upload';|g" conf/idf.php-dist
+sed -i -e "s|\$cfg\['upload_path'\] = '/home/www/indefero/www/media/upload';|\$cfg['upload_path'] = '%{_localstatedir}/lib/%{name}/upload';|g" conf/idf.php-dist
+sed -i -e "s|\$cfg\['upload_issue_path'\] = '/home/www/indefero/attachments';|\$cfg['upload_issue_path'] = '%{_localstatedir}/lib/%{name}/attachments';|g" conf/idf.php-dist
+sed -i -e "s|\$cfg\['pear_path'\] = '%{_datadir}/php';|\$cfg['pear_path'] = '%{_datadir}/pear';|g" conf/idf.php-dist
+sed -i -e "s|dirname(__FILE__).'/../templates',|'%{_datadir}/%{name}/IDF/templates',|g" conf/idf.php-dist
+sed -i -e "s|\$cfg\['idf_views'\] = dirname(__FILE__).'/urls.php';|\$cfg['idf_views'] = '%{_sysconfdir}/%{name}/urls.php';|g" conf/idf.php-dist
+sed -i -e "s|# \$cfg\['idf_exec_cmd_prefix'\]|\$cfg['idf_exec_cmd_prefix']|g" conf/idf.php-dist
+sed -i -e "s|\$cfg\['cache_file_folder'\] = \$cfg\['tmp_folder'\].'/cache';|\$cfg['cache_file_folder'] = \$cfg\['tmp_folder'\].'/%{name}';|g" conf/idf.php-dist
+sed -i -e "s|137.121.75.54|localhost|g" conf/idf.php-dist
+sed -i -e "s|example.com|localhost|g" conf/idf.php-dist
+sed -i -e "s|/home/www/indefero/scripts/|%{_datadir}/%{name}/scripts/|g" conf/idf.php-dist
+mv conf/idf.php-dist conf/idf.php
+
+# Path configuration: path.php
+sed -i -e "s|define('PLUF_PATH', dirname(__FILE__).'/../../../../pluf/src');|define('PLUF_PATH', '%{_datadir}/php/pluf');|g" conf/path.php-dist
+sed -i -e "s|define('IDF_PATH', dirname(__FILE__).'/../..');|define('IDF_PATH', '%{_datadir}/%{name}');|g" conf/path.php-dist
+mv conf/path.php-dist conf/path.php
+
+# Path in index.php
+sed -i -e "s|require dirname(__FILE__).'/../src/IDF/conf/path.php';|require '%{_sysconfdir}/%{name}/path.php';|g" www/index.php
+sed -i -e "s|Pluf::start(dirname(__FILE__).'/../src/IDF/conf/idf.php');|Pluf::start('%{_sysconfdir}/%{name}/idf.php');|g" www/index.php
+
+# Path in scripts
+chmod +x scripts/*.sh
+chmod +x scripts/*.py
+for script in scripts/*.php; do
+    sed -i -e "s|dirname(__FILE__).'/../src/IDF/conf/path.php'|'%{_sysconfdir}/%{name}/path.php'|g" ${script}
+    sed -i -e "s|dirname(__FILE__).'/../src/IDF/conf/idf.php'|'%{_sysconfdir}/%{name}/idf.php'|g" ${script}
+done
+
+# Apache
+cp -p %{SOURCE1} .
+sed -i -e 's|@IDFNAME@|%{name}|g' %{name}-httpd.conf
+sed -i -e 's|@IDFDIR@|%{_datadir}/%{name}/www|g' %{name}-httpd.conf
+sed -i -e 's|@IDFUPLOADDIR@|%{_localstatedir}/lib/%{name}/upload|g' %{name}-httpd.conf
+
+# bootstrap template
+cp -p %{SOURCE3} .
+
+
+%build
+# empty build section, nothing required
+
+
+%install
+rm -rf %{buildroot}
+
+# Core
+install -d %{buildroot}%{_datadir}/%{name}
+cp -a scripts %{buildroot}%{_datadir}/%{name}
+cp -a src/* %{buildroot}%{_datadir}/%{name}
+cp -a www %{buildroot}%{_datadir}/%{name}
+
+# Configuration
+install -d %{buildroot}%{_sysconfdir}/%{name}
+cp -a conf/* %{buildroot}/%{_sysconfdir}/%{name}
+ln -s %{_sysconfdir}/%{name} %{buildroot}/%{_datadir}/%{name}/IDF/conf
+
+# Upload
+install -d %{buildroot}%{_localstatedir}/lib/%{name}/attachments
+install -d %{buildroot}%{_localstatedir}/lib/%{name}/upload
+
+# Apache
+install -d %{buildroot}%{_sysconfdir}/httpd/conf.d
+install -p -m 0644  %{name}-httpd.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/%{name}.conf
+
+# Add activity cron.daily
+install -p -D -m 0755 %{SOURCE2} %{buildroot}%{_sysconfdir}/cron.daily/%{name}_activity.cron
+
+# Update script
+install -p -D -m 0755 %{SOURCE4} %{buildroot}%{_sbindir}/indefero_update
+
+# Lang
+# Upstream report: http://projects.ceondo.com/p/indefero/issues/832/#preview
+for file in %{buildroot}/%{_datadir}/%{name}/IDF/locale/*/idf.po; do
+    lang=$(basename $(dirname $file));
+    echo "%lang(${lang}) %{_datadir}/%{name}/IDF/locale/${lang}/idf.po"
+done > %{name}.lang
+
+
+%clean
+rm -rf %{buildroot}
+
+
+%files -f %{name}.lang
+%defattr(-,root,root,-)
+%doc AUTHORS bootstrap.php.sample CONTRIBUTE.mdtext COPYING doc INSTALL.mdtext NEWS.mdtext
+%{_sbindir}/indefero_update
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/scripts
+%{_datadir}/%{name}/www
+%dir %{_datadir}/%{name}/IDF
+%{_datadir}/%{name}/IDF/conf
+%{_datadir}/%{name}/IDF/locale/idf.pot
+%{_datadir}/%{name}/IDF/Config
+%{_datadir}/%{name}/IDF/Form
+%{_datadir}/%{name}/IDF/Migrations
+%{_datadir}/%{name}/IDF/Plugin
+%{_datadir}/%{name}/IDF/Review
+%{_datadir}/%{name}/IDF/Scm
+%{_datadir}/%{name}/IDF/Search
+%{_datadir}/%{name}/IDF/Template
+%{_datadir}/%{name}/IDF/templates
+%{_datadir}/%{name}/IDF/Tests
+%{_datadir}/%{name}/IDF/Timeline
+%{_datadir}/%{name}/IDF/Views
+%{_datadir}/%{name}/IDF/Wiki
+%{_datadir}/%{name}/IDF/*.php
+%{_sysconfdir}/cron.daily/%{name}_activity.cron
+%config(noreplace) %{_sysconfdir}/%{name}
+%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
+%attr(-,apache,root) %{_localstatedir}/lib/%{name}
+
+
+%changelog
+* Tue Dec 04 2012 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject # DOT org> - 1.3.3-1
+- Upstream 1.3.3
+- Add Update script
+- Review approved
+
+* Thu May 10 2012 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject # DOT org> - 1.3.2-2
+- Update for php-pluf-1.0-2
+
+* Thu May 10 2012 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject # DOT org> - 1.3.2-1
+- Upstream 1.3.2
+
+* Wed May 09 2012 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject # DOT org> - 1.3.1-1
+- Upstream 1.3.1
+- Move activity cron to daily
+
+* Thu Apr 19 2012 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject # DOT org> - 1.3-1
+- Upstream 1.3
+- Add activity cron
+
+* Fri Nov 11 2011 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject # DOT org> - 1.2-1
+- Upstream 1.2
+
+* Mon Jun 27 2011 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject DOT org> - 1.1.2-4
+- Fix path issue in scripts
+- Fix Python script issue
+
+* Sat Jun 25 2011 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject DOT org> - 1.1.2-3
+- Add php-zipstream requires
+
+* Thu Jun 23 2011 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject DOT org> - 1.1.2-2
+- Add scripts
+
+* Tue Jun 21 2011 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject DOT org> - 1.1.2-1
+- Upstream 1.1.2
+
+* Fri Aug 27 2010 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject DOT org> - 1.0-4
+ - Fix Requires
+
+* Wed Jul 14 2010 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject DOT org> - 1.0-3
+ - Add php-pear File-Passwd
+
+* Mon Apr 19 2010 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject DOT org> - 1.0-2
+- Fix bug in default configuration
+- Specific cache dir folder
+
+* Mon Apr 19 2010 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject DOT org> - 1.0-1
+- upstream 1.0
+
+* Mon Mar 22 2010 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject DOT org> - 0.8.11-1
+- upstream 0.8.11
+
+* Sun Jan 10 2010 Guillaume Kulakowski <guillaume DOT kulakowski AT fedoraproject DOT org> - 0.8.10-1
+- Initial packaging
diff --git a/indefero_activity.cron.daily b/indefero_activity.cron.daily
new file mode 100644
index 0000000..ad9125d
--- /dev/null
+++ b/indefero_activity.cron.daily
@@ -0,0 +1,8 @@
+#!/bin/bash
+#
+# Indefero activities's cron script
+#
+
+php /usr/share/indefero/scripts/activitycron.php 2>&1 > /dev/null
+
+exit 0
diff --git a/indefero_update.sh b/indefero_update.sh
new file mode 100644
index 0000000..ac51e5e
--- /dev/null
+++ b/indefero_update.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+#
+# Upgradee script for indefero
+#
+
+IDF_PATH=/usr/share/indefero
+PLUF_PATH=/usr/share/php/pluf
+CONF_PATH=/etc/indefero
+proceed="n"
+
+cd ${IDF_PATH}
+php ${PLUF_PATH}/migrate.php --conf=${CONF_PATH}/idf.php -a -d -u
+
+echo ""
+
+
+while :
+do
+    read -p "Proceed to the update? [n/y]" proceed
+    if [ "${proceed}" = "y" ]
+    then
+        php ${PLUF_PATH}/migrate.php --conf=${CONF_PATH}/idf.php -a -d
+        echo -e "\nDone."
+    else
+        echo "Do nothing."
+    fi
+    break
+done
diff --git a/sources b/sources
index e69de29..990825d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+32575c9e5bd2c280dbbaeb04e4542d1e  indefero-1.3.3.tar.bz2


More information about the scm-commits mailing list