2 # gPodder - A media aggregator and podcast client
3 # Copyright (c) 2005-2008 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 GLADEFILE
=data
/gpodder.glade
24 GLADEGETTEXT
=$(GLADEFILE
).h
25 MESSAGESPOT
=data
/messages.pot
26 GUIFILE
=src
/gpodder
/gui.py
27 LOGO_22
=data
/icons
/22/gpodder.png
28 LOGO_24
=data
/icons
/24/gpodder.png
30 MANPAGE
=doc
/man
/gpodder
.1
31 GPODDERVERSION
=`cat $(BINFILE) |grep ^__version__.*=|cut -d\" -f2`
33 ROSETTA_FILES
=$(MESSAGESPOT
) data
/po
/*.po
34 ROSETTA_ARCHIVE
=gpodder-rosetta-upload.
tar.gz
37 CHANGELOG_TMP
=.ChangeLog.tmp
38 CHANGELOG_EDT
=.ChangeLog.edit
39 CHANGELOG_BKP
=.ChangeLog.backup
40 EMAIL ?
= $$USER@
`hostname -f`
45 # default editor of user has not set "EDITOR" env variable
48 ##########################################################################
53 @echo
'make test run gpodder in local directory'
54 @echo
'make mtest run gpodder (for maemo scratchbox)'
55 @echo
'make cl make new changelog entry (1)'
56 @echo
'make ci format a commit message from the changelog'
57 @echo
'make release create source tarball in "dist/"'
58 @echo
'make releasetest run some tests before the release'
59 @echo
'make install install gpodder into "$(PREFIX)"'
60 @echo
'make uninstall uninstall gpodder from "$(PREFIX)"'
61 @echo
'make generators generate manpage and icons (if needed)'
62 @echo
'make messages rebuild messages.pot from new source'
63 @echo
'make rosetta-upload generate a tarball of all translation files'
64 @echo
'make clean remove generated+temp+*.py{c,o} files'
65 @echo
'make distclean do a "make clean" + remove "dist/"'
67 @echo
'(1) Please set environment variable "EMAIL" to your e-mail address'
69 ##########################################################################
72 cp
$(CHANGELOG
) $(CHANGELOG_BKP
)
73 (echo
"`date -R` <$(EMAIL)>" ; svn status | sed
-f doc
/dev
/svncl.sed |
sort ; echo
""; cat
$(CHANGELOG
)) >$(CHANGELOG_EDT
)
74 cp
$(CHANGELOG_EDT
) $(CHANGELOG
)
75 $(EDITOR
) $(CHANGELOG
)
76 diff
-q
$(CHANGELOG
) $(CHANGELOG_EDT
) && mv
$(CHANGELOG_BKP
) $(CHANGELOG
) || true
77 rm -f
$(CHANGELOG_BKP
) $(CHANGELOG_EDT
)
81 (svn diff ChangeLog | egrep
'^[+]([^+].+|)$$' | sed
-e
's/^[+]//')>commit_message
82 @echo
'to commit, enter "svn ci -F commit_message'
84 ##########################################################################
87 @
# set xterm title to know what this window does ;)
88 @echo
-ne
'\033]0;gPodder console (make test)\007'
89 $(BINFILE
) --local
--verbose
92 @
# in maemo scratchbox, we need this for osso/hildon
93 run-standalone.sh
$(BINFILE
) --local
--maemo
--verbose
102 if grep
-q
'^__version__.*=.*+svn' $(BINFILE
); then echo
"Version is still '+svn'."; exit
1; fi
103 desktop-file-validate data
/gpodder.desktop
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
) $(LOGO_24
)
122 make
-C data
/po update
124 messages
: gen_gettext
126 $(MANPAGE
): $(BINFILE
)
127 $(HELP2MAN
) --name
="A Media aggregator and Podcast catcher" -N
$(BINFILE
) >$(MANPAGE
)
129 data
/maemo
/gpodder.desktop
: data
/gpodder.desktop
130 sed
-e
's/^Exec=gpodder$$/Exec=gpodder --maemo/g' <data
/gpodder.desktop
>data
/maemo
/gpodder.desktop
132 gen_gettext
: $(MESSAGESPOT
)
133 make
-C data
/po generators
134 make
-C data
/po update
136 $(LOGO_24
): $(LOGO_22
)
137 convert
-bordercolor Transparent
-border
1x1
$(LOGO_22
) $(LOGO_24
)
139 $(GLADEGETTEXT
): $(GLADEFILE
)
140 intltool-extract
--type
=gettext
/glade
$(GLADEFILE
)
142 $(MESSAGESPOT
): src
/gpodder
/*.py
$(GLADEGETTEXT
) $(BINFILE
)
143 xgettext
-k_
-kN_
-o
$(MESSAGESPOT
) src
/gpodder
/*.py
$(GLADEGETTEXT
) $(BINFILE
)
144 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
)
146 rosetta-upload
: $(ROSETTA_ARCHIVE
)
147 @echo
'You can now upload the archive to launchpad.net: ' $(ROSETTA_ARCHIVE
)
150 tar czvf
$(ROSETTA_ARCHIVE
) $(ROSETTA_FILES
)
152 ##########################################################################
155 python setup.py
clean
156 rm -f src
/gpodder
/*.pyc src
/gpodder
/*.pyo src
/gpodder
/*.bak MANIFEST PKG-INFO data
/gpodder.gladep
{,.bak
} data
/gpodder.glade.bak
$(GLADEGETTEXT
) data
/messages.pot~ data
/gpodder-??x??.png
$(ROSETTA_ARCHIVE
)
158 make
-C data
/po
clean
161 fakeroot debian
/rules
clean
166 ##########################################################################
168 .PHONY
: all cl ci
test release releasetest
install update-icons generators gen_manpage gen_graphics
clean distclean messages help
170 ##########################################################################