%define modname shout %define dirname %{modname} %define soname %{modname}.so %define inifile A57_%{modname}.ini Summary: PHP module for communicating with Icecast servers Name: php-%{modname} Version: 0.9.2 Release: %mkrel 11 Group: Development/PHP License: LGPL URL: http://phpshout.sourceforge.net/ Source0: http://prdownloads.sourceforge.net/phpshout/phpShout-%{version}.tar.bz2 Patch0: phpShout-nuke_hardcoded_cflags.diff BuildRequires: php-devel >= 3:5.2.0 BuildRequires: libshout-devel >= 2.2 BuildRequires: file BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description phpShout is a PHP5 Extension that wraps around the libshout library available at icecast.org. LibShout is used in conjunction with an Icecast server to create a streaming Internet radio station from your own music files. With phpShout, PHP developers can create web-based streaming jukebox applications, without worrying about the details of streaming the audio data. LibShout handles all the metadata updates, data timing, and ensuring that no bad data gets to the Icecast server. %prep %setup -q -n phpShout-%{version} %patch0 -p0 # fix permissions find . -type f | xargs chmod 644 # strip away annoying ^M find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//' find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//' %build %serverbuild phpize %configure2_5x --with-libdir=%{_lib} \ --with-%{modname}=shared,%{_prefix} %make mv modules/*.so . %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} install -d %{buildroot}%{_libdir}/php/extensions install -d %{buildroot}%{_sysconfdir}/php.d install -m0755 %{soname} %{buildroot}%{_libdir}/php/extensions/ cat > %{buildroot}%{_sysconfdir}/php.d/%{inifile} << EOF extension = %{soname} shout.allow_persistent = 1 shout.max_persistent = -1 shout.max_links = -1 shout.default_host = localhost shout.default_port = 8000 shout.default_mount = /phpShout shout.default_user = source shout.default_password = hackme shout.default_format = SHOUT_FORMAT_OGG shout.default_protocol = SHOUT_PROTOCOL_HTTP EOF %post if [ -f /var/lock/subsys/httpd ]; then %{_initrddir}/httpd restart >/dev/null || : fi %postun if [ "$1" = "0" ]; then if [ -f /var/lock/subsys/httpd ]; then %{_initrddir}/httpd restart >/dev/null || : fi fi %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} [ "../package.xml" != "/" ] && rm -f ../package.xml %files %defattr(-,root,root) %doc examples tests LICENSE README TODO %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/php.d/%{inifile} %attr(0755,root,root) %{_libdir}/php/extensions/%{soname} %changelog * Fri Jul 18 2008 Oden Eriksson <oeriksson@mandriva.com> 0.9.2-11mdv2009.0 + Revision: 238428 - rebuild * Fri May 02 2008 Oden Eriksson <oeriksson@mandriva.com> 0.9.2-10mdv2009.0 + Revision: 200266 - rebuilt for php-5.2.6 * Mon Feb 04 2008 Oden Eriksson <oeriksson@mandriva.com> 0.9.2-9mdv2008.1 + Revision: 162152 - rebuild + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tvignaud@mandriva.com> - kill re-definition of %%buildroot on Pixel's request * Sun Nov 11 2007 Oden Eriksson <oeriksson@mandriva.com> 0.9.2-8mdv2008.1 + Revision: 107716 - restart apache if needed * Sat Sep 01 2007 Oden Eriksson <oeriksson@mandriva.com> 0.9.2-7mdv2008.0 + Revision: 77574 - rebuilt against php-5.2.4 * Tue Jul 10 2007 Oden Eriksson <oeriksson@mandriva.com> 0.9.2-6mdv2008.0 + Revision: 51010 - use clean cflags (P0) - use the %%serverbuild macro * Thu Jun 14 2007 Oden Eriksson <oeriksson@mandriva.com> 0.9.2-5mdv2008.0 + Revision: 39522 - use distro conditional -fstack-protector * Fri Jun 01 2007 Oden Eriksson <oeriksson@mandriva.com> 0.9.2-4mdv2008.0 + Revision: 33875 - rebuilt against new upstream version (5.2.3) * Thu May 03 2007 Oden Eriksson <oeriksson@mandriva.com> 0.9.2-3mdv2008.0 + Revision: 21355 - rebuilt against new upstream version (5.2.2) * Thu Feb 08 2007 Oden Eriksson <oeriksson@mandriva.com> 0.9.2-2mdv2007.0 + Revision: 117630 - rebuilt against new upstream version (5.2.1) * Sat Jan 27 2007 Oden Eriksson <oeriksson@mandriva.com> 0.9.2-1mdv2007.1 + Revision: 114367 - Import php-shout * Sat Jan 27 2007 Oden Eriksson <oeriksson@mandriva.com> 0.9.2-1mdv2007.1 - initial Mandriva package