2005-11-21 19:21:25 +01:00
|
|
|
#
|
2007-08-29 20:30:26 +02:00
|
|
|
# gPodder - A media aggregator and podcast client
|
2011-04-01 18:59:42 +02:00
|
|
|
# Copyright (c) 2005-2011 Thomas Perl and the gPodder Team
|
2007-08-29 20:30:26 +02:00
|
|
|
#
|
|
|
|
# gPodder 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 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# gPodder 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, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
2005-11-21 19:21:25 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
BINFILE=bin/gpodder
|
2006-03-31 15:00:54 +02:00
|
|
|
MESSAGESPOT=data/messages.pot
|
2009-09-13 23:37:23 +02:00
|
|
|
|
|
|
|
UIFILES=$(wildcard data/ui/*.ui \
|
2011-07-16 18:35:14 +02:00
|
|
|
data/ui/desktop/*.ui)
|
2009-05-08 14:28:53 +02:00
|
|
|
UIFILES_H=$(subst .ui,.ui.h,$(UIFILES))
|
2011-08-04 04:20:05 +02:00
|
|
|
QMLFILES=$(wildcard data/ui/qml/*.qml)
|
2009-09-13 23:37:23 +02:00
|
|
|
TRANSLATABLE_SOURCE=$(wildcard src/gpodder/*.py \
|
|
|
|
src/gpodder/gtkui/*.py \
|
|
|
|
src/gpodder/gtkui/interface/*.py \
|
2011-08-04 04:20:05 +02:00
|
|
|
src/gpodder/gtkui/desktop/*.py \
|
|
|
|
src/gpodder/qmlui/*.py \
|
|
|
|
src/gpodder/webui/*.py \
|
|
|
|
src/gpodder/plugins/*.py)
|
2009-09-13 23:37:23 +02:00
|
|
|
|
2008-04-06 02:19:03 +02:00
|
|
|
HELP2MAN=help2man
|
2011-04-11 20:28:12 +02:00
|
|
|
MANPAGE=data/man/gpodder.1
|
2005-11-21 19:21:25 +01:00
|
|
|
|
2010-01-08 01:58:15 +01:00
|
|
|
GPODDER_SERVICE_FILE=data/org.gpodder.service
|
|
|
|
GPODDER_SERVICE_FILE_IN=$(addsuffix .in,$(GPODDER_SERVICE_FILE))
|
|
|
|
|
2011-04-11 20:06:06 +02:00
|
|
|
GPODDER_DESKTOP_FILE=data/gpodder.desktop
|
|
|
|
GPODDER_DESKTOP_FILE_IN=$(addsuffix .in,$(GPODDER_DESKTOP_FILE))
|
|
|
|
DESKTOPFILE_H=$(addsuffix .h,$(GPODDER_DESKTOP_FILE_IN))
|
|
|
|
|
2006-04-13 12:10:33 +02:00
|
|
|
DESTDIR ?= /
|
2007-03-17 13:58:49 +01:00
|
|
|
PREFIX ?= /usr
|
2006-04-13 12:10:33 +02:00
|
|
|
|
2010-02-13 02:52:25 +01:00
|
|
|
PYTHON ?= python
|
|
|
|
|
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'
|
2011-02-01 21:48:03 +01:00
|
|
|
@echo 'make qmltest run gpodder (qml ui) in local directory'
|
2009-02-25 14:23:03 +01:00
|
|
|
@echo 'make unittest run doctests + unittests'
|
2006-04-08 08:50:20 +02:00
|
|
|
@echo 'make release create source tarball in "dist/"'
|
2008-01-22 10:28:09 +01:00
|
|
|
@echo 'make releasetest run some tests before the release'
|
2007-03-18 17:11:34 +01:00
|
|
|
@echo 'make install install gpodder into "$(PREFIX)"'
|
2010-01-08 01:41:58 +01:00
|
|
|
@echo 'make manpage update manpage (on release)'
|
|
|
|
@echo 'make messages update messages.pot + .po files + .mo files'
|
2008-04-06 02:19:03 +02:00
|
|
|
@echo 'make clean remove generated+temp+*.py{c,o} files'
|
2006-04-08 08:50:20 +02:00
|
|
|
@echo 'make distclean do a "make clean" + remove "dist/"'
|
2010-07-02 21:44:34 +02:00
|
|
|
@echo 'make headlink print URL for the current Git head'
|
2006-07-30 15:17:27 +02:00
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
|
2005-11-21 21:09:52 +01:00
|
|
|
test:
|
2008-02-24 14:52:29 +01:00
|
|
|
@# set xterm title to know what this window does ;)
|
|
|
|
@echo -ne '\033]0;gPodder console (make test)\007'
|
2009-05-07 16:26:07 +02:00
|
|
|
$(BINFILE) --verbose
|
2005-11-21 19:21:25 +01:00
|
|
|
|
2011-02-01 21:48:03 +01:00
|
|
|
qmltest:
|
|
|
|
@echo -ne '\033]0;gPodder/QML console\007'
|
2011-02-02 21:24:35 +01:00
|
|
|
$(BINFILE) --qml --verbose
|
2011-02-01 21:48:03 +01:00
|
|
|
|
2009-02-25 14:23:03 +01:00
|
|
|
unittest:
|
2010-02-13 02:52:25 +01:00
|
|
|
PYTHONPATH=src/ $(PYTHON) -m gpodder.unittests
|
2008-04-06 02:19:03 +02:00
|
|
|
|
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
|
|
|
|
2007-03-07 15:53:05 +01:00
|
|
|
release: distclean
|
2010-02-13 02:52:25 +01:00
|
|
|
$(PYTHON) setup.py sdist
|
2005-11-21 19:21:25 +01:00
|
|
|
|
2011-04-11 20:06:06 +02:00
|
|
|
releasetest: unittest $(GPODDER_DESKTOP_FILE)
|
|
|
|
desktop-file-validate $(GPODDER_DESKTOP_FILE)
|
2009-08-23 12:18:32 +02:00
|
|
|
make -C data/po validate
|
2008-01-22 10:28:09 +01:00
|
|
|
|
2010-01-08 01:58:15 +01:00
|
|
|
$(GPODDER_SERVICE_FILE): $(GPODDER_SERVICE_FILE_IN)
|
|
|
|
sed -e 's#__PREFIX__#$(PREFIX)#' $< >$@
|
|
|
|
|
2011-04-11 20:06:06 +02:00
|
|
|
$(GPODDER_DESKTOP_FILE): $(GPODDER_DESKTOP_FILE_IN) data/po/*.po
|
|
|
|
intltool-merge -d -u data/po $< $@
|
|
|
|
|
|
|
|
$(GPODDER_DESKTOP_FILE_IN).h: $(GPODDER_DESKTOP_FILE_IN)
|
|
|
|
intltool-extract --quiet --type=gettext/ini $<
|
|
|
|
|
|
|
|
install: messages $(GPODDER_SERVICE_FILE) $(GPODDER_DESKTOP_FILE)
|
2010-02-13 02:52:25 +01:00
|
|
|
$(PYTHON) setup.py install --root=$(DESTDIR) --prefix=$(PREFIX)
|
2007-03-27 19:56:59 +02:00
|
|
|
|
2005-11-21 19:21:25 +01:00
|
|
|
##########################################################################
|
|
|
|
|
2010-01-08 01:41:58 +01:00
|
|
|
manpage: $(MANPAGE)
|
2005-11-21 19:21:25 +01:00
|
|
|
|
2010-01-08 01:41:58 +01:00
|
|
|
$(MANPAGE): src/gpodder/__init__.py $(BINFILE)
|
2008-04-06 02:19:03 +02:00
|
|
|
$(HELP2MAN) --name="A Media aggregator and Podcast catcher" -N $(BINFILE) >$(MANPAGE)
|
|
|
|
|
2010-01-08 01:41:58 +01:00
|
|
|
##########################################################################
|
2006-03-31 15:00:54 +02:00
|
|
|
|
2010-01-08 01:41:58 +01:00
|
|
|
messages: $(MESSAGESPOT)
|
|
|
|
make -C data/po
|
2006-03-31 15:00:54 +02:00
|
|
|
|
2010-01-08 01:41:58 +01:00
|
|
|
data/ui/%.ui.h: $(UIFILES)
|
|
|
|
intltool-extract --quiet --type=gettext/glade $(subst .ui.h,.ui,$@)
|
2006-03-31 15:00:54 +02:00
|
|
|
|
2011-08-04 04:20:05 +02:00
|
|
|
$(MESSAGESPOT): $(TRANSLATABLE_SOURCE) $(UIFILES_H) $(QMLFILES) $(BINFILE) $(DESKTOPFILE_H)
|
|
|
|
xgettext -LPython -k_:1 -kN_:1 -kN_:1,2 -kn_:1,2 -o $(MESSAGESPOT) $^
|
2007-06-21 16:15:37 +02:00
|
|
|
|
2010-01-08 01:41:58 +01:00
|
|
|
##########################################################################
|
2007-06-21 16:15:37 +02:00
|
|
|
|
2010-07-02 21:44:34 +02:00
|
|
|
# This only works in a Git working commit, and assumes that the local Git
|
|
|
|
# HEAD has already been pushed to the main repository. It's mainly useful
|
|
|
|
# for the gPodder maintainer to quickly generate a commit link that can be
|
|
|
|
# posted online in bug trackers and mailing lists.
|
|
|
|
|
|
|
|
headlink:
|
|
|
|
@echo http://gpodder.org/commit/`git show-ref HEAD | head -c8`
|
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
|
2005-11-21 19:21:25 +01:00
|
|
|
clean:
|
2010-02-13 02:52:25 +01:00
|
|
|
$(PYTHON) setup.py clean
|
2009-09-24 14:29:27 +02:00
|
|
|
find src/ -name '*.pyc' -exec rm '{}' \;
|
|
|
|
find src/ -name '*.pyo' -exec rm '{}' \;
|
2010-06-05 01:50:15 +02:00
|
|
|
find data/ui/ -name '*.ui.h' -exec rm '{}' \;
|
2011-04-11 20:06:06 +02:00
|
|
|
rm -f MANIFEST PKG-INFO data/messages.pot~ $(DESKTOPFILE_H)
|
|
|
|
rm -f data/gpodder-??x??.png .coverage
|
|
|
|
rm -f $(GPODDER_SERVICE_FILE) $(GPODDER_DESKTOP_FILE)
|
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
|
2010-01-08 01:41:58 +01:00
|
|
|
|
2005-11-21 19:21:25 +01:00
|
|
|
##########################################################################
|
|
|
|
|
2011-04-11 20:28:12 +02:00
|
|
|
.PHONY: all test unittest release releasetest install manpage clean distclean messages help headlink
|
2005-11-21 19:21:25 +01:00
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
|