2005-11-21 19:21:25 +01:00
|
|
|
#
|
2006-12-29 16:52:52 +01:00
|
|
|
# Makefile for gPodder
|
|
|
|
# Copyright 2005-2007 Thomas Perl <thp at perli net>
|
|
|
|
# License: see COPYING file
|
2005-11-21 19:21:25 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
BINFILE=bin/gpodder
|
|
|
|
GLADEFILE=data/gpodder.glade
|
2006-03-31 15:00:54 +02:00
|
|
|
GLADEGETTEXT=$(GLADEFILE).h
|
|
|
|
MESSAGESPOT=data/messages.pot
|
2005-11-21 19:21:25 +01:00
|
|
|
GUIFILE=src/gpodder/gpodder.py
|
2006-12-04 14:06:42 +01:00
|
|
|
LOGO=data/gpodder.png
|
|
|
|
LOGO_48=data/gpodder-48x48.png
|
|
|
|
LOGO_22=data/gpodder-22x22.png
|
2006-04-05 17:00:31 +02:00
|
|
|
MANPAGE=doc/man/gpodder.1
|
2006-02-05 08:47:11 +01:00
|
|
|
TEPACHE=./doc/dev/tepache
|
2006-03-31 15:00:54 +02:00
|
|
|
GPODDERVERSION=`cat $(BINFILE) |grep ^__version__.*=|cut -d\" -f2`
|
2005-11-21 19:21:25 +01:00
|
|
|
|
2006-07-30 15:17:27 +02:00
|
|
|
CHANGELOG=ChangeLog
|
|
|
|
CHANGELOG_TMP=.ChangeLog.tmp
|
|
|
|
CHANGELOG_EDT=.ChangeLog.edit
|
|
|
|
EMAIL ?= $$USER@`hostname -f`
|
|
|
|
|
2006-04-13 12:10:33 +02:00
|
|
|
DESTDIR ?= /
|
|
|
|
|
2006-08-10 15:35:34 +02:00
|
|
|
# default editor of user has not set "EDITOR" env variable
|
|
|
|
EDITOR ?= vim
|
|
|
|
|
2005-11-21 19:21:25 +01:00
|
|
|
##########################################################################
|
|
|
|
|
2006-04-08 08:50:20 +02:00
|
|
|
all: help
|
|
|
|
|
|
|
|
help:
|
|
|
|
@echo 'make test run gpodder in local directory'
|
2006-07-30 15:17:27 +02:00
|
|
|
@echo 'make cl make new changelog entry (1)'
|
2006-04-08 08:50:20 +02:00
|
|
|
@echo 'make release create source tarball in "dist/"'
|
|
|
|
@echo 'make install install gpodder into "/usr/"'
|
|
|
|
@echo 'make uninstall uninstall gpodder from "/usr/"'
|
2006-12-04 14:06:42 +01:00
|
|
|
@echo 'make generators generate manpage, run tepache and resize logo'
|
2006-04-08 08:50:20 +02:00
|
|
|
@echo 'make messages rebuild messages.pot from new source'
|
|
|
|
@echo 'make clean remove generated+temp+*.pyc files'
|
|
|
|
@echo 'make distclean do a "make clean" + remove "dist/"'
|
2006-07-30 15:17:27 +02:00
|
|
|
@echo ''
|
|
|
|
@echo '(1) Please set environment variable "EMAIL" to your e-mail address'
|
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
cl:
|
2006-11-15 12:14:53 +01:00
|
|
|
(echo "`822-date` <$(EMAIL)>"; svn status | grep '^[MA]' | sed -e 's/^[MA] *\(.*\)/ * \1: /'; echo ""; cat $(CHANGELOG)) >$(CHANGELOG_TMP)
|
2006-07-30 15:17:27 +02:00
|
|
|
cp $(CHANGELOG_TMP) $(CHANGELOG_EDT)
|
|
|
|
$(EDITOR) $(CHANGELOG_EDT)
|
|
|
|
diff -q $(CHANGELOG_TMP) $(CHANGELOG_EDT) || mv $(CHANGELOG_EDT) $(CHANGELOG)
|
|
|
|
rm -f $(CHANGELOG_TMP) $(CHANGELOG_EDT)
|
|
|
|
|
2005-11-21 19:21:25 +01:00
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
|
2005-11-21 21:09:52 +01:00
|
|
|
test:
|
2005-11-21 19:21:25 +01:00
|
|
|
$(BINFILE) --debug
|
|
|
|
|
2005-11-22 14:57:08 +01:00
|
|
|
deb:
|
2006-04-05 17:00:31 +02:00
|
|
|
debuild
|
2005-11-22 14:57:08 +01:00
|
|
|
|
2006-04-08 08:50:20 +02:00
|
|
|
release: distclean generators
|
2005-11-21 19:21:25 +01:00
|
|
|
python setup.py sdist
|
|
|
|
|
|
|
|
install: generators
|
2006-04-13 12:10:33 +02:00
|
|
|
python setup.py install --root=$(DESTDIR)
|
2005-11-21 19:21:25 +01:00
|
|
|
|
2005-12-02 15:03:42 +01:00
|
|
|
uninstall:
|
|
|
|
@echo "##########################################################################"
|
|
|
|
@echo "# MAKE UNINSTALL STILL NOT READY FOR PRIME TIME, WILL DO MY BEST TO #"
|
|
|
|
@echo "# REMOVE FILES INSTALLED BY GPODDER. WATCH INSTALL PROCESS AND REMOVE #"
|
|
|
|
@echo "# THE REST OF THE PACKAGES MANUALLY TO COMPLETELY REMOVE GPODDER. #"
|
|
|
|
@echo "##########################################################################"
|
2006-12-04 14:06:42 +01:00
|
|
|
rm -rf /usr/share/gpodder /usr/share/pixmaps/gpodder* /usr/share/applications/gpodder.desktop /usr/share/man/man1/gpodder.man.1 /usr/bin/gpodder /usr/lib/python?.?/site-packages/gpodder/ /usr/share/locale/*/LC_MESSAGES/gpodder.mo
|
2005-12-02 15:03:42 +01:00
|
|
|
|
2005-11-21 19:21:25 +01:00
|
|
|
##########################################################################
|
|
|
|
|
2006-12-04 14:06:42 +01:00
|
|
|
generators: $(MANPAGE) gen_glade gen_graphics
|
2006-04-08 09:22:30 +02:00
|
|
|
make -C data/po update
|
2005-11-21 19:21:25 +01:00
|
|
|
|
2006-04-08 08:50:20 +02:00
|
|
|
messages: gen_gettext
|
2006-04-05 17:00:31 +02:00
|
|
|
|
2006-02-05 08:47:11 +01:00
|
|
|
$(MANPAGE): $(BINFILE)
|
|
|
|
help2man -N $(BINFILE) >$(MANPAGE)
|
2005-11-21 19:21:25 +01:00
|
|
|
|
|
|
|
gen_glade: $(GLADEFILE)
|
2006-02-05 08:47:11 +01:00
|
|
|
$(TEPACHE) --no-helper --glade=$(GLADEFILE) --output=$(GUIFILE)
|
2005-11-21 19:21:25 +01:00
|
|
|
chmod -x $(GUIFILE) $(GUIFILE).orig
|
|
|
|
|
2006-03-31 15:00:54 +02:00
|
|
|
gen_gettext: $(MESSAGESPOT)
|
2006-04-08 09:22:30 +02:00
|
|
|
make -C data/po generators
|
|
|
|
make -C data/po update
|
2006-03-31 15:00:54 +02:00
|
|
|
|
2006-12-04 14:06:42 +01:00
|
|
|
gen_graphics:
|
|
|
|
convert $(LOGO) -resize 22x22 $(LOGO_22)
|
|
|
|
convert $(LOGO) -resize 48x48 $(LOGO_48)
|
|
|
|
|
2006-03-31 15:00:54 +02:00
|
|
|
$(GLADEGETTEXT): $(GLADEFILE)
|
|
|
|
intltool-extract --type=gettext/glade $(GLADEFILE)
|
|
|
|
|
|
|
|
$(MESSAGESPOT): src/gpodder/*.py $(GLADEGETTEXT) $(BINFILE)
|
2006-03-31 18:20:18 +02:00
|
|
|
xgettext -k_ -kN_ -o $(MESSAGESPOT) src/gpodder/*.py $(GLADEGETTEXT) $(BINFILE)
|
2006-11-14 19:45:56 +01:00
|
|
|
sed -i'~' -e 's/SOME DESCRIPTIVE TITLE/gPodder translation template/g' -e 's/YEAR THE PACKAGE'"'"'S COPYRIGHT HOLDER/2006 Thomas Perl/g' -e 's/FIRST AUTHOR <EMAIL@ADDRESS>, YEAR/Thomas Perl <thp@perli.net>, 2006/g' -e 's/PACKAGE VERSION/gPodder '$(GPODDERVERSION)'/g' -e 's/PACKAGE/gPodder/g' $(MESSAGESPOT)
|
2006-03-31 15:00:54 +02:00
|
|
|
|
2005-11-21 19:21:25 +01:00
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
clean:
|
|
|
|
python setup.py clean
|
2006-12-04 14:06:42 +01:00
|
|
|
rm -f src/gpodder/*.pyc src/gpodder/*.bak MANIFEST PKG-INFO data/gpodder.gladep{,.bak} data/gpodder.glade.bak $(GLADEGETTEXT) data/messages.pot~ data/gpodder-??x??.png
|
2005-11-21 19:21:25 +01:00
|
|
|
rm -rf build
|
2006-03-31 15:00:54 +02:00
|
|
|
make -C data/po clean
|
2005-11-21 19:21:25 +01:00
|
|
|
|
2006-04-05 17:00:31 +02:00
|
|
|
debclean:
|
|
|
|
fakeroot debian/rules clean
|
|
|
|
|
2005-11-21 19:21:25 +01:00
|
|
|
distclean: clean
|
|
|
|
rm -rf dist
|
2006-07-30 15:17:27 +02:00
|
|
|
|
2005-11-21 19:21:25 +01:00
|
|
|
##########################################################################
|
|
|
|
|
2006-12-04 14:06:42 +01:00
|
|
|
.PHONY: all cl test release install generators gen_manpage gen_glade gen_graphics clean distclean messages help
|
2005-11-21 19:21:25 +01:00
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
|