# Build distribution files. VER?= 2.8 PKG= wordpress-${VER} TGZDIR?= ${CURDIR} TGZ= ${TGZDIR}/${PKG}.tar.gz BRANCH?=tags/2.8 POT_DIR?=${HOME}/wordpress-i18n/pot/${BRANCH} POT_FILE?=wordpress.pot KUBRICK_POT_DIR?=${HOME}/wordpress-i18n/theme/${BRANCH} KUBRICK_POT_FILE?=kubrick.pot WEB_DIR?= /www PREFIX?= wp_ DB_USER?= root DB_HOST?= localhost DB_DB?= wpbg MSG= echo "*" updatepo: @${MSG} getting current POT file @svn up ${POT_DIR}/${POT_FILE} @${MSG} updating bg_BG.po from ${POT_DIR}/${POT_FILE} @msgmerge -q messages/bg_BG.po ${POT_DIR}/${POT_FILE} -o messages/bg_BG.po @${MSG} updating kubrick/bg_BG.po from ${KUBRICK_POT_DIR}/${KUBRICK_POT_FILE} @msgmerge -q messages/kubrick/bg_BG.po ${KUBRICK_POT_DIR}/${KUBRICK_POT_FILE} -o messages/kubrick/bg_BG.po 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/kubrick/bg_BG.po -o messages/kubrick/bg_BG.mo build: @${MSG} building ${PKG} localized packages @sh build.sh -d ${TGZ} -b ${VER} . 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 import-mo-from-glotpress: @php ${HOME}/glotpress/scripts/export.php wordpress/2.8 bg nb > messages/bg_BG.po @php ${HOME}/glotpress/scripts/export.php wordpress/2.8/kubrick bg nb > messages/kubrick/bg_BG.po @msgfmt -c --statistics messages/bg_BG.po -o messages/bg_BG.mo @msgfmt -c --statistics messages/kubrick/bg_BG.po -o messages/kubrick/bg_BG.mo get: clean @wget http://bg.wordpress.org/builds/bg_BG/${BRANCH}/wordpress-${VER}-bg_BG.tar.gz