anchor.diff:          mythweather mythweather-dbg \
           mythzoneminder mythzoneminder-dbg"
   
  -FILES_mythweb_apache = "${datadir}/apache2/htdocs \
  +FILES_mythweb-apache = " \
  +	${datadir}/apache2/htdocs/mythweb.* \
  +	${datadir}/apache2/htdocs/*/ \
  +	${datadir}/apache2/htdocs/*/*/ \
  +	${datadir}/apache2/htdocs/*/*/* \
  +	${datadir}/apache2/htdocs/*/*/*/* \
           /etc/apache2/extra/mythweb.conf"
   
  -FILES_mythweb_lighttpd = "${datadir}/www/pages \
  +FILES_mythweb-lighttpd = " \
  +	/www/pages/mythweb.* \
  +	/www/pages/* \
  +	/www/pages/*/* \
  +	/www/pages/*/*/* \
  +	/www/pages/*/*/*/* \
           /etc/mythweb.conf"
   
   FILES_mytharchive = "${libdir}/mythtv/plugins/libmytharchive.so \
  
positive.code: DEPENDS = "flac taglib mythtv libvorbis libexif libvisual libsdl-x11 libcdaudio cdparanoia"
  RDEPENDS_${PN} = "mytharchive mythbrowser mythgallery mythgame mythmovies  \
                    mythmusic mythnetvision mythnews mythvideo mythweather mythzoneminder"
  RRECOMMENDS_${PN} = "mythweb_lighttpd"
  
  # the apache variant does not work yet, too many issues with apache+php+mysql"
  DEPENDS_mythweb_apache = "mythweb"
  RDEPENDS_mythweb_apache = "apache2"
  
  DEPENDS_mythweb_lighttpd = "mythweb"
  RDEPENDS_mythweb_lighttpd = "lighttpd lighttpd-module-cgi lighttpd-module-fastcgi \
          lighttpd-module-rewrite php-cgi lighttpd-module-auth"
  
  RDEPENDS_mythnetvision += " python python-mysqldb "
  
negative.code: 
  do_install () {
          oe_runmake install INSTALL_ROOT="${D}"
  	rm -rf `find ${S}/mythweb -type d -name .svn`
          install -d  ${D}${datadir}/
          install -d  ${D}${datadir}/apache2
          install -d  ${D}${datadir}/apache2/htdocs
          install -d  ${D}${sysconfdir}/
          install -d  ${D}${sysconfdir}/apache2
          install -d  ${D}${sysconfdir}/apache2/extra
          cp -r ${S}/mythweb/* ${D}/${datadir}/apache2/htdocs/
          mv ${S}/mythweb/mythweb.conf.apache ${D}${sysconfdir}/apache2/extra/mythweb.conf
          sed -i -e s:/var/www/html:/usr/share/apache2/htdocs:g ${D}${sysconfdir}/apache2/extra/mythweb.conf
          install -d  ${D}/www
          install -d  ${D}/www/pages
          cp -r ${S}/mythweb/* ${D}/www/pages/
          mv ${S}/mythweb/mythweb.conf.lighttpd ${D}${sysconfdir}/mythweb.conf
          sed -i -e s:/var/www/html:/www/pages:g ${D}${sysconfdir}/mythweb.conf
  }
  
  pkg_postinst_mythweb-apache () {
          chgrp -R apache /usr/share/apache2/htdocs/data
          chmod g+rw /usr/share/apache2/htdocs/data
          grep mythweb.conf /etc/apache2/httpd.conf || \
                echo "Include /etc/apache2/extra/mythweb.conf" >>/etc/apache2/httpd.conf
  }
  
  pkg_postinst_mythweb-lighttpd () {
          chgrp -R www-data /var/www/pages
          chmod g+rw /var/www/pages
          grep mythweb.conf /etc/lighttpd.conf || \
                  echo "Include /etc/mythweb.conf" >>/etc/lighttpd.conf
  }
  
  PACKAGES =+ " \
          mythweb-apache mythweb-lighttpd \
          mytharchive mytharchive-dbg \
          mythbrowser mythbrowser-dbg \
          mythgallery mythgallery-dbg \
  