Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 4.0_templates
  • 4.1_templates-symlink
  • develop
  • git-fixes
  • master
5 results

Target

Select target project
  • tneumann9/PlanetRed
  • JSTUREK8/PlanetRed
  • smccoy12/PlanetRed
  • dkuzelka2/PlanetRed
  • s-cwiedel5/PlanetRed
  • dxg/PlanetRed
6 results
Select Git revision
  • 4.0_templates
  • 4.1_templates-symlink
  • develop
  • git-fixes
  • master
5 results
Show changes
Showing
with 321 additions and 0 deletions
<!--
$Id: package.dtd,v 1.38 2005-11-12 02:23:07 cellog Exp $
This is the PEAR package description, version 1.0.
It should be used with the informal public identifier:
"-//PHP Group//DTD PEAR Package 1.0//EN//XML"
Copyright (c) 1997-2005 The PHP Group
This source file is subject to version 3.00 of the PHP license,
that is bundled with this package in the file LICENSE, and is
available at through the world-wide-web at
http://www.php.net/license/3_0.txt.
If you did not receive a copy of the PHP license and are unable to
obtain it through the world-wide-web, please send a note to
license@php.net so we can mail you a copy immediately.
Authors:
Stig S. Bakken <ssb@fast.no>
Gregory Beaver <cellog@php.net>
-->
<!ENTITY % NUMBER "CDATA">
<!ELEMENT package (name,summary,description,license?,maintainers,release,changelog?)>
<!ATTLIST package type (source|binary|empty) "empty"
version CDATA #REQUIRED
packagerversion CDATA #IMPLIED>
<!ELEMENT name (#PCDATA)>
<!ELEMENT summary (#PCDATA)>
<!ELEMENT license (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT maintainers (maintainer)+>
<!ELEMENT maintainer (user|role|name|email)+>
<!ELEMENT user (#PCDATA)>
<!ELEMENT role (#PCDATA)>
<!ELEMENT email (#PCDATA)>
<!ELEMENT changelog (release)+>
<!ELEMENT release (version,date,license,state,notes,warnings?,provides*,deps?,configureoptions?,filelist?)>
<!ELEMENT version (#PCDATA)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT state (#PCDATA)>
<!ELEMENT notes (#PCDATA)>
<!ELEMENT warnings (#PCDATA)>
<!ELEMENT deps (dep*)>
<!ELEMENT dep (#PCDATA)>
<!ATTLIST dep type (pkg|ext|php) #REQUIRED
rel (has|eq|lt|le|gt|ge) #IMPLIED
version CDATA #IMPLIED
optional (yes|no) 'no'>
<!ELEMENT configureoptions (configureoption)+>
<!ELEMENT configureoption EMPTY>
<!ATTLIST configureoption name CDATA #REQUIRED
default CDATA #IMPLIED
prompt CDATA #REQUIRED>
<!ELEMENT provides EMPTY>
<!ATTLIST provides type (ext|prog|class|function|feature|api) #REQUIRED
name CDATA #REQUIRED
extends CDATA #IMPLIED>
<!ELEMENT filelist (dir|file)+>
<!ELEMENT dir (dir|file)+>
<!ATTLIST dir name CDATA #REQUIRED
role (php|ext|src|test|doc|data|script) 'php'
baseinstalldir CDATA #IMPLIED>
<!ELEMENT file (replace*)>
<!ATTLIST file role (php|ext|src|test|doc|data|script) 'php'
debug (na|on|off) 'na'
format CDATA #IMPLIED
baseinstalldir CDATA #IMPLIED
platform CDATA #IMPLIED
md5sum CDATA #IMPLIED
name CDATA #REQUIRED
install-as CDATA #IMPLIED>
<!ELEMENT replace EMPTY>
<!ATTLIST replace type (php-const|pear-config|package-info) #REQUIRED
from CDATA #REQUIRED
to CDATA #REQUIRED>
Summary: PEAR: @summary@
Name: @rpm_package@
Version: @version@
Release: 1
License: @release_license@
Group: Development/Libraries
Source: http://@master_server@/get/@package@-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-root
URL: http://@master_server@/package/@package@
Prefix: %{_prefix}
BuildArchitectures: @arch@
@extra_headers@
%description
@description@
%prep
rm -rf %{buildroot}/*
%setup -c -T
# XXX Source files location is missing here in pear cmd
pear -v -c %{buildroot}/pearrc \
-d php_dir=%{_libdir}/php/pear \
-d doc_dir=/docs \
-d bin_dir=%{_bindir} \
-d data_dir=%{_libdir}/php/pear/data \
-d test_dir=%{_libdir}/php/pear/tests \
-d ext_dir=%{_libdir} \@extra_config@
-s
%build
echo BuildRoot=%{buildroot}
%postun
# if refcount = 0 then package has been removed (not upgraded)
if [ "$1" -eq "0" ]; then
pear uninstall --nodeps -r @possible_channel@@package@
rm @rpm_xml_dir@/@package@.xml
fi
%post
# if refcount = 2 then package has been upgraded
if [ "$1" -ge "2" ]; then
pear upgrade --nodeps -r @rpm_xml_dir@/@package@.xml
else
pear install --nodeps -r @rpm_xml_dir@/@package@.xml
fi
%install
pear -c %{buildroot}/pearrc install --nodeps -R %{buildroot} \
$RPM_SOURCE_DIR/@package@-%{version}.tgz
rm %{buildroot}/pearrc
rm %{buildroot}/%{_libdir}/php/pear/.filemap
rm %{buildroot}/%{_libdir}/php/pear/.lock
rm -rf %{buildroot}/%{_libdir}/php/pear/.registry
if [ "@doc_files@" != "" ]; then
mv %{buildroot}/docs/@package@/* .
rm -rf %{buildroot}/docs
fi
mkdir -p %{buildroot}@rpm_xml_dir@
tar -xzf $RPM_SOURCE_DIR/@package@-%{version}.tgz package@package2xml@.xml
cp -p package@package2xml@.xml %{buildroot}@rpm_xml_dir@/@package@.xml
#rm -rf %{buildroot}/*
#pear -q install -R %{buildroot} -n package@package2xml@.xml
#mkdir -p %{buildroot}@rpm_xml_dir@
#cp -p package@package2xml@.xml %{buildroot}@rpm_xml_dir@/@package@.xml
%files
%defattr(-,root,root)
%doc @doc_files@
/
This diff is collapsed.
#!/usr/bin/perl
while (<>) {
if (!/FILESGOHERE/) {
print $_;
} else {
open FILELIST,'find Structures -type f | grep -v .arch-ids |';
while (<FILELIST>) {
$md5sum = `md5sum $_`;
chomp($md5sum);
$md5sum = substr $md5sum, 0, 32;
# $_ =~ s/\//\\\//g;
chomp($_);
print " <file role=\"php\" md5sum=\"$md5sum\" name=\"$_\" />\n";
}
}
}
#!/bin/bash
VERSION=`tla tree-version 2>&1 | sed "s/^.*\([0-9][0-9]*\.[0-9][0-9]*\)$/\1/g"`
TARGET_DIR=BUILD/
TARGET_DIRS=`find Structures -type d | grep -v .arch-ids`
mkdir -p $TARGET_DIR
./genpackage.xml.pl > BUILD/package.xml << EOF
<?xml version="1.0" encoding="ISO-8859-1" ?>
<package version="1.0">
<name>Structures_Graph</name>
<summary>Graph datastructure manipulation library</summary>
<license>LGPL</license>
<description>
Structures_Graph is a package for creating and manipulating graph datastructures. It allows building of directed
and undirected graphs, with data and metadata stored in nodes. The library provides functions for graph traversing
as well as for characteristic extraction from the graph topology.
</description>
<maintainers>
<maintainer>
<user>sergiosgc</user>
<name>Srgio Carvalho</name>
<email>sergio.carvalho@portugalmail.com</email>
<role>lead</role>
</maintainer>
</maintainers>
<release>
<version>1.0.3</version>
<date>2007-01-30</date>
<state>stable</state>
<notes>
Version 1.0.3 is functionally equivalent to 1.0.2, but released with a v1.0 package.xml to deal with bug #9965:installation problem
</notes>
<filelist>
FILESGOHERE
</filelist>
</release>
<deps>
<dep type="pkg" rel="ge" version="1.2">PEAR</dep>
</deps>
</package>
EOF
for dir in $TARGET_DIRS
do
mkdir -p $TARGET_DIR/$dir
cp `find $dir -maxdepth 1 -type f | grep -v .arch-ids` $TARGET_DIR/$dir
done
cp LICENSE BUILD
(cd BUILD; pear package)
rm -Rf BUILD/package.xml BUILD/LICENSE BUILD/Structures
#!/bin/sh
./package.sh
scp BUILD/*.tgz root@sergiocarvalho.com:/home/httpd/vhosts/com/sergiocarvalho/pear-base/pear
(cd docs; ./generate.sh)
scp -r docs/html/* root@iluvatar.portugalmail.pt:/home/httpd/vhosts/com/sergiocarvalho/pear-base/pear/docs/Structures_Graph
This diff is collapsed.
Patrick O'Lone suggests the following idea which sounds interesting to
add as an optional mode of Cache_Lite class.
(still not tested in the Cache_Lite context)
-------------------------------------------------------------------------
If you use the flags:
ignore_user_abort(true);
$fd = dio_open($szFilename, O_CREATE | O_EXCL | O_TRUNC | O_WRONLY,
0644);
if (is_resource($fd)) {
dio_fcntl($fd, F_SETLKW, array('type' => F_WRLCK));
dio_write($fd, $szBuffer);
dio_fcntl($fd, F_SETLK, array('type' => F_UNLCK));
dio_close($fd);
}
ignore_user_abort(false);
Only the first process will attempt to create a file. Additional
processes will see that a file already exists (at the system level), and
will fail. Another thing to note is that the file descriptor must be
opened using dio_open(), and certain features, like fgets() won't work
with it. If your just doing a raw write, dio_write() should be just
fine. The dio_read() function should be used like:
$fd = dio_open($szFilename, O_RDONLY|O_NONBLOCK, 0644);
if (is_resource($fd)) {
dio_fcntl($fd, F_SETLKW, array('type' => F_RDLCK));
$szBuffer = dio_read($fd, filesize($szFilename));
dio_fcntl($fd, F_SETLK, array('type' => F_UNLCK));
dio_close($fd);
}
You still use locking to ensure that a write process can finish before
another attempts to read the file. We also set non-blocking mode in read
mode so that multiple readers can access the same resource at the same
time. NOTE: Direct I/O support must be compiled into PHP for these
features to work (--enable-dio).
-------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<project name="UNL_LDAP" default="build" basedir=".">
<target name="build" depends="checkphp,php-documentor,php-codesniffer,phpunit"/>
<target name="checkphp">
<apply executable="php" failonerror="true">
<arg value="-l" />
<fileset dir="${basedir}">
<include name="**/*.php" />
</fileset>
</apply>
</target>
<target name="php-documentor">
<exec executable="phpdoc" dir="${basedir}" logerror="on">
<arg line="-ue on -t ${basedir}/build/api -d ."/>
</exec>
</target>
<target name="php-codesniffer">
<exec executable="phpcs" dir="${basedir}" output="${basedir}/build/logs/checkstyle.xml">
<arg line="--report=checkstyle --standard=PEAR ."/>
</exec>
</target>
<target name="phpunit">
<exec executable="phpunit" dir="${basedir}" failonerror="on">
<arg line=" --log-xml ${basedir}/build/logs/phpunit.xml --log-pmd ${basedir}/build/logs/phpunit.pmd.xml --log-metrics ${basedir}/build/logs/phpunit.metrics.xml UNL_LDAPTest ${basedir}/tests/UNL_LDAPTest.php"/>
</exec>
</target>
</project>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.