# # spec file for webCDwriter # Summary: Network CD Writing Name: webCDwriter Version: 1.0rc2 Release: 1 Copyright: GPL Group: System Environment/Daemons Source: http://www.uni-bielefeld.de/~jhaeger/webCDwriter/download/webCDwriter-1.0rc2-signed.tgz URL: http://www.uni-bielefeld.de/~jhaeger/webCDwriter/ Packager: Joerg Haeger Requires: apache, cdrecord >= 1.9, lynx, mkisofs, mpg123, sed %description webCDwriter can be used to make a single CD-writer available to the users in your network. It consists of the server CDWserver and the clients webCDcreator and rcdrecord. CDWserver stores the files transmitted by the clients, reserves the CD-writer and controls the CD-writer using cdrecord. webCDcreator is a Java applet that runs within your browser (Netscape, IE, ?), assists you when putting together a CD and transmits the files. Finally rcdrecord is a command line client that trys to offer the functionality of over the network (not complete yet). %prep %setup %build make -C CDWserver make -C rcdrecord %install rm /var/log/CDWserver/ /var/spool/CDWserver/ -rf make -C CDWserver install make -C rcdrecord install cd webCDcreator/ rm /var/www/html/webCDcreator/ -rf install -d /var/www/html/webCDcreator/ cp -a 4netscape/ /var/www/html/webCDcreator/ cp -a 4plugin/ /var/www/html/webCDcreator/ cp -a 4pluginRSA/ /var/www/html/webCDcreator/ cp -a doc/ /var/www/html/webCDcreator/ cp -a icons/ /var/www/html/webCDcreator/ install -m 644 start.html /var/www/html/webCDcreator/index.html %files /etc/CDWserver/ /etc/rc.d/init.d/CDWserver /usr/bin/files2cd /usr/bin/rcdrecord /usr/bin/setScheduler /usr/sbin/CDWserver /var/log/CDWserver/ /var/spool/CDWserver/ /var/www/html/webCDcreator/ %pre # Add the "CDwriter" user /usr/sbin/useradd -c "CDwriter" \ -s /bin/false -r -d /var/spool/CDWserver cdwriter 2> /dev/null || : %post #/etc/rc.d/init.d/CDWserver start /sbin/chkconfig --add CDWserver chown cdwriter.cdwriter -R /etc/CDWserver/ /var/log/CDWserver/ \ /var/spool/CDWserver/ 2> /dev/null chgrp cdwriter /usr/bin/cdrecord /usr/bin/mkisofs 2> /dev/null chmod 4750 /usr/bin/cdrecord /usr/bin/mkisofs 2> /dev/null cd /var/www/html/webCDcreator/4netscape/ if [ ! -f index.html ] ; then cat local.html | sed s/localhost/`hostname`/g > index.html fi cd /var/www/html/webCDcreator/4plugin/ if [ ! -f index.html ] ; then cat local.html | sed s/localhost/`hostname`/g > index.html fi cd /var/www/html/webCDcreator/4pluginRSA/ if [ ! -f index.html ] ; then cat local.html | sed s/localhost/`hostname`/g > index.html fi echo -e "Now you can start CDWserver by" echo -e " /etc/rc.d/init.d/CDWserver start" echo -e "Try to get the status of CDWserver by" echo -e " /etc/rc.d/init.d/CDWserver status" echo -e "If this is OK, try to start webCDcreator by visiting" echo -e " http://`hostname`/webCDcreator/" echo -e "or try rcdrecord on the command line." echo -e "If there is a problem, edit /etc/CDWserver/config." %preun /sbin/chkconfig --del CDWserver /etc/rc.d/init.d/CDWserver stop rm /var/spool/CDWserver/ -rf %postun chgrp root /usr/bin/cdrecord /usr/bin/mkisofs 2> /dev/null chmod 755 /usr/bin/cdrecord /usr/bin/mkisofs 2> /dev/null