# # Build distribution files. VER= 2.1 PKG= wordpress-${VER} TGZ= ${CURDIR}/${PKG}.tar.gz WEB_DIR?= /home/nb/public_html/ PREFIX?= wpbg_ DB_USER?= nb DB_HOST?= debian.fmi.uni-sofia.bg DB_DB?= nb MSG= echo "*" .PHONY: build build: @${MSG} building ${PKG} localized packages @sh build.sh -d ${TGZ} -b ${VER} . clean: @${MSG} cleaning for ${PKG} @rm -f ${PKG}-* install: @${MSG} installing localized ${PKG} into ${WEB_DIR} @cd ${WEB_DIR}; tar xzf ${CURDIR}/${PKG}-bg_BG.tar.gz 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}