Name: dad Version: 0.2.5 Release: 1 Summary: Digital Audio Database. Group: Applications/Multimedia License: GPL URL: http://davedina.apestaart.org/ Source: http://davedina.apestaart.org/current/own/SOURCES/%{name}-%{version}.tar.gz Vendor: Dave/Dina BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildArch: noarch Requires: webserver Requires: quantaudio >= 0.1.7 Requires: id3 Requires: vorbis-tools Requires: php Requires: perl Requires: perl-DBI %define contentdir /var/www/html/dad %description DAD or Digital Audio Database is a web- and SQL-based Audio back-end. It works with either MySQL or PostgreSQL. Authors: -------- Kristof De Jaegher Thomas Vander Stichele %package mysql Summary: Digital Audio Database MySQL glue Group: Applications/Multimedia Requires: %{name} = %{version}-%{release} Requires: mysql Requires: php-mysql Requires: perl-DBD-MySQL %description mysql This package provides the interface between DAD and MySQL. #%package postgresql #Summary: Digital Audio Database PostgreSQL glue #Group: Applications/Multimedia #Requires: %{name} = %{version}-%{release} #Requires: postgresql #Requires: php-pgsql #Requires: perl-DBD-Pg # #%description postgresql #This package provides the interface between DAD and PostgreSQL. %prep %setup %build %configure --with-webroot=%{contentdir} make %install rm -rf $RPM_BUILD_ROOT cp sql/*.sql . make DESTDIR=$RPM_BUILD_ROOT install # we don't package the postgresql-install file for now rm $RPM_BUILD_ROOT%{_datadir}/dad/postgresql-install.sql %clean rm -rf $RPM_BUILD_ROOT %post touch %{_localstatedir}/log/dad.log # clients also write to the log at this point, so we make it world-writable chmod ga+w %{_localstatedir}/log/dad.log chown :apache %{_localstatedir}/log/dad.log %post mysql if [ "$1" = 1 ]; then # new install, not an upgrade ### we try to import the mysql-install sql, if it's a fresh install then this ### should work, if not it fails anyway mysql -u root -h localhost \ < %{_datadir}/dad/mysql-install.sql 2> /dev/null || \ echo "Failed to install the MySQL tables, you need to do this manually !" true fi #%post postgresql #if [ "$1" = 1 ]; #then # # new install, not an upgrade # # ### we try to import the postgresql-install sql, if it's a fresh install then # ### this should work, if not it fails anyway # #postgreqsql -u root -h localhost \ # # < %{_datadir}/dad/postgresql-install.sql 2> /dev/null || \ # #echo "Failed to install the PostgreSQL tables, you need to do this manually !" # true #fi %postun mysql if [ "$1" = 0 ]; then # final erase, not an upgrade, drop the mysql table mysqladmin -u root -f drop dad > /dev/null || \ echo "Failed to drop the dad database, you need to do this manually !" true fi %files %defattr(-,root,root) %dir %{_datadir}/dad %doc ChangeLog README TODO BUGS AUTHORS NEWS COPYING *.sql %dir %{contentdir} %dir %{contentdir}/images %dir %{contentdir}/lib %dir %{contentdir}/DAD %{contentdir}/*.php %{contentdir}/.htaccess %{contentdir}/lib/*.php %{contentdir}/lib/dad.css %{contentdir}/lib/pane.js %{contentdir}/DAD %{contentdir}/*.m3u %{contentdir}/README %{contentdir}/images/*.gif %config(noreplace) %{_sysconfdir}/dad.conf %config(noreplace) %{_sysconfdir}/httpd/conf.d/dad.php.conf %{_bindir}/dad-*.pl %{_bindir}/dad-log.pm %files mysql %defattr(-,root,root) %{_datadir}/dad/mysql-install.sql #%files postgresql #%defattr(-,root,root) #%{_datadir}/dad/mysql-install.sql %changelog * Sun Aug 17 2003 Thomas Vander Stichele - delete postgresql file * Fri Oct 04 2002 Thomas Vander Stichele - added vorbiscomment dependency - added style sheet - added log file writable making - commented out PostgreSQL until it get's tested * Sun Jun 16 2002 Thomas Vander Stichele - added PostgreSQL - split out in various packages * Thu Mar 28 2002 Thomas Vander Stichele - creation