493 lines
18 KiB
Makefile
493 lines
18 KiB
Makefile
# Glasnost
|
|
# By: Odile Bénassy <obenassy@entrouvert.com>
|
|
# Romain Chantereau <rchantereau@entrouvert.com>
|
|
# Nicolas Clapiès <nclapies@easter-eggs.org>
|
|
# Pierre-Antoine Dejace <padejace@entrouvert.be>
|
|
# Thierry Dulieu <tdulieu@easter-eggs.com>
|
|
# Florent Monnier <monnier@codelutin.com>
|
|
# Cédric Musso <cmusso@easter-eggs.org>
|
|
# Frédéric Péters <fpeters@entrouvert.be>
|
|
# Benjamin Poussin <poussin@codelutin.com>
|
|
# Emmanuel Raviart <eraviart@entrouvert.com>
|
|
# Sébastien Régnier <regnier@codelutin.com>
|
|
# Emmanuel Saracco <esaracco@easter-eggs.com>
|
|
#
|
|
# Copyright (C) 2000, 2001 Easter-eggs & Emmanuel Raviart
|
|
# Copyright (C) 2002 Odile Bénassy, Code Lutin, Thierry Dulieu, Easter-eggs,
|
|
# Entr'ouvert, Frédéric Péters, Benjamin Poussin, Emmanuel Raviart,
|
|
# Emmanuel Saracco & Théridion
|
|
# Copyright (C) 2003 Odile Bénassy, Romain Chantereau, Nicolas Clapiès,
|
|
# Code Lutin, Pierre-Antoine Dejace, Thierry Dulieu, Easter-eggs,
|
|
# Entr'ouvert, Florent Monnier, Cédric Musso, Ouvaton, Frédéric Péters,
|
|
# Benjamin Poussin, Rodolphe Quiédeville, Emmanuel Raviart, Sébastien
|
|
# Régnier, Emmanuel Saracco, Théridion & Vecam
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU General Public License
|
|
# as published by the Free Software Foundation; either version 2
|
|
# of the License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
NAME=glasnost
|
|
#check if exist in glasnost-variables-filename
|
|
RELEASE_TYPE=-devel
|
|
RPM_RELEASE=1
|
|
GLASNOST=$(NAME)$(RELEASE_TYPE)
|
|
PORT=9000
|
|
VERSION=20030112
|
|
|
|
GLASNOST_MODULE= $(subst -,_,$(GLASNOST))
|
|
GROUP_ID=`id -gn ${LOGNAME}`
|
|
LANGUAGES=de es fi fr sv
|
|
PYTHON_VERSION=2.1
|
|
USER_ID=$(LOGNAME)
|
|
TESTS_SUITE = suites
|
|
|
|
# Prefixes
|
|
# PREFIX=/opt/$(GLASNOST)
|
|
# VARPREFIX=/var/lib
|
|
# SHAREPREFIX=$(PREFIX)/share
|
|
# LOGPREFIX=/var/log
|
|
|
|
PREFIX=/usr/local
|
|
PREFIX_QUOTED=$(subst /,\/,$(PREFIX))
|
|
VARPREFIX=/var/lib
|
|
SHAREPREFIX=$(PREFIX)/share
|
|
LOGPREFIX=/var/log
|
|
|
|
# Target directories for install
|
|
BIN_DIR=$(PREFIX)/bin
|
|
DATA_DIR=$(VARPREFIX)/$(GLASNOST)
|
|
DATA_DIR_QUOTED= $(subst /,\/,$(DATA_DIR))
|
|
ETC_DIR=/etc/$(GLASNOST)
|
|
ETC_DIR_QUOTED= $(subst /,\/,$(ETC_DIR))
|
|
EXTENSIONS_DIR=$(DATA_DIR)/extensions
|
|
GLASNOST_DIR=$(PREFIX)/share/$(GLASNOST)
|
|
LIBS_DIR=$(PREFIX)/lib/$(GLASNOST)
|
|
LIBS_DIR_QUOTED = $(subst /,\/,$(LIBS_DIR))
|
|
LOCALE_DIR=$(SHAREPREFIX)/locale
|
|
LOCALE_DIR_QUOTED= $(subst /,\/,$(LOCALE_DIR))
|
|
LOG_DIR=$(LOGPREFIX)/$(GLASNOST)
|
|
LOG_DIR_QUOTED= $(subst /,\/,$(LOG_DIR))
|
|
PYTHON_DIR=$(LIBS_DIR)/glasnost
|
|
SBIN_DIR=$(PREFIX)/sbin
|
|
SCRIPTS_DIR=$(GLASNOST_DIR)/scripts
|
|
SERVERS_DIR=$(LIBS_DIR)/servers
|
|
SERVERS_DIR_QUOTED= $(subst /,\/,$(SERVERS_DIR))
|
|
TEMPLATES_DIR=$(DATA_DIR)/templates
|
|
WEB_DIR=$(LIBS_DIR)/web
|
|
WEB_DIR_QUOTED= $(subst /,\/,$(WEB_DIR))
|
|
|
|
SOURCE_DIR=`echo $(CURDIR) | awk -F/ '{print $$NF}'`
|
|
PROJECT_DIR=$(GLASNOST)-$(VERSION)
|
|
DIST_FILE=$(GLASNOST)-$(VERSION).tar.gz
|
|
ARCHIVE_FILE=$(GLASNOST)-$(VERSION).tar.bz2
|
|
|
|
FIND=find
|
|
GETTEXT=/usr/share/doc/python$(PYTHON_VERSION)/examples/Tools/i18n/pygettext.py
|
|
TAR=tar
|
|
RPM=rpm
|
|
PACKAGEINFO=redhat/packageinfo.pl
|
|
|
|
SERVER_USER=root
|
|
SERVER_GROUP=root
|
|
WEB_USER=www-data
|
|
WEB_GROUP=www-data
|
|
|
|
TEMPLATES=default april bxlug codelutin.org cuisine easter-eggs entrouvert.com entrouvert2 glasnost2 lightbulb macfly plane september vecam theridion entrouvert.be
|
|
|
|
RPM_PACKAGE_NAME=python$(PYTHON_VERSION)-tal python$(PYTHON_VERSION)-imaging python$(PYTHON_VERSION)-docutils
|
|
|
|
.PHONY: $(GLASNOST)-variables help archive clean-data data-archive dist dist-clean install-create-dir install-glasnost install-data install-extensions install-gtk install-locale install-log install-python-libs install-scripts install-servers install-templates install-tests install-web install mo po glasnost.spec rpm rpm-depend run-tests system tests uninstall-tests uninstall
|
|
|
|
help:
|
|
@echo
|
|
@echo " Rules"
|
|
@echo "archive - create an archive in tar format of the project"
|
|
@echo "rpm - create an rpm package"
|
|
@echo "rpm-depend - create rpm package don't exist in redhat distribution"
|
|
@echo "install - install glasnost on local machine"
|
|
@echo "uninstall - uninstall glasnost on local machine"
|
|
@echo "dist - create package in tar format ready to install"
|
|
@echo
|
|
@echo " Variables"
|
|
@echo "GLASNOST (default=${GLASNOST})"
|
|
@echo "PORT (DEFAULT=${PORT})"
|
|
@echo "VERSION (DEFAULT=${VERSION})"
|
|
@echo "PYTHON_VERSION (DEFAULT=${PYTHON_VERSION})"
|
|
@echo "PREFIX (default=${PREFIX})"
|
|
@echo "VARPREFIX (default=${VARPREFIX})"
|
|
@echo "SHAREPREFIX (default=${SHAREPREFIX})"
|
|
@echo "LOGPREFIX (default=${LOGPREFIX})"
|
|
@echo
|
|
@echo "example: make GLASNOST=glasnost VERSION=0.6.0 RPM_RELEASE=1 PYTHON_VERSION=2.2 PREFIX=/usr PORT=8000 rpm"
|
|
|
|
archive: dist-clean
|
|
cd .. ; \
|
|
mv $(SOURCE_DIR) $(PROJECT_DIR); \
|
|
$(TAR) jcf $(ARCHIVE_FILE) $(PROJECT_DIR); \
|
|
mv $(PROJECT_DIR) $(SOURCE_DIR)
|
|
|
|
clean-data:
|
|
-rm -Rf $(DATA_DIR)
|
|
|
|
config: config.in
|
|
cat $^ | sed -e "s/^glasnost = .*/glasnost = $(GLASNOST)/g" \
|
|
-e "s/^logdir = .*/logdir = $(LOG_DIR_QUOTED)/g" \
|
|
-e "s/^port = .*/port = $(PORT)/g" \
|
|
-e "s/^vardir = .*/vardir = $(DATA_DIR_QUOTED)/g" \
|
|
-e "s/^webdir = .*/webdir = $(WEB_DIR_QUOTED)/g" \
|
|
-e "s/^LocaleDir = .*/LocaleDir = $(LOCALE_DIR_QUOTED)/g" \
|
|
> config
|
|
|
|
config-system:
|
|
for F in `$(FIND) system -name "*.py"`; \
|
|
do \
|
|
cp $$F /tmp/glasnost-source; \
|
|
cat /tmp/glasnost-source | sed -e "s/^glasnostPythonDir = .*/glasnostPythonDir = '$(LIBS_DIR_QUOTED)'/g" > $$F; \
|
|
rm /tmp/glasnost-source; \
|
|
done
|
|
|
|
config-tests:
|
|
for F in `$(FIND) tests -name "*.py"`; \
|
|
do \
|
|
cp $$F /tmp/glasnost-source; \
|
|
cat /tmp/glasnost-source | sed -e "s/^glasnostPythonDir = .*/glasnostPythonDir = '$(LIBS_DIR_QUOTED)'/g" > $$F; \
|
|
rm /tmp/glasnost-source; \
|
|
done
|
|
|
|
data-archive:
|
|
tar cjf ../$(GLASNOST)-data-`date +%Y%m%d%H%M`.tar.bz2 \
|
|
--directory $(VARPREFIX)/$(GLASNOST)/ --exclude=webcache ./
|
|
|
|
dist: dist-clean
|
|
rm -rf $(PROJECT_DIR) && mkdir $(PROJECT_DIR)
|
|
$(TAR) c --exclude CVS --exclude .cvsignore --exclude .xvpics \
|
|
--exclude debian --exclude $(PROJECT_DIR) \
|
|
--exclude '.#*' . | \
|
|
(cd $(PROJECT_DIR) && tar x)
|
|
rm -rf $(PROJECT_DIR)/templates/*
|
|
for F in $(TEMPLATES); \
|
|
do \
|
|
cp -R templates/$$F $(PROJECT_DIR)/templates/; \
|
|
rm -rf $(PROJECT_DIR)/templates/$$F/CVS; \
|
|
done
|
|
tar czf ../$(DIST_FILE) $(PROJECT_DIR)
|
|
rm -rf $(PROJECT_DIR)
|
|
|
|
dist-clean:
|
|
$(FIND) . -name "*~" | xargs -r rm
|
|
$(FIND) . -name ".*~" | xargs -r rm
|
|
$(FIND) . -name ".*.swp" | xargs -r rm
|
|
$(FIND) . -name "*.pyc" | xargs -r rm
|
|
$(FIND) . -name "*.pyo" | xargs -r rm
|
|
$(FIND) . -name ".#*" | xargs -r rm
|
|
$(FIND) . -name ".nautilus-metafile.xml" | xargs -r rm
|
|
$(FIND) . -name "nohup.out" | xargs -r rm
|
|
-rm -f config
|
|
-rm -f $(GLASNOST)-variables
|
|
|
|
$(GLASNOST)-variables: glasnost-variables.in
|
|
cat $^ | sed -e "s/^SERVERSDIR=.*/SERVERSDIR=$(SERVERS_DIR_QUOTED)/g" \
|
|
| sed -e "s/^PYTHON=.*/PYTHON=python$(PYTHON_VERSION)/g" \
|
|
> $@
|
|
|
|
$(GLASNOST)-%: glasnost-%.in
|
|
cat $^ | sed -e "s/^SERVERSDIR=.*/SERVERSDIR=$(SERVERS_DIR_QUOTED)/g" \
|
|
| sed -e "s/^PYTHON=.*/PYTHON=python$(PYTHON_VERSION)/g" \
|
|
> $@
|
|
|
|
install-create-dir:
|
|
-mkdir -p $(DESTDIR)/$(BIN_DIR)
|
|
-mkdir -p $(DESTDIR)/$(DATA_DIR)
|
|
-mkdir -p $(DESTDIR)/$(GLASNOST_DIR)
|
|
-mkdir -p $(DESTDIR)/$(ETC_DIR)
|
|
-mkdir -p $(DESTDIR)/etc/init.d
|
|
-mkdir -p $(DESTDIR)/$(EXTENSIONS_DIR)
|
|
-mkdir -p $(DESTDIR)/$(LIBS_DIR)
|
|
-mkdir -p $(DESTDIR)/$(LOCALE_DIR)
|
|
-mkdir -p $(DESTDIR)/$(LOG_DIR)
|
|
-mkdir -p $(DESTDIR)/$(PYTHON_DIR)
|
|
-mkdir -p $(DESTDIR)/$(SBIN_DIR)
|
|
-mkdir -p $(DESTDIR)/$(SCRIPTS_DIR)
|
|
-mkdir -p $(DESTDIR)/$(SERVERS_DIR)
|
|
-mkdir -p $(DESTDIR)/$(TEMPLATES_DIR)
|
|
-mkdir -p $(DESTDIR)/$(WEB_DIR)
|
|
|
|
install-glasnost: config \
|
|
$(GLASNOST)-variables \
|
|
glasnost-variables-filename \
|
|
glasnost-convert-ids \
|
|
glasnost-export \
|
|
glasnost-import \
|
|
glasnost-make-system \
|
|
glasnost-start
|
|
@mkdir -p $(DESTDIR)/$(GLASNOST_DIR)
|
|
-cp $^ $(DESTDIR)/$(GLASNOST_DIR)/
|
|
@if test -e $(DESTDIR)/$(SBIN_DIR)/$(GLASNOST); then \
|
|
rm -f $(DESTDIR)/$(SBIN_DIR)/$(GLASNOST); \
|
|
else :; fi
|
|
@if test "true" = "$(DONT_USE_DESTDIR_FOR_LINK)" ; then \
|
|
RPM_DESTDIR=""; \
|
|
else \
|
|
RPM_DESTDIR=="$(DESTDIR)"; \
|
|
fi
|
|
-ln -sb $(RPM_DESTDIR)/$(GLASNOST_DIR)/glasnost-variables-filename \
|
|
$(DESTDIR)/$(SBIN_DIR)/glasnost-variables-filename
|
|
-ln -sb $(RPM_DESTDIR)/$(GLASNOST_DIR)/$(GLASNOST)-variables \
|
|
$(DESTDIR)/$(SBIN_DIR)/$(GLASNOST)-variables
|
|
-ln -sb $(RPM_DESTDIR)/$(GLASNOST_DIR)/glasnost-convert-ids \
|
|
$(DESTDIR)/$(SBIN_DIR)/$(GLASNOST)-convert-ids
|
|
-ln -sb $(RPM_DESTDIR)/$(GLASNOST_DIR)/glasnost-export \
|
|
$(DESTDIR)/$(SBIN_DIR)/$(GLASNOST)-export
|
|
-ln -sb $(RPM_DESTDIR)/$(GLASNOST_DIR)/glasnost-import \
|
|
$(DESTDIR)/$(SBIN_DIR)/$(GLASNOST)-import
|
|
-ln -sb $(RPM_DESTDIR)/$(GLASNOST_DIR)/glasnost-make-system \
|
|
$(DESTDIR)/$(SBIN_DIR)/$(GLASNOST)-make-system
|
|
-ln -sb $(RPM_DESTDIR)/$(GLASNOST_DIR)/glasnost-start \
|
|
$(DESTDIR)/$(SBIN_DIR)/$(GLASNOST)
|
|
@if ! test -e $(DESTDIR)/$(ETC_DIR); then \
|
|
mkdir -p $(DESTDIR)/$(ETC_DIR); \
|
|
else :; fi
|
|
-cp $(DESTDIR)/$(ETC_DIR)/config $(DESTDIR)/$(ETC_DIR)/config.save
|
|
test -e $(DESTDIR)/$(ETC_DIR)/config || cp config $(DESTDIR)/$(ETC_DIR)/config
|
|
|
|
install-data:
|
|
@if ! test -e $(DESTDIR)/$(DATA_DIR); then \
|
|
mkdir -p $(DESTDIR)/$(DATA_DIR); \
|
|
else :; fi
|
|
@if test -e $(DESTDIR)/$(DATA_DIR)/system; then \
|
|
rm -rf $(DESTDIR)/$(DATA_DIR)/system; \
|
|
else :; fi
|
|
@if test -e system/data; then \
|
|
cp -pr system/data $(DESTDIR)/$(DATA_DIR)/system; \
|
|
else :; fi
|
|
chown $(SERVER_USER).$(SERVER_GROUP) $(DESTDIR)/$(DATA_DIR)
|
|
@if ! test -e $(DESTDIR)/$(DATA_DIR)/webcache; then \
|
|
mkdir -p $(DESTDIR)/$(DATA_DIR)/webcache; \
|
|
else :; fi
|
|
chown $(WEB_USER).$(WEB_GROUP) $(DESTDIR)/$(DATA_DIR)/webcache
|
|
|
|
install-extensions:
|
|
-mkdir -p $(DESTDIR)/$(EXTENSIONS_DIR)
|
|
cp extensions/*.py $(DESTDIR)/$(EXTENSIONS_DIR)
|
|
|
|
install-gtk: glasnost-gtk/glasnost-gtk.py
|
|
cat glasnost-gtk/glasnost-gtk.py | sed -e "s/^glasnostPythonDir = .*/glasnostPythonDir = '$(LIBS_DIR_QUOTED)'/g" > $(DESTDIR)/$(BIN_DIR)/$(GLASNOST)-gtk
|
|
chmod +x $(DESTDIR)/$(BIN_DIR)/$(GLASNOST)-gtk
|
|
|
|
install-locale: mo
|
|
for L in $(LANGUAGES); \
|
|
do \
|
|
mkdir -p $(DESTDIR)/$(LOCALE_DIR)/$$L/LC_MESSAGES; \
|
|
cp -R locale/$$L/LC_MESSAGES/glasnost-web.mo $(DESTDIR)/$(LOCALE_DIR)/$$L/LC_MESSAGES/$(GLASNOST)-web.mo; \
|
|
done
|
|
|
|
install-log:
|
|
@if test ! -e $(DESTDIR)/$(LOG_DIR); then \
|
|
mkdir -p $(DESTDIR)/$(LOG_DIR); \
|
|
else :; fi
|
|
chown $(SERVER_USER).$(SERVER_GROUP) $(DESTDIR)/$(LOG_DIR)
|
|
|
|
install-python-libs:
|
|
-mkdir -p $(DESTDIR)/$(PYTHON_DIR)
|
|
-cp -R shared/* $(DESTDIR)/$(PYTHON_DIR)
|
|
cat shared/__init__.py | \
|
|
sed -e "s/applicationName = .*/applicationName = '$(GLASNOST)'/" > $(DESTDIR)/$(PYTHON_DIR)/__init__.py
|
|
cat shared/common/tools.py | \
|
|
sed -e "s/^configFile.*/configFile = \'$(ETC_DIR_QUOTED)\/config\'/g" > $(DESTDIR)/$(PYTHON_DIR)/common/tools.py
|
|
|
|
install-scripts:
|
|
-cp -R scripts/* $(DESTDIR)/$(SCRIPTS_DIR)
|
|
for F in `$(FIND) $(DESTDIR)/$(SCRIPTS_DIR) -name "*.py"`; \
|
|
do \
|
|
cp $$F /tmp/glasnost-source; \
|
|
cat /tmp/glasnost-source | sed -e "s/^glasnostPythonDir = .*/glasnostPythonDir = '$(LIBS_DIR_QUOTED)'/g" > $$F; \
|
|
rm /tmp/glasnost-source; \
|
|
done
|
|
|
|
install-servers:
|
|
-mkdir -p $(DESTDIR)/$(LIBS_DIR)
|
|
-mkdir -p $(DESTDIR)/$(SERVERS_DIR)
|
|
-cp -R servers/* $(DESTDIR)/$(SERVERS_DIR)
|
|
for F in `$(FIND) $(DESTDIR)/$(SERVERS_DIR) -name "*.py"`; \
|
|
do \
|
|
cp $$F /tmp/glasnost-source; \
|
|
cat /tmp/glasnost-source | sed -e "s/^glasnostPythonDir = .*/glasnostPythonDir = '$(LIBS_DIR_QUOTED)'/g" > $$F; \
|
|
rm /tmp/glasnost-source; \
|
|
done
|
|
|
|
install-templates:
|
|
-mkdir -p $(DESTDIR)/$(TEMPLATES_DIR)
|
|
for F in $(TEMPLATES); \
|
|
do \
|
|
cp -R templates/$$F $(DESTDIR)/$(TEMPLATES_DIR)/; \
|
|
done
|
|
|
|
install-tests:
|
|
@echo "Cleaning..."
|
|
@$(MAKE) GLASNOST=glasnost-tests PORT=8500 dist-clean
|
|
@echo "Installing/Updating /etc/hosts entries"
|
|
@grep /etc/hosts -e "127.0.0.1 glasnost-test" -q && cat /etc/hosts | sed -e "s/^127.0.0.1 glasnost-test.*/127.0.0.1 glasnost-test1 glasnost-test2 glasnost-test3/g" > /tmp/hosts-tmp || echo "127.0.0.1 glasnost-test1 glasnost-test2 glasnost-test3" >> /etc/hosts
|
|
@test -e /tmp/hosts-tmp && mv /tmp/hosts-tmp /etc/hosts
|
|
# @echo "Installing/Updating config Dispacher URLs entries"
|
|
# @cat config | sed -e "s/^DispatcherURLs.*/DispatcherURLs = glasnost:\/\/glasnost-test1, glasnost:\/\/glasnost-test2, glasnost:\/\/glasnost-test3/g" > config.tmp
|
|
# @mv config.tmp config
|
|
@echo "Setting up the tests tree"
|
|
@$(MAKE) GLASNOST=glasnost-tests PORT=8500 config-tests
|
|
@$(MAKE) GLASNOST=glasnost-tests PORT=8500 install
|
|
@echo "Launching Glasnost Test environment..."
|
|
@glasnost-tests stop
|
|
@glasnost-tests start
|
|
|
|
install-web:
|
|
-mkdir -p $(DESTDIR)/$(WEB_DIR)
|
|
-cp glasnost-web/.htaccess $(DESTDIR)/$(WEB_DIR)/
|
|
-cp -R glasnost-web/* $(DESTDIR)/$(WEB_DIR)/
|
|
for F in `$(FIND) $(DESTDIR)/$(WEB_DIR) -name "*.py"`; \
|
|
do \
|
|
cp $$F /tmp/glasnost-source; \
|
|
cat /tmp/glasnost-source | sed -e "s/^glasnostPythonDir = .*/glasnostPythonDir = '$(LIBS_DIR_QUOTED)'/g" > $$F; \
|
|
rm /tmp/glasnost-source; \
|
|
done
|
|
|
|
install: install-create-dir \
|
|
install-extensions \
|
|
install-glasnost \
|
|
install-gtk \
|
|
install-python-libs \
|
|
install-servers \
|
|
install-templates \
|
|
install-web \
|
|
install-data \
|
|
install-locale \
|
|
install-log \
|
|
install-scripts
|
|
|
|
install-redhat:
|
|
$(MAKE) PYTHON_VERSION=2.2 PREFIX=/usr WEB_USER=apache WEB_GROUP=apache GLASNOST=glasnost install
|
|
|
|
|
|
mo: po/glasnost-web/de.po \
|
|
po/glasnost-web/es.po \
|
|
po/glasnost-web/fi.po \
|
|
po/glasnost-web/fr.po \
|
|
po/glasnost-web/sv.po
|
|
-mkdir -p locale/de/LC_MESSAGES
|
|
-mkdir -p locale/es/LC_MESSAGES
|
|
-mkdir -p locale/fi/LC_MESSAGES
|
|
-mkdir -p locale/fr/LC_MESSAGES
|
|
-mkdir -p locale/sv/LC_MESSAGES
|
|
msgfmt --statistics -c -v -o locale/de/LC_MESSAGES/glasnost-web.mo po/glasnost-web/de.po
|
|
msgfmt --statistics -c -v -o locale/es/LC_MESSAGES/glasnost-web.mo po/glasnost-web/es.po
|
|
msgfmt --statistics -c -v -o locale/fi/LC_MESSAGES/glasnost-web.mo po/glasnost-web/fi.po
|
|
msgfmt --statistics -c -v -o locale/fr/LC_MESSAGES/glasnost-web.mo po/glasnost-web/fr.po
|
|
msgfmt --statistics -c -v -o locale/sv/LC_MESSAGES/glasnost-web.mo po/glasnost-web/sv.po
|
|
|
|
po: glasnost-web/ \
|
|
shared/common/ \
|
|
shared/proxy/ \
|
|
shared/server/ \
|
|
shared/web/
|
|
|
|
cp po/glasnost-web/de.po po/glasnost-web/de.pox
|
|
cp po/glasnost-web/es.po po/glasnost-web/es.pox
|
|
cp po/glasnost-web/fi.po po/glasnost-web/fi.pox
|
|
cp po/glasnost-web/fr.po po/glasnost-web/fr.pox
|
|
cp po/glasnost-web/sv.po po/glasnost-web/sv.pox
|
|
$(GETTEXT) -d po/glasnost-web/messages -k N_ `$(FIND) $^ -type f -name "*.py"`
|
|
msgmerge -o po/glasnost-web/de.po -D po/glasnost-web de.pox messages.pot
|
|
msgmerge -o po/glasnost-web/es.po -D po/glasnost-web es.pox messages.pot
|
|
msgmerge -o po/glasnost-web/fi.po -D po/glasnost-web fi.pox messages.pot
|
|
msgmerge -o po/glasnost-web/fr.po -D po/glasnost-web fr.pox messages.pot
|
|
msgmerge -o po/glasnost-web/sv.po -D po/glasnost-web sv.pox messages.pot
|
|
|
|
|
|
glasnost.spec: redhat/glasnost.spec.in Makefile
|
|
cat $< | sed -e "s/^%define PYTHON_VERSION .*/%define PYTHON_VERSION ${PYTHON_VERSION}/" \
|
|
-e "s/^%define ver .*/%define ver ${VERSION}/" \
|
|
-e "s/^%define rel .*/%define rel ${RPM_RELEASE}/" \
|
|
-e "s/^%define prefix .*/%define prefix ${PREFIX_QUOTED}/" \
|
|
-e "s/^%define nam .*/%define nam ${GLASNOST}/" > $@
|
|
|
|
redhat/README.redhat: debian/README.Debian
|
|
cat $< | sed -e "s/for Debian//" > $@
|
|
|
|
rpm: glasnost.spec redhat/README.redhat dist rpm-depend
|
|
$(RPM) -ta ../$(DIST_FILE)
|
|
cp /usr/src/rpm/RPMS/noarch/${NAME}-${VERSION}-${RPM_RELEASE}.noarch.rpm redhat
|
|
cp /usr/src/rpm/RPMS/noarch/${NAME}-gtk-${VERSION}-${RPM_RELEASE}.noarch.rpm redhat
|
|
|
|
rpm-depend:
|
|
apt-get install --download-only $(RPM_PACKAGE_NAME)
|
|
for f in $(RPM_PACKAGE_NAME); do \
|
|
PACKAGE_NAME=`grep-available -X -P -s Filename $$f|cut -f2 -d' '`; \
|
|
PACKAGE_NAME=`basename $$PACKAGE_NAME`; \
|
|
(cd redhat; alien --keep-version --to-rpm /var/cache/apt/archives/$$PACKAGE_NAME); \
|
|
done
|
|
|
|
run-tests:
|
|
@echo "Launching tests..."
|
|
@tests/tests-start $(TESTS_SUITE)
|
|
|
|
system:
|
|
@echo "Stopping server for system generation..."
|
|
@glasnost-system stop || exit 0
|
|
@echo "Uninstalling server for system generation..."
|
|
@$(MAKE) GLASNOST=glasnost-system PORT=8600 uninstall
|
|
@ echo "Erasing system generation data..."
|
|
-rm -rf /var/lib/glasnost-system
|
|
@$(MAKE) GLASNOST=glasnost-system PORT=8600 dist-clean
|
|
@echo "Configuring files for system generation..."
|
|
@$(MAKE) GLASNOST=glasnost-system PORT=8600 config-system
|
|
@echo "Installing server for system generation..."
|
|
@$(MAKE) GLASNOST=glasnost-system PORT=8600 install
|
|
@echo "Starting server for system generation..."
|
|
@glasnost-system start
|
|
@echo "Generating system..."
|
|
@system/generate-system
|
|
@echo "Converting to real system..."
|
|
@glasnost-system-make-system localhost
|
|
@echo "Stopping server for system generation..."
|
|
@glasnost-system stop
|
|
@echo "Copying system data into system/data..."
|
|
rm -rf system/data
|
|
cp -pr /var/lib/glasnost-system/system system/data
|
|
@echo "Uninstalling server for system generation..."
|
|
@$(MAKE) GLASNOST=glasnost-system PORT=8600 uninstall
|
|
@ echo "Erasing system generation data..."
|
|
rm -rf /var/lib/glasnost-system
|
|
|
|
tests: uninstall-tests \
|
|
install-tests \
|
|
run-tests
|
|
|
|
uninstall:
|
|
-rm -Rf $(DESTDIR)/$(GLASNOST_DIR)
|
|
-rm -Rf $(DESTDIR)/$(LOG_DIR)
|
|
-rm -Rf $(DESTDIR)/$(PYTHON_DIR)
|
|
-rm -Rf $(DESTDIR)/$(LIBS_DIR)
|
|
-rm -Rf $(DESTDIR)/$(SERVERS_DIR)
|
|
-rm -f $(DESTDIR)/etc/init.d/$(GLASNOST)
|
|
-rm -f $(DESTDIR)/$(SBIN_DIR)/$(GLASNOST)
|
|
-rm -f $(DESTDIR)/$(SBIN_DIR)/$(GLASNOST)-variables
|
|
-rm -f $(DESTDIR)/$(SBIN_DIR)/glasnost-variables-filename
|
|
-rm -f $(DESTDIR)/$(SBIN_DIR)/$(GLASNOST)-convert-ids
|
|
-rm -f $(DESTDIR)/$(SBIN_DIR)/$(GLASNOST)-export
|
|
-rm -f $(DESTDIR)/$(SBIN_DIR)/$(GLASNOST)-import
|
|
-rm -f $(DESTDIR)/$(SBIN_DIR)/$(GLASNOST)-make-system
|
|
$(FIND) $(LOCALE_DIR) -name "$(GLASNOST)-web.mo" | xargs -r rm
|
|
|
|
uninstall-tests:
|
|
@glasnost-tests stop || exit 0
|
|
@$(MAKE) GLASNOST=glasnost-tests PORT=8500 uninstall
|
|
rm -rf /var/lib/glasnost-tests
|