aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2010-08-21 23:47:56 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2010-08-21 23:47:56 +0000
commit05832245e26758d5f758038024e86f2082471a10 (patch)
tree6260e10977bb2650c9358326a2ae5521c8352640
parentd80fcf8de6440fd31f16bb4106fe9e373fa40308 (diff)
parent25baf614b8b00bb39b9d35cf6ce5ce79f0954aeb (diff)
downloadsemanticscuttle-05832245e26758d5f758038024e86f2082471a10.tar.gz
semanticscuttle-05832245e26758d5f758038024e86f2082471a10.tar.bz2
Merge branch 'pearpkg'
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@717 b3834d28-1941-0410-a4f8-b48e95affb8f
-rw-r--r--.gitignore1
-rw-r--r--build.xml159
-rw-r--r--doc/developers/release-new-version4
-rw-r--r--src/SemanticScuttle/header.php17
-rw-r--r--tests/TagsCacheTest.php3
-rw-r--r--tests/prepare.php8
-rw-r--r--www/www-header.php8
7 files changed, 189 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore
index 3895c5b..888ac2e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
dist/
build.properties
+package.xml
diff --git a/build.xml b/build.xml
index c1db166..1a979dd 100644
--- a/build.xml
+++ b/build.xml
@@ -10,12 +10,26 @@
<property name="version-m" value="0.97" />
<property name="version" value="0.97.0" />
+ <property name="stability" value="beta" />
+ <property name="releasenotes" value="- Many SQL optimizations
+- SemanticScuttle shows bookmarks 4 times faster now
+- New config option to skip 'SET NAMES UTF8' call: $dbneedssetnames
+- Do not highlight admin bookmarks when $enableAdminColors is disabled
+- Add russian translation
+- Make HTML export follow the specifications a bit better
+- Fix bug #2953732: faulty error message for duplicate bookmarks
+- Fix bug #2960663: do not send content-type headers twice for ajax/api scripts
+- Fix bug #2976593: fr_FR locale is vietnamese
+" />
<property name="zipfile" value="${phing.project.name}-${version}.zip" />
+ <property name="pkgfile" value="${phing.project.name}-${version}.tgz" />
<property name="distfile" value="dist/${zipfile}" />
<property name="sfproject" value="SemanticScuttle" />
<property name="sffilepath" value="s/se/semanticscuttle/" />
<property name="svnpath" value="https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/" />
+ <taskdef classname="phing.tasks.ext.d51PearPkg2Task" name="d51pearpkg2" />
+
<target name="zip" depends="check"
description="Create zip file for release"
>
@@ -48,7 +62,150 @@
- <target name="release" depends="check,zip,deploy-sf,svntag"
+ <target name="package" depends="check"
+ description="Creates the pear package"
+ >
+ <!-- fixme: create package.xml with d51pearpkg2 -->
+ <d51pearpkg2 dir="." baseinstalldir="/">
+ <name>SemanticScuttle</name>
+ <summary>A social bookmarking tool</summary>
+ <description>
+ A social bookmarking tool experimenting with new features
+ like structured tags or collaborative descriptions of tags.
+ </description>
+ <channel>__uri</channel>
+
+ <lead user="cweiske" name="Christian Weiske" email="cweiske@cweiske.de" />
+ <license>GPL</license>
+
+ <version release="${version}" api="${version}" />
+ <stability release="${stability}" api="${stability}" />
+
+ <notes>${releasenotes}</notes>
+
+ <dependencies>
+ <php minimum_version="5.2.0" />
+ <pear minimum_version="1.8.1" />
+
+ <package name="HTML_QuickForm2"
+ channel="pear.php.net"
+ minimum_version="0.4.0"
+ />
+
+ </dependencies>
+
+ <!-- map directory (key) to role -->
+ <dirroles key="www">www</dirroles>
+ <dirroles key="data">data</dirroles>
+ <dirroles key="doc">doc</dirroles>
+ <dirroles key="src">php</dirroles>
+ <dirroles key="tests">test</dirroles>
+
+ <!-- do not add the following files to the package.
+ copied from excludes above -->
+ <ignore>**/.gitignore</ignore>
+ <ignore>**/.svn</ignore>
+ <ignore>build*</ignore>
+ <ignore>data/config.php</ignore>
+ <ignore>data/locales/messages.po</ignore>
+ <ignore>data/locales/*/LC_MESSAGES/messages.po</ignore>
+ <ignore>dist/**</ignore>
+ <ignore>doc/developers/**</ignore>
+ <ignore>scripts/**</ignore>
+ <ignore>src/php-gettext/examples/**</ignore>
+ <ignore>src/php-gettext/bin/**</ignore>
+ <ignore>*.tgz</ignore>
+
+ <replacement
+ path="src/SemanticScuttle/header.php"
+ type="pear-config"
+ from="@data_dir@" to="data_dir"
+ />
+ <replacement
+ path="www/www-header.php"
+ type="pear-config"
+ from="@data_dir@" to="data_dir"
+ />
+ <replacement
+ path="tests/prepare.php"
+ type="pear-config"
+ from="@data_dir@" to="data_dir"
+ />
+
+ <changelog version="0.97" date="2010-06-09" license="GPL">
+- Many SQL optimizations - SemanticScuttle shows bookmarks 4 times faster now
+- New config option to skip "SET NAMES UTF8" call: $dbneedssetnames
+- Do not highlight admin bookmarks when $enableAdminColors is disabled
+- Add russian translation
+- Make HTML export follow the specifications a bit better
+- Fix bug #2953732: faulty error message for duplicate bookmarks
+- Fix bug #2960663: do not send content-type headers twice for ajax/api scripts
+- Fix bug #2976593: fr_FR locale is vietnamese
+ </changelog>
+
+ <!-- <dirroles key="bin">script</dirroles> -->
+ <!-- <replacement path="bin/doctrine" type="pear-config" from="@php_bin@" to="php_bin" /> -->
+ <!-- <release>
+ <install as="doctrine" name="bin/doctrine" />
+ -->
+ </d51pearpkg2>
+
+ <!-- time to fix the package.xml file since the task does not
+ allow everything we need:
+ - strip the base directory names like src, data and www
+ - remove that dumb baseinstalldir from files
+ - md5sums are generated automatically when packaging
+ -->
+ <!-- yes, we need to generate a 2nd file and move it back -->
+ <copy file="package.xml" tofile="package2.xml" overwrite="true">
+ <filterchain>
+ <replaceregexp>
+ <!-- remove md5sums -->
+ <regexp
+ pattern="md5sum=&quot;[a-z0-9]{32}&quot; "
+ replace=""
+ />
+ <!-- remove baseinstalldir for files -->
+ <regexp
+ pattern="&lt;file baseinstalldir=&quot;/&quot;"
+ replace="&lt;file"
+ />
+ <!-- install-as for different directories -->
+ <regexp
+ pattern="(&lt;file name=&quot;data/(.+?)&quot;)"
+ replace="\1 install-as=&quot;\2&quot;"
+ />
+ <regexp
+ pattern="(&lt;file name=&quot;doc/(.+?)&quot;)"
+ replace="\1 install-as=&quot;\2&quot;"
+ />
+ <regexp
+ pattern="(&lt;file name=&quot;tests/(.+?)&quot;)"
+ replace="\1 install-as=&quot;\2&quot;"
+ />
+ <regexp
+ pattern="(&lt;file name=&quot;www/(.+?)&quot;)"
+ replace="\1 install-as=&quot;SemanticScuttle/\2&quot;"
+ />
+ <regexp
+ pattern="(&lt;file name=&quot;src/(.+?)&quot;)"
+ replace="\1 install-as=&quot;\2&quot;"
+ />
+ </replaceregexp>
+ </filterchain>
+ </copy>
+ <move file="package2.xml" tofile="package.xml" overwrite="true" />
+
+ <!-- package up -->
+ <exec command="pear package" passthru="true" />
+ <move file="${pkgfile}" todir="dist/pear/" />
+
+ <delete file="package.xml" failonerror="true" />
+ </target>
+
+
+
+ <target name="release" depends="check,zip,package,deploy-sf,svntag"
description="Release the version on sourceforge"
>
<!-- meta-target -->
diff --git a/doc/developers/release-new-version b/doc/developers/release-new-version
index 69530df..4b2540a 100644
--- a/doc/developers/release-new-version
+++ b/doc/developers/release-new-version
@@ -4,8 +4,8 @@ How to release a new version of SemanticScuttle
0. Run unit tests and verify that all of them pass
1. Update doc/ChangeLog
2. Update doc/UPGRADE.txt
-3. Update version in data/templates/about.tpl.php
- and build.xml
+3. Update version in data/templates/about.tpl.php,
+ build.xml and doc/README.txt
4. Create a release zip file via the build script:
Just type "phing".
5. Make a test installation from your zip file with a fresh
diff --git a/src/SemanticScuttle/header.php b/src/SemanticScuttle/header.php
index ef36e83..d1a5c29 100644
--- a/src/SemanticScuttle/header.php
+++ b/src/SemanticScuttle/header.php
@@ -14,9 +14,21 @@
* @license GPL http://www.gnu.org/licenses/gpl.html
* @link http://sourceforge.net/projects/semanticscuttle
*/
-if (!file_exists(dirname(__FILE__) .'/../../data/config.php')) {
+
+if ('@data_dir@' == '@' . 'data_dir@') {
+ //non pear-install
+ $datadir = dirname(__FILE__) . '/../../data/';
+} else {
+ //pear installation; files are in include path
+ $datadir = '@data_dir@/SemanticScuttle/';
+}
+
+if (!file_exists($datadir . '/config.php')) {
header('HTTP/1.0 500 Internal Server Error');
- die('Please copy "config.php.dist" to "config.php" in data/ folder.');
+ die(
+ 'Please copy "config.php.dist" to "config.php" in data/ folder.'
+ . "\n"
+ );
}
set_include_path(
get_include_path() . PATH_SEPARATOR
@@ -24,7 +36,6 @@ set_include_path(
);
// 1 // First requirements part (before debug management)
-$datadir = dirname(__FILE__) . '/../../data/';
require_once $datadir . '/config.default.php';
require_once $datadir . '/config.php';
diff --git a/tests/TagsCacheTest.php b/tests/TagsCacheTest.php
index 9097bcb..84f4ec0 100644
--- a/tests/TagsCacheTest.php
+++ b/tests/TagsCacheTest.php
@@ -54,9 +54,6 @@ class TagsCacheTest extends PHPUnit_Framework_TestCase
protected function setUp()
{
- global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix, $TEMPLATES_DIR, $debugMode;
- require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
-
$this->us =SemanticScuttle_Service_Factory::get('User');
$this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
$this->bs->deleteAll();
diff --git a/tests/prepare.php b/tests/prepare.php
index ce9cd1c..6afc284 100644
--- a/tests/prepare.php
+++ b/tests/prepare.php
@@ -19,7 +19,13 @@
$_SERVER['HTTP_HOST'] = 'http://localhost/';
define('UNIT_TEST_MODE', true);
-require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
+if ('@data_dir@' == '@' . 'data_dir@') {
+ //non pear-install
+ require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
+} else {
+ //pear installation; files are in include path
+ require_once 'SemanticScuttle/header.php';
+}
require_once dirname(__FILE__) . '/TestBase.php';
require_once dirname(__FILE__) . '/TestBaseApi.php';
diff --git a/www/www-header.php b/www/www-header.php
index 0688b71..cc5a5ae 100644
--- a/www/www-header.php
+++ b/www/www-header.php
@@ -15,5 +15,11 @@
* @license GPL http://www.gnu.org/licenses/gpl.html
* @link http://sourceforge.net/projects/semanticscuttle
*/
-require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
+if ('@data_dir@' == '@' . 'data_dir@') {
+ //non pear-install
+ require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
+} else {
+ //pear installation; files are in include path
+ require_once 'SemanticScuttle/header.php';
+}
?> \ No newline at end of file