rpms/php-pecl-ncurses/devel ncurses-1.0.0-php53.patch, NONE, 1.1 php-pecl-ncurses.spec, NONE, 1.1 xml2changelog, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Remi Collet remi at fedoraproject.org
Sun Jul 12 21:00:51 UTC 2009


Author: remi

Update of /cvs/extras/rpms/php-pecl-ncurses/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25906

Modified Files:
	.cvsignore sources 
Added Files:
	ncurses-1.0.0-php53.patch php-pecl-ncurses.spec xml2changelog 
Log Message:
new package - replace php-ncurses

ncurses-1.0.0-php53.patch:

--- NEW FILE ncurses-1.0.0-php53.patch ---
--- ncurses_fe.c.php53	2006-01-05 02:22:32.000000000 +0100
+++ ncurses_fe.c	2008-12-13 18:04:22.000000000 +0100
@@ -25,20 +25,29 @@
 #include "php_ini.h"
 #include "php_ncurses.h"
 
-static 
+#if ZEND_MODULE_API_NO >= 20071006
+// No more define with PHP 5.3.0
+	ZEND_BEGIN_ARG_INFO(first_arg_force_ref, 0)
+		ZEND_ARG_PASS_INFO(1)
+	ZEND_END_ARG_INFO();
+
+	ZEND_BEGIN_ARG_INFO(second_arg_force_ref, 0)
+		ZEND_ARG_PASS_INFO(0)
+		ZEND_ARG_PASS_INFO(1)
+	ZEND_END_ARG_INFO();
+#endif
+
 	ZEND_BEGIN_ARG_INFO(firstandsecond_args_force_ref, 0)
 		ZEND_ARG_PASS_INFO(1)
 		ZEND_ARG_PASS_INFO(1)
 	ZEND_END_ARG_INFO();
 
-static
 	ZEND_BEGIN_ARG_INFO(secondandthird_args_force_ref, 0)
 		ZEND_ARG_PASS_INFO(0)
 		ZEND_ARG_PASS_INFO(1)
 		ZEND_ARG_PASS_INFO(1)
 	ZEND_END_ARG_INFO();
 
-static 
 	ZEND_BEGIN_ARG_INFO(second_thru_fourth_args_force_ref, 0)
 		ZEND_ARG_PASS_INFO(0)
 		ZEND_ARG_PASS_INFO(1)


--- NEW FILE php-pecl-ncurses.spec ---
%{!?__pecl:     %{expand: %%global __pecl     %{_bindir}/pecl}}
%{!?php_extdir: %{expand: %%global php_extdir %(php-config --extension-dir)}}

%define pecl_name ncurses

Summary:      Terminal screen handling and optimization package
Name:         php-pecl-ncurses
Version:      1.0.0
Release:      2%{?dist}
License:      PHP
Group:        Development/Languages
URL:          http://pecl.php.net/package/ncurses

Source:       http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
Source2:      xml2changelog

Patch0:       ncurses-1.0.0-php53.patch

BuildRoot:    %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: php-devel, ncurses-devel, php-pear
Requires(post): %{__pecl}
Requires(postun): %{__pecl}
Obsoletes:    php-ncurses < 5.3.0
Provides:     php-ncurses = 5.3.0
Provides:     php-pecl(%{pecl_name}) = %{version}-%{release}
Requires:     php(zend-abi) = %{php_zend_api}
Requires:     php(api) = %{php_core_api}

%description
ncurses (new curses) is a free software emulation of curses in
System V Rel 4.0 (and above). It uses terminfo format, supports
pads, colors, multiple highlights, form characters and function
key mapping. Because of the interactive nature of this library,
it will be of little use for writing Web applications, but may
be useful when writing scripts meant using PHP from the command
line.



%prep 
%setup -c -q
%{__pear} convert package.xml package2.xml
%{_bindir}/php -n %{SOURCE2} package2.xml >CHANGELOG

cd %{pecl_name}-%{version}
%patch0 -p0 -b .php53


%build
cd %{pecl_name}-%{version}
phpize
%configure
%{__make} %{?_smp_mflags}


%install
cd %{pecl_name}-%{version}
%{__rm} -rf %{buildroot}
%{__make} install INSTALL_ROOT=%{buildroot}

# Drop in the bit of configuration
%{__mkdir_p} %{buildroot}%{_sysconfdir}/php.d
%{__cat} > %{buildroot}%{_sysconfdir}/php.d/%{pecl_name}.ini << 'EOF'
; Enable %{pecl_name} extension module
extension=%{pecl_name}.so
EOF

# Install XML package description
# use 'name' rather than 'pecl_name' to avoid conflict with pear extensions
%{__mkdir_p} %{buildroot}%{pecl_xmldir}
%{__install} -m 644 ../package2.xml %{buildroot}%{pecl_xmldir}/%{name}.xml


%check
cd %{pecl_name}-%{version}
TEST_PHP_EXECUTABLE=$(which php) php run-tests.php \
    -n -q -d extension_dir=modules \
    -d extension=%{pecl_name}.so \


%clean
%{__rm} -rf %{buildroot}


%if 0%{?pecl_install:1}
%post
%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
%endif


%if 0%{?pecl_uninstall:1}
%postun
if [ $1 -eq 0 ] ; then
    %{pecl_uninstall} %{pecl_name} >/dev/null || :
fi
%endif


%files
%defattr(-, root, root, -)
%doc CHANGELOG %{pecl_name}-%{version}/CREDITS %{pecl_name}-%{version}/example1.php
%config(noreplace) %{_sysconfdir}/php.d/%{pecl_name}.ini
%{php_extdir}/%{pecl_name}.so
%{pecl_xmldir}/%{name}.xml


%changelog
* Sun Jul 12 2009 Remi Collet <Fedora at FamilleCollet.com> 1.0.0-2
- add %%check for minimal test.

* Sun Jul 12 2009 Remi Collet <Fedora at FamilleCollet.com> 1.0.0-1
- initial RPM (for php 5.3.0)
- ncurses-1.0.0-php53.patch 



--- NEW FILE xml2changelog ---
<?php
$prog=array_shift($_SERVER['argv']);
if ($_SERVER['argc']<2) die ("usage : " . $prog . " path_to_package.xml [ --debug ]\n");
$file=array_shift($_SERVER['argv']);

($xml=simplexml_load_file($file)) || die ($file . " not found !\n");
if (in_array("--debug", $_SERVER['argv'])) print_r($xml);

if ($xml['version'] >= "2"){ // Package.xml V 2.0
	printf("*** Version %s (%s) - API %s (%s) - %s\n\n%s\n\n",
		$xml->version->release, $xml->stability->release, 
		$xml->version->api, $xml->stability->api, 
		$xml->date, $xml->notes);
	$new=$xml->version->release;

	if (isset($xml->changelog->release) && count($xml->changelog->release)) 
	    foreach($xml->changelog->release as $rel) {
		$old=$rel->version->release;
		if ("$old" != "$new") {
		    printf("*** Version %s (%s) - API %s (%s) - %s\n\n%s\n\n",
			$rel->version->release, $rel->stability->release, 
			$rel->version->api, $rel->stability->api, 
			$rel->date, $rel->notes);
		}
	    }
} else { // Package.xml V 1.0
	printf("* Version %s (%s) - %s\n\n%s\n\n",
		$xml->release->version, $xml->release->state, $xml->release->date, $xml->release->notes);

	foreach($xml->changelog->release as $rel)
		printf("* Version %s (%s) - %s\n\n%s\n\n",
			$rel->version, $rel->state, $rel->date, $rel->notes);
}
?>


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/php-pecl-ncurses/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	12 Jul 2009 20:24:12 -0000	1.1
+++ .cvsignore	12 Jul 2009 21:00:50 -0000	1.2
@@ -0,0 +1 @@
+ncurses-1.0.0.tgz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/php-pecl-ncurses/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	12 Jul 2009 20:24:13 -0000	1.1
+++ sources	12 Jul 2009 21:00:50 -0000	1.2
@@ -0,0 +1 @@
+b8a2cb350b200985233e9549d358a0e2  ncurses-1.0.0.tgz




More information about the fedora-extras-commits mailing list