Merge branch 'pearpkg'

git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@717 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
cweiske 2010-08-21 23:47:56 +00:00
commit 05832245e2
7 changed files with 189 additions and 11 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
dist/
build.properties
package.xml

159
build.xml
View File

@ -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 -->

View File

@ -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

View File

@ -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';

View File

@ -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();

View File

@ -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';

View File

@ -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';
}
?>