%define apache_serverroot %{_datadir} %bcond_with php53 Name: ampache URL: http://www.ampache.org/ Version: 3.5.4 Release: 12%{?dist} Summary: Web based audio/video streaming application License: GPLv2 Group: Applications/Internet Source: http://ampache.org/downloads/ampache-%{version}.tar.gz Source1: httpd.conf.ampache Source2: ampache-README Source3: blueflower.tar.gz Source4: vegas.tar.gz Source5: looney-tunes.tar.gz Source6: ampache.logrotate Source7: blankalbum.jpg Source8: blankalbum.gif Patch0: ampache-3.5-cfg.patch Patch1: ampache-3.5.3-confpath.patch Patch2: ampache-3.5-admin-passwd.patch Patch3: ampache-3.5.4-getid3.patch Patch4: ampache-3.5.4-set_magic_quotes_runtime.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: httpd php-mysql php-gd Requires: xmms BuildArchitectures: noarch %description Ampache is a web based audio/video streaming application, and file manager, which allows the access of your music & videos from anywhere, by using almost any internet enabled device. Read the README files about configuring ampache. %prep %setup -q %patch0 -p1 -b .cfg %patch1 -p1 -b .confpath %patch2 -p1 -b .passwd %if %{with php53} %patch3 -p1 %patch4 -p1 %endif %{_bindir}/iconv -f iso8859-1 -t utf8 sql/ampache.sql -o sql/ampache.sql.txt touch -r sql/ampache.sql sql/ampache.sql.txt mv sql/ampache.sql.txt sql/ampache.sql %build %install %{__rm} -rf %{buildroot} a_root=%{buildroot}%{apache_serverroot}/ampache %{__mkdir_p} $a_root %{__mkdir_p} %{buildroot}%{_sysconfdir}/httpd/conf.d %{__mkdir_p} %{buildroot}%{_sysconfdir}/logrotate.d %{__mkdir_p} %{buildroot}%{_localstatedir}/log/ampache %{__mkdir_p} %{buildroot}%{_mandir} %{__install} -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/httpd/conf.d/ampache.conf %{__install} -m 644 %{SOURCE2} README.FEDORA %{__install} -m 644 %{SOURCE6} %{buildroot}%{_sysconfdir}/logrotate.d/ampache %{__cp} -a admin bin images lib locale modules play server templates themes $a_root/ %{__cp} -a favicon.ico *.php $a_root/ %{__cp} -p config/ampache.cfg.php.dist %{buildroot}%{_sysconfdir}/ampache.cfg %{__cp} -a docs/man/man1 %{buildroot}%{_mandir}/ %{__rm} -f %{_builddir}/%{name}-%{version}/docs/man/man1/ampache.1 sed -i -e's,serverroot,%{apache_serverroot},g' %{buildroot}%{_sysconfdir}/httpd/conf.d/ampache.conf pushd $a_root tar -zxf %{SOURCE3} tar -zxf %{SOURCE4} tar -zxf %{SOURCE5} %{__mv} tmp/themes/* themes %{__cp} -a %{SOURCE7} themes/looney-tunes/images/blankalbum.jpg %{__cp} -a %{SOURCE8} themes/looney-tunes/images/blankalbum.gif %{__cp} -a %{SOURCE7} themes/vegas/images/blankalbum.jpg %{__cp} -a %{SOURCE8} themes/vegas/images/blankalbum.gif # chmod 700 bin/* find . -type d -name CVS -print0 | xargs -0 --no-run-if-empty rm -rf find . -type f -print0 | xargs -0 chmod ugo-x popd # no need to check .htaccess each time, the apache config takes care the restriction %{__rm} %{buildroot}%{apache_serverroot}/ampache/bin/.htaccess %clean %{__rm} -rf %{buildroot} %files %defattr(0644,root,root,0755) %doc docs/* sql/ampache.sql README* config/* %defattr(-,root,root) %config(noreplace) %attr(640,root,apache) %{_sysconfdir}/ampache.cfg %dir %attr(-,apache,root) %{_localstatedir}/log/ampache %config(noreplace) %{_sysconfdir}/httpd/conf.d/ampache.conf %config(noreplace) %{_sysconfdir}/logrotate.d/ampache %{apache_serverroot}/ampache %{_mandir}/man1/ampache* %changelog * Sat Jan 07 2012 Paulo Roma 3.5.4-12 - Removed unsupported hint directive. * Sun Feb 07 2010 Paulo Roma 3.5.4-11 - Updated to 3.5.4, which fixes some bugs introduced in the last release. - Added missing blankalbum picture to looney-tunes and vegas themes. - Conditionally patching for php 5.3 - Applied getid3 patch to fix: `ereg(i) is deprecated` errors in PHP 5.3 http://devthought.com/tumble/2009/06/fix-ereg-is-deprecated-errors-in-php-53/ and set_magic_quotes_runtime(0) is also deprecated. * Mon Jan 04 2010 Paulo Roma 3.5.3-10 - Updated to 3.5.3, several security fixes. - Adapted confpath.patch * Fri Nov 27 2009 Paulo Roma 3.5.2-9 - Updated to 3.5.2, including a new theme. - Adapted confpath.patch * Thu Jun 25 2009 Paulo Roma 3.5.1-8 - Updated to 3.5.1 * Thu May 14 2009 Paulo Roma 3.5-8 - Changed apache_serverroot to %%{_datadir}. * Sun May 10 2009 Paulo Roma 3.5-7 - Added looney tunes theme. - Removed config status from templates. - Converted ampache.sql to utf8. - Added logrotate. * Wed May 06 2009 Paulo Roma 3.5-6 - Updated to 3.5 - Recreated ampache-3.5-cfg.patch and ampache-3.5-admin-passwd.patch - Created man page. - Updated description. * Thu Feb 12 2009 Paulo Roma 3.4.4-5 - Updated to 3.4.4 * Sat Oct 04 2008 Paulo Roma 3.4.3-5 - Updated to 3.4.3 - Included two new themes. * Tue Jul 29 2008 Paulo Roma 3.4.2-4 - Updated to 3.4.2 - Added Req mp3splt. - Removed Req libmad and libvorbis. * Sun Jun 01 2008 Paulo Roma 3.4.1-3 - Updated to 3.4.1 - Creating password changeme for admin. * Thu May 15 2008 Paulo Roma 3.4-2 - Updated to 3.4 - No more /var/www/ampache/download. - Added /var/www/ampache/server. - Adapted patches for version 3.4 and using more appropriate defaults. * Sat Oct 20 2007 Paulo Roma 3.3.3.5-1 - Updated to 3.3.3.5 * Thu Jul 12 2007 Paulo Roma 3.3.3.4-1 - Updated to 3.3.3.4 - Adapted spec for Fedora. - Adapted Requirements for Fedora. * Sat Jun 23 2007 judas_iscariote@shorewall.net 3.3.3.3-6.1 - fix build - use rpm macros * Tue Jun 12 2007 lrupp@suse.de - update to 3.3.3.3 + Fixed Create A Catalog link if no catalog found + Fixed a problem with the installer created with db changes + Fixed a problem with recently played calc thinking there are 60 hours in a day, and 60 days in a week :S + Fixed a bug in the duplicate display where the song_id's for the play link were always the same + Fixed bad sort link on show albums + Fixed missing Offset Limit + Altered session.id making it VARCHAR(64) to account for longer session id's generated by PHP + Added LastFM album art searching + Fixed Show All on Song Title and Genre Browse + Tweaked Preferred Album Art filename to allow %% in filename to indicate wildcards (a preg .*) + Fixed plugin preferences not being built correctly + Fixed the logic with MPD Global/Local with an ugly hack + Fixed the dump album art script for real this time + Added a missing icon for the add user + Fixed a potential infinite loop on the random album display + Fixed the /bin/ scripts so that you don't have to be in their dir to execute them - rename ampache-3.3.3.2.dif and ampache-3.3.3.2-confpath.dif to follow the openSUSE packaging guidelines * Tue May 22 2007 lrupp@suse.de - also package README.SUSE file - added /var/log/ampache as directory * Sun May 20 2007 lrupp@suse.de - update to 3.3.3.2 - cleanup buildroot * Wed Sep 13 2006 poeml@suse.de - fix path to config file in test.php (which is run when configuration errors are encountered) * Tue Jan 31 2006 poeml@suse.de - don't set register_globals, it is no longer needed * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Sat Jan 21 2006 cthiel@suse.de - update to 3.3.1.6 - dropped ampache-3.3.1.2-Snoopy-1.2.1.dif (included upstream) * Wed Jan 18 2006 poeml@suse.de - fix dependencies for php5 * Fri Dec 9 2005 poeml@suse.de - fixed security bug in snoopy php module (bundled HTTP client library), which allowed an authenticated user to remotely execute code on the server. [#136704], CVE-2005-3330 * Sat Jul 16 2005 poeml@suse.de - update to 3.3.1.2 * Wed Sep 15 2004 poeml@suse.de - now that php4-iconv exists on all architectures, we can require it. * Mon Sep 13 2004 poeml@suse.de - remove requirement on php4-iconv again, because it does not exist on certain architectures (see php4.spec). (Wrapping in %%ifnarch doesn't help because the package is noarch.) * Thu Sep 9 2004 poeml@suse.de - add php4-session php4-mysql to Requires * Mon Sep 6 2004 poeml@suse.de - update to 3.2.2 - the default name of the database for a new installation is now changed from "ampache3_1" to "ampache" - make the package require php4-iconv - in /etc/apache2/conf.d/ampache.conf, refer to the Timeout that is set globally from /etc/sysconfig/apache2 * Sun Aug 29 2004 ro@suse.de - remove apache1 traces * Sat May 1 2004 poeml@suse.de - update to 3.2-Alpha2.1 (fixing bug of 3.2-Alpha2 that reset user passwords) * Mon Apr 26 2004 poeml@suse.de - update to 3.2-Alpha2 - upstream config file moved to config/ - cleaning of buildroot is done by %%prep * Thu Mar 25 2004 poeml@suse.de - update to 3.2-Alpha1 - the patch to make $action global is included - wrap configuration into , so apache won't refuse to start if mod_php4 is not loaded - bzip2 sources - drop the requires on the perl modules that are needed only for migration from old database versions. Instead, put it in the documentation - update the README and put the instructions for new installations at the top, so it is less confusing * Mon Mar 22 2004 poeml@suse.de - fix wrong directory permissions of docdir [#36431] * Mon Mar 8 2004 poeml@suse.de - update to cvs version - reenable register_globals for now, since not all features work without it * Wed Feb 4 2004 hmacht@suse.de - added option # norootforbuild in specfile * Mon Jan 5 2004 poeml@suse.de - update to 3.1.02 - drop ampache-3.0-sorting.dif (included upstream) - drop ampache-3.0-session-expire.dif, obsolete - adjust to new file layout - add Requires: perl-DBI perl-Msql-Mysql-modules perl-Data-ShowTable for the migration scripts - rename README.SUSE file and add notes about migration * Thu Nov 20 2003 poeml@suse.de - add patch that prevents certain login failures due to cookies from the year 1935 - set a default character set - add a hint on configuration without a virtual host * Fri Sep 19 2003 poeml@suse.de - apache configuration: - fix trailing slash in Alias - add Directory configuration (needed for apache2, where not everything is allowed by default) [#29729] - install the configuration file also for apache2 - add Requires: http_daemon mod_php * Thu Aug 14 2003 poeml@suse.de - add activation metadata to sysconfig template [#28815] * Thu Jul 31 2003 poeml@suse.de - fix permissions of /etc/ampache.conf.inc to be readable by the webserver but not writable, [#21782] * Fri May 16 2003 poeml@suse.de - add patch to improve sorting - don't package CVS directories - remove executable flag from most files * Tue May 13 2003 poeml@suse.de - use %%defattr instead of chmod&chown - modules/config.php doesn't need to be protected * Thu Feb 27 2003 poeml@suse.de - add sysconfig metadata [#22591] - verify the instructions in README.SuSE and improve them - improve the apache configuration, and add explaining comments * Thu Aug 1 2002 poeml@suse.de - fix apache ServerRoot * Thu Aug 1 2002 poeml@suse.de - use PreReq * Wed Jul 3 2002 poeml@suse.de - new package (version v3.0)