diff --git a/Makefile b/Makefile index d1bbe307b83d0a95491f958d9338745714c464bd..10027742321d946017d2aba81450ea0e784fb4ce 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,38 @@ MODULES = common plugins/gtkgui +PREFIX = /usr + +FIND= find -regex '.*\.\(\(glade\)\|\(py\)\|\(xpm\)\)' +FILES=`$(FIND)` +DIRS= `$(FIND) -exec dirname {} \; | sort -u` + +SCRIPTS = \ + scripts/gajim all: msgfmt Messages/fr/LC_MESSAGES/gajim.po -o Messages/fr/LC_MESSAGES/gajim.mo - for dir in ${MODULES}; do \ + for dir in $(MODULES); do \ (cd $$dir; make all); \ done clean: find -name *.pyc -exec rm {} \; - for dir in ${MODULES}; do \ + for dir in $(MODULES) ; do \ (cd $$dir; make clean); \ done + +install: + for d in $(DIRS) ; do \ + if [ ! -d $(PREFIX)/share/gajim/$$d ] ; then \ + mkdir -p "$(PREFIX)/share/gajim/$$d"; \ + fi; \ + done + for f in $(FILES) ; do \ + DST=`dirname "$$f"`; \ + cp "$$f" "$(PREFIX)/share/gajim/$$DST/"; \ + done + for s in $(SCRIPTS) ; do \ + BASE=`basename "$$s"`; \ + F=`cat "$$s" | sed -e 's!PREFIX!$(PREFIX)!g'`; \ + echo "$$F" > "$(PREFIX)/bin/$$BASE"; \ + chmod +x "$(PREFIX)/bin/$$BASE"; \ + done diff --git a/scripts/gajim b/scripts/gajim new file mode 100644 index 0000000000000000000000000000000000000000..17cc1d3125e50fed02da450a5c8d8e6ab689cb90 --- /dev/null +++ b/scripts/gajim @@ -0,0 +1,25 @@ +#!/bin/sh +## gajim +## +## Gajim Team: +## - Yann Le Boulanger <asterix@crans.org> +## - Vincent Hanquez <tab@snarc.org> +## +## Copyright (C) 2003 Gajim Team +## +## 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; version 2 only. +## +## 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. + +if [ `id -u` -eq 0 ]; then + echo "You must not launch Gajim as root, it is DANGEROUS" + exit 0 +fi + +cd PREFIX/share/gajim +./runCore.py