--- vicidial.ebuild.orig 2006-06-14 23:17:34.000000000 +0200 +++ vicidial.ebuild 2006-06-14 23:32:48.000000000 +0200 @@ -41,7 +41,7 @@ src_unpack() { unpack ${A} - cd ${S} + cd "${S}" sed -i -e "s:/home/cron:/usr/share/${PN}:g" *.pl *.at sed -i -e "s:\\\/home\\\/cron:\\\/usr\\\/share\\\/${PN}:g" *.pl sed -i -e "s:/usr/local/apache2/htdocs:/var/www/localhost/htdocs/astguiclient:g" */dbconnect.php @@ -51,18 +51,18 @@ webapp_src_preinst einfo "Installing main files" - dodir ${MY_HTDOCSDIR} - cp -r agc ${D}${MY_HTDOCSDIR}/ - webapp_configfile ${MY_HTDOCSDIR}/agc/dbconnect.php - cp -r VICIDIAL_web ${D}${MY_HTDOCSDIR}/vicidial - rm ${D}${MY_HTDOCSDIR}/vicidial/Copy* - webapp_configfile ${MY_HTDOCSDIR}/vicidial/dbconnect.php - cp -r astguiclient_web ${D}${MY_HTDOCSDIR}/astguiclient - webapp_configfile ${MY_HTDOCSDIR}/astguiclient/dbconnect.php - - webapp_serverowned -R ${MY_HTDOCSDIR}/agc - webapp_serverowned -R ${MY_HTDOCSDIR}/vicidial - webapp_serverowned -R ${MY_HTDOCSDIR}/astguiclient + dodir "${MY_HTDOCSDIR}" + cp -Rf agc "${D}${MY_HTDOCSDIR}/" + webapp_configfile "${MY_HTDOCSDIR}"/agc/dbconnect.php + cp -Rf VICIDIAL_web "${D}${MY_HTDOCSDIR}"/vicidial + rm -f "${D}${MY_HTDOCSDIR}"/vicidial/Copy* + webapp_configfile "${MY_HTDOCSDIR}"/vicidial/dbconnect.php + cp -Rf astguiclient_web "${D}${MY_HTDOCSDIR}"/astguiclient + webapp_configfile "${MY_HTDOCSDIR}"/astguiclient/dbconnect.php + + webapp_serverowned -R "${MY_HTDOCSDIR}"/agc + webapp_serverowned -R "${MY_HTDOCSDIR}"/vicidial + webapp_serverowned -R "${MY_HTDOCSDIR}"/astguiclient exeinto /var/lib/asterisk/agi-bin doexe *.agi @@ -79,18 +79,18 @@ doexe *.pl doexe *.at insinto /usr/share/${PN} - doins test_VICIDIAL_lead_file.txt phone_codes_GMT.txt ${FILESDIR}/${MY_PV}.sql.gz - gunzip ${D}/usr/share/${PN}/${MY_PV}.sql.gz + doins test_VICIDIAL_lead_file.txt phone_codes_GMT.txt "somewhereelse/${MY_PV}.sql.gz" + gunzip "${D}/usr/share/${PN}/${MY_PV}.sql.gz" exeinto /etc/cron.hourly - newexe ${FILESDIR}/cronhourly astguiclient + newexe "${FILESDIR}/cronhourly" astguiclient exeinto /etc/cron.weekly - newexe ${FILESDIR}/cronweekly astguiclient + newexe "${FILESDIR}/cronweekly" astguiclient insinto /etc/asterisk - newins ${FILESDIR}/extensions.conf extensions.${PN}.conf - newins ${FILESDIR}/meetme.conf meetme.${PN}.conf - newins ${FILESDIR}/manager.conf manager.${PN}.conf + newins "${FILESDIR}/extensions.conf" extensions.${PN}.conf + newins "${FILESDIR}/meetme.conf" meetme.${PN}.conf + newins "${FILESDIR}/manager.conf" manager.${PN}.conf dodoc docs/*.txt @@ -110,9 +110,9 @@ die "Passwords are not the same" fi einfo "please type in your MySQL root password to create the database." - cat /usr/share/${PN}/${MY_PV}.sql | sed -e "s:CRONPWD:${pwd1}:g" > /tmp/${PF}.sql - mysql -u root -p < /tmp/${PF}.sql - rm -r /tmp/${PF}.sql + cat "${ROOT}/usr/share/${PN}/${MY_PV}.sql" | sed -e "s:CRONPWD:${pwd1}:g" > "${ROOT}/tmp/${PF}.sql" + mysql -u root -p < "${ROOT}/tmp/${PF}.sql" + rm -Rf "${ROOT}/tmp/${PF}.sql" einfo "A temporary admin user has been set up with the username \"Admin\"" einfo "and the password \"test\". Please change this by visiting the" einfo "astguiclient administration page:" @@ -124,7 +124,7 @@ pkg_postinst() { einfo "To set up the MySQL database, run:" - einfo "\"emerge --config =net-misc/${PF}\"" + einfo "\"emerge --config =${CATEGORY}/${PF}\"" einfo "Please make sure, however, that your MySQL database is running." ewarn "Please note that you must have a cron daemon running, such as"