2 # gPodder - A media aggregator and podcast client
3 # Copyright (c) 2005-2009 Thomas Perl and the gPodder Team
5 # gPodder is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # gPodder is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ##########################################################################
23 MESSAGESPOT
=data
/messages.pot
25 UIFILES
=$(wildcard data
/ui
/*.ui \
26 data
/ui
/desktop
/*.ui \
29 UIFILES_H
=$(subst .ui
,.ui.h
,$(UIFILES
))
30 TRANSLATABLE_SOURCE
=$(wildcard src
/gpodder
/*.py \
31 src
/gpodder
/gtkui
/*.py \
32 src
/gpodder
/gtkui
/interface
/*.py \
33 src
/gpodder
/gtkui
/desktop
/*.py \
34 src
/gpodder
/gtkui
/maemo
/*.py \
35 src
/gpodder
/gtkui
/frmntl
/*.py
)
38 MANPAGE
=doc
/man
/gpodder
.1
39 GPODDERVERSION
=`cat $(BINFILE) |grep ^__version__.*=|cut -d\" -f2`
41 GPODDER_ICON_THEME
=dist/gpodder
43 ROSETTA_FILES
=$(MESSAGESPOT
) data
/po
/*.po
44 ROSETTA_ARCHIVE
=gpodder-rosetta-upload.
tar.gz
47 CHANGELOG_TMP
=.ChangeLog.tmp
48 CHANGELOG_EDT
=.ChangeLog.edit
49 CHANGELOG_BKP
=.ChangeLog.backup
50 EMAIL ?
= $$USER@
`hostname -f`
55 # default editor of user has not set "EDITOR" env variable
58 ##########################################################################
63 @echo
'make test run gpodder in local directory'
64 @echo
'make unittest run doctests + unittests'
65 @echo
'make mtest run gpodder (for maemo scratchbox)'
66 @echo
'make release create source tarball in "dist/"'
67 @echo
'make releasetest run some tests before the release'
68 @echo
'make install install gpodder into "$(PREFIX)"'
69 @echo
'make uninstall uninstall gpodder from "$(PREFIX)"'
70 @echo
'make generators generate manpage and icons (if needed)'
71 @echo
'make messages rebuild messages.pot from new source'
72 @echo
'make rosetta-upload generate a tarball of all translation files'
73 @echo
'make clean remove generated+temp+*.py{c,o} files'
74 @echo
'make distclean do a "make clean" + remove "dist/"'
76 @echo
'make install-git-menuitem Add shortcuts to your menu for this git checkout'
77 @echo
'make remove-git-menuitem Remove shortcuts created by "install-git-menuitem"'
79 @echo
'(1) Please set environment variable "EMAIL" to your e-mail address'
81 ##########################################################################
84 @
# set xterm title to know what this window does ;)
85 @echo
-ne
'\033]0;gPodder console (make test)\007'
89 PYTHONPATH
=src
/ python
-m gpodder.unittests
92 @
# in maemo scratchbox, we need this for osso/hildon
93 run-standalone.sh python2.5
$(BINFILE
) --maemo
--verbose
101 releasetest
: unittest
102 desktop-file-validate data
/gpodder.desktop
103 make
-C data
/po validate
106 python setup.py
install --root
=$(DESTDIR
) --prefix=$(PREFIX
)
109 gtk-update-icon-cache
-f
-i
$(PREFIX
)/share
/icons
/hicolor
/
112 @echo
"##########################################################################"
113 @echo
"# MAKE UNINSTALL STILL NOT READY FOR PRIME TIME, WILL DO MY BEST TO #"
114 @echo
"# REMOVE FILES INSTALLED BY GPODDER. WATCH INSTALL PROCESS AND REMOVE #"
115 @echo
"# THE REST OF THE PACKAGES MANUALLY TO COMPLETELY REMOVE GPODDER. #"
116 @echo
"##########################################################################"
117 rm -rf
$(PREFIX
)/share
/gpodder
$(PREFIX
)/share
/pixmaps
/gpodder
* $(PREFIX
)/share
/applications
/gpodder.desktop
$(PREFIX
)/share
/man
/man1
/gpodder
.1 $(PREFIX
)/bin
/gpodder
$(PREFIX
)/lib
/python?.?
/site-packages
/gpodder
/ $(PREFIX
)/share
/locale
/*/LC_MESSAGES
/gpodder.mo
119 ##########################################################################
121 generators
: $(MANPAGE
)
122 make
-C data
/po update
124 messages
: gen_gettext
126 $(MANPAGE
): src
/gpodder
/__init__.py
127 $(HELP2MAN
) --name
="A Media aggregator and Podcast catcher" -N
$(BINFILE
) >$(MANPAGE
)
129 gen_gettext
: $(MESSAGESPOT
)
130 make
-C data
/po generators
131 make
-C data
/po update
133 data
/ui
/%.ui.h
: $(subst .ui.h
,.h
,$@
)
134 intltool-extract
--type
=gettext
/glade
$(subst .ui.h
,.ui
,$@
)
136 $(MESSAGESPOT
): src
/gpodder
/*.py
$(BINFILE
) $(UIFILES_H
) $(TRANSLATABLE_SOURCE
)
137 xgettext
-k_
-kN_
-o
$(MESSAGESPOT
) $(TRANSLATABLE_SOURCE
) $(UIFILES_H
) $(BINFILE
)
138 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
)
140 rosetta-upload
: $(ROSETTA_ARCHIVE
)
141 @echo
'You can now upload the archive to launchpad.net: ' $(ROSETTA_ARCHIVE
)
144 tar czvf
$(ROSETTA_ARCHIVE
) $(ROSETTA_FILES
)
146 install-git-menuitem
:
147 doc
/dev
/install-desktopentry.sh
150 doc
/dev
/install-desktopentry.sh
--remove
153 rm -rf
$(GPODDER_ICON_THEME
)
154 mkdir
-p
$(GPODDER_ICON_THEME
)
155 python doc
/dev
/icon-theme
/list-icon-names.py
>$(GPODDER_ICON_THEME
)/names
156 (cd
$(GPODDER_ICON_THEME
) && \
157 python ..
/..
/doc
/dev
/icon-theme
/pack-icons.py
&& \
158 python ..
/..
/doc
/dev
/icon-theme
/create-index.py
>index.theme
&& \
161 ##########################################################################
164 python setup.py
clean
165 find src
/ -name
'*.pyc' -exec
rm '{}' \
;
166 find src
/ -name
'*.pyo' -exec
rm '{}' \
;
167 rm -f MANIFEST PKG-INFO
$(UIFILES_H
) data
/messages.pot~ data
/gpodder-??x??.png
$(ROSETTA_ARCHIVE
) .coverage
169 make
-C data
/po
clean
172 fakeroot debian
/rules
clean
177 ##########################################################################
179 .PHONY
: all test unittest release releasetest
install update-icons generators gen_manpage gen_graphics
clean distclean messages help install-git-menuitem remove-git-menuitem
181 ##########################################################################