2 # - package it, initscript
3 Summary: Portable INET Daemon Framework
9 Source0: %{name}.tar.bz2
10 # Source0-md5: 94e4cdfdaefeceb4b89e0654daf443c8
11 URL: http://www.pinetd.net/
12 Requires: /usr/bin/php
13 #Requires: php-common >= 4:5.3
20 Requires: php-mbstring
24 Requires: php-pecl-proctitle
27 Requires: php-tokenizer
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 %define _appdir %{_datadir}/%{name}
36 PInetd (Portable INET Daemon) is an Open Source server framework &
37 daemon written in PHP, allowing anyone to easily create a TCP server,
38 daemon, etc. You can either use it as a developper, and build your own
43 cat > %{name}.sh <<'EOF'
45 exec /usr/bin/php -d date.timezone=$(date +%Z) %{_appdir}/code/root.php ${1:+"$@"}
48 find -name .svn | xargs rm -rf
51 rm -rf $RPM_BUILD_ROOT
52 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_appdir},%{_sysconfdir}/%{name}}
53 install %{name}.sh $RPM_BUILD_ROOT%{_sbindir}/%{name}
54 cp -a code $RPM_BUILD_ROOT%{_appdir}
55 cp -a etc/* $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
58 rm -rf $RPM_BUILD_ROOT
61 %defattr(644,root,root,755)
63 %dir %{_sysconfdir}/pinetd
64 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pinetd/default_config.xml
65 %attr(755,root,root) %{_sbindir}/pinetd