if (!preg_match('/^\d{4}-\d{2}-\d{2}$/', $m[2])) {
// uncertain dates are allowed only for the top version, and only if it does not match the target version (otherwise we have forgot to set the correct date before tagging)
if (!$out && $targetVersion !== $version) {
// use today's date; local time is fine
$date = date("Y-m-d");
} else {
throw new \Exception("CHANGELOG: Date at line $a is incomplete");
sed -ise 's/\/\(etc\|usr\/share\)\/arsse\//\/\1\/webapps\/arsse\//'"$pkgdir/etc/webapps/arsse/nginx/"* "$pkgdir/etc/webapps/arsse/apache/"* "$pkgdir/usr/lib/tmpfiles.d/arsse.conf""$pkgdir/usr/lib/systemd/system/"* "$pkgdir/usr/bin/"*
sed -ise 's/\/var\/run\/php\//\/run\/php-fpm\//'"$pkgdir/etc/webapps/arsse/nginx/"* "$pkgdir/etc/webapps/arsse/apache/"* "$pkgdir/etc/php/php-fpm.d/arsse.conf"
sed -ise 's/www-data/http/'"$pkgdir/etc/php/php-fpm.d/arsse.conf"
sed -ie 's/^WorkingDirectory=.*$/WorkingDirectory=\/usr\/share\/webapps\/arsse/' -e 's/^ConfigurationDirectory=.*$/ConfigurationDirectory=webapps\/arsse/'"$pkgdir/usr/lib/systemd/system/arsse-fetch.service"