2005-04-01 01:26:05 +02:00
|
|
|
VERSION ?= 0.6.1
|
2004-11-25 20:27:09 +01:00
|
|
|
|
2005-03-08 11:43:25 +01:00
|
|
|
MODULES = common plugins/gtkgui
|
|
|
|
PREFIX = /usr
|
|
|
|
DESTDIR = /
|
|
|
|
|
2005-04-04 21:54:14 +02:00
|
|
|
FIND = find -regex '.*\.\(\(glade\)\|\(pyo\)\|\(xpm\)\|\(gif\)\|\(png\)\|\(mo\)\|\(wav\)\)'
|
2005-03-08 11:43:25 +01:00
|
|
|
FILES = `$(FIND)`
|
|
|
|
DIRS = `$(FIND) -exec dirname {} \; | sort -u`
|
|
|
|
FIND_LIB = find -regex '.*\.\(so\)'
|
|
|
|
FILES_LIB = `$(FIND_LIB)`
|
2005-04-04 21:54:14 +02:00
|
|
|
FIND_PY = find -regex '.*\.\(py\)'
|
|
|
|
FILES_PY = `$(FIND_PY)`
|
2004-11-25 20:27:09 +01:00
|
|
|
|
2005-03-12 23:53:17 +01:00
|
|
|
LANGS = fr pt_BR
|
2004-11-25 20:27:09 +01:00
|
|
|
SCRIPTS = \
|
|
|
|
scripts/gajim
|
2004-06-09 16:22:27 +02:00
|
|
|
|
2005-04-04 21:54:14 +02:00
|
|
|
all: translation trayicon idle pyo
|
2005-03-23 12:52:25 +01:00
|
|
|
|
|
|
|
translation:
|
2005-03-12 23:53:17 +01:00
|
|
|
for l in $(LANGS) ; do \
|
|
|
|
msgfmt Messages/$$l/LC_MESSAGES/gajim.po -o Messages/$$l/LC_MESSAGES/gajim.mo; \
|
|
|
|
done
|
2005-03-23 12:52:25 +01:00
|
|
|
|
|
|
|
trayicon:
|
|
|
|
make -C plugins/gtkgui all;
|
|
|
|
|
|
|
|
idle:
|
|
|
|
make -C common all;
|
2004-06-09 16:22:27 +02:00
|
|
|
|
2005-04-04 21:54:14 +02:00
|
|
|
pyo:
|
|
|
|
ST="import py_compile\n py_compile.compile('$$f')"
|
|
|
|
for f in $(FILES_PY) ; do \
|
2005-04-05 01:30:33 +02:00
|
|
|
python -OO -c "$$ST"; \
|
2005-04-04 21:54:14 +02:00
|
|
|
done
|
|
|
|
|
2004-06-09 16:22:27 +02:00
|
|
|
clean:
|
|
|
|
find -name *.pyc -exec rm {} \;
|
2005-03-23 12:52:25 +01:00
|
|
|
find -name *.mo -exec rm {} \;
|
2004-11-26 00:01:38 +01:00
|
|
|
$(foreach sdir, $(MODULES), make -C $(sdir) clean;)
|
2004-11-25 20:27:09 +01:00
|
|
|
|
2005-03-08 11:44:31 +01:00
|
|
|
dist:
|
|
|
|
-rm -rf gajim-$(VERSION)
|
|
|
|
mkdir gajim-$(VERSION)
|
2005-03-22 17:43:41 +01:00
|
|
|
cp -r plugins scripts common Core doc Messages sounds gajim-$(VERSION)/
|
2005-04-01 16:55:56 +02:00
|
|
|
cp setup_win32.py gajim.iss AUTHORS gajim.1 gajim.xpm gajim.ico COPYING Makefile Changelog README gajim.py gajim-$(VERSION)
|
2005-03-08 11:44:31 +01:00
|
|
|
-find gajim-$(VERSION) -name '.svn' -exec rm -rf {} \; 2> /dev/null
|
|
|
|
find gajim-$(VERSION) -name '*.pyc' -exec rm {} \;
|
|
|
|
find gajim-$(VERSION) -name '*.pyo' -exec rm {} \;
|
|
|
|
find gajim-$(VERSION) -name '.*' -exec rm {} \;
|
|
|
|
@echo tarring gajim-$(VERSION) ...
|
|
|
|
@tar cjf gajim-$(VERSION).tar.bz2 gajim-$(VERSION)/
|
|
|
|
rm -rf gajim-$(VERSION)
|
|
|
|
|
2004-11-25 20:27:09 +01:00
|
|
|
install:
|
|
|
|
for d in $(DIRS) ; do \
|
2004-12-19 22:31:25 +01:00
|
|
|
if [ ! -d $(DESTDIR)$(PREFIX)/share/gajim/$$d ] ; then \
|
|
|
|
mkdir -p "$(DESTDIR)$(PREFIX)/share/gajim/$$d"; \
|
2004-11-25 20:27:09 +01:00
|
|
|
fi; \
|
|
|
|
done
|
|
|
|
for f in $(FILES) ; do \
|
|
|
|
DST=`dirname "$$f"`; \
|
2004-12-19 22:31:25 +01:00
|
|
|
cp "$$f" "$(DESTDIR)$(PREFIX)/share/gajim/$$DST/"; \
|
2004-11-25 20:27:09 +01:00
|
|
|
done
|
2005-03-23 00:26:08 +01:00
|
|
|
cp COPYING "$(DESTDIR)$(PREFIX)/share/gajim/";
|
2005-01-26 11:45:33 +01:00
|
|
|
rm "$(DESTDIR)$(PREFIX)/share/gajim/setup_win32.py";
|
|
|
|
mkdir -p "$(DESTDIR)$(PREFIX)/lib/gajim";
|
|
|
|
for f in $(FILES_LIB) ; do \
|
|
|
|
cp "$$f" "$(DESTDIR)$(PREFIX)/lib/gajim/"; \
|
|
|
|
done
|
2005-03-22 18:50:46 +01:00
|
|
|
mkdir -p "$(DESTDIR)$(PREFIX)/bin";
|
2004-11-25 20:27:09 +01:00
|
|
|
for s in $(SCRIPTS) ; do \
|
|
|
|
BASE=`basename "$$s"`; \
|
|
|
|
F=`cat "$$s" | sed -e 's!PREFIX!$(PREFIX)!g'`; \
|
2004-12-19 22:31:25 +01:00
|
|
|
echo "$$F" > "$(DESTDIR)$(PREFIX)/bin/$$BASE"; \
|
|
|
|
chmod +x "$(DESTDIR)$(PREFIX)/bin/$$BASE"; \
|
2004-11-25 20:27:09 +01:00
|
|
|
done
|