# Build distribution files. VER?= 3.2 PKG= wordpress-${VER} TGZDIR?= ${CURDIR} TGZ= ${TGZDIR}/${PKG}.tar.gz BRANCH?=trunk POT_DIR?=${HOME}/wordpress-i18n/pot/${BRANCH} POT_FILE?=wordpress.pot TWENTYTEN_POT_DIR?=${HOME}/wordpress/${BRANCH}/wp-content/themes/twentyten/languages TWENTYTEN_POT_FILE?=twentyten.pot TWENTYELEVEN_POT_DIR?=${HOME}/wordpress/${BRANCH}/wp-content/themes/twentyeleven/languages TWENTYELEVEN_POT_FILE?=twentyeleven.pot WEB_DIR?= /www PREFIX?= wp_ DB_USER?= root DB_HOST?= 127.0.0.1 DB_DB?= wpbg DB_PASS?= root MSG= echo "*" buildmo: @msgfmt -c --statistics messages/bg_BG.po -o messages/bg_BG.mo @msgfmt -c --statistics messages/continents-cities-bg_BG.po -o messages/continents-cities-bg_BG.mo @msgfmt -c --statistics messages/twentyten/bg_BG.po -o messages/twentyten/bg_BG.mo @msgfmt -c --statistics messages/twentyeleven/bg_BG.po -o messages/twentyeleven/bg_BG.mo clean: @${MSG} cleaning for ${PKG} @rm -f ${PKG}-* install-dir: @${MSG} installing localized ${PKG} into ${WEB_DIR} @tar -C ${WEB_DIR} -xzf ${CURDIR}/${PKG}-bg_BG.tar.gz install-config: @${MSG} configuring the installation @cp ${WEB_DIR}/wordpress/wp-config-sample.php ${WEB_DIR}/wordpress/wp-config.php @sed -i -e "s/'DB_NAME', '.*'/'DB_NAME', '${DB_DB}'/" ${WEB_DIR}/wordpress/wp-config.php @sed -i -e "s/'DB_USER', '.*'/'DB_USER', '${DB_USER}'/" ${WEB_DIR}/wordpress/wp-config.php @sed -i -e "s/'DB_PASSWORD', '.*'/'DB_PASSWORD', '${DB_PASS}'/" ${WEB_DIR}/wordpress/wp-config.php @sed -i -e "s/'DB_HOST', '.*'/'DB_HOST', '${DB_HOST}'/" ${WEB_DIR}/wordpress/wp-config.php install: install-dir install-config uninstall: uninstall-dir uninstall-db uninstall-dir: @${MSG} removing wordpress directory @rm -rf ${WEB_DIR}/wordpress/ uninstall-db: @${MSG} removing database tables @echo 'SHOW TABLES;' | mysql -u${DB_USER} -h${DB_HOST} --password=${DB_PASS} ${DB_DB} \ | perl -ne 'chomp; print "DROP TABLE $$_;\n" if /^${PREFIX}/;' \ | mysql -u${DB_USER} -h${DB_HOST} --password=${DB_PASS} ${DB_DB} reinstall: uninstall install reinstall-dir: uninstall-dir install-dir import-from-glotpress: @curl http://translate.wordpress.org/projects/wp/dev/bg/default/export-translations > messages/bg_BG.po @curl http://translate.wordpress.org/projects/wp/dev/twentyten/bg/default/export-translations > messages/twentyten/bg_BG.po @curl http://translate.wordpress.org/projects/wp/dev/twentyeleven/bg/default/export-translations > messages/twentyeleven/bg_BG.po @msgfmt -c --statistics messages/bg_BG.po -o messages/bg_BG.mo @msgfmt -c --statistics messages/twentyten/bg_BG.po -o messages/twentyten/bg_BG.mo @msgfmt -c --statistics messages/twentyeleven/bg_BG.po -o messages/twentyeleven/bg_BG.mo get: clean @wget http://bg.wordpress.org/builds/bg_BG/${BRANCH}/wordpress-${VER}-bg_BG.tar.gz