]> code.delx.au - offlineimap/blobdiff - Makefile
Updating version number to 4.0.16
[offlineimap] / Makefile
index a2e3529cac3f10abe9780d7b78807905b085e666..ed5f50c5135db7dc2b3b2f71ee0287c798bd2544 100644 (file)
--- a/Makefile
+++ b/Makefile
 #
 #    You should have received a copy of the GNU General Public License
 #    along with this program; if not, write to the Free Software
-#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+VERSION=4.0.16
+TARGZ=offlineimap_$(VERSION).tar.gz
 SHELL=/bin/bash
 
 clean:
@@ -26,8 +29,7 @@ clean:
        -rm -f `find . -name "*.class"`
        -rm -f `find . -name "*.bak"`
        -rm -f `find . -name ".cache*"`
-       -rm manpage.links
-       -rm manpage.refs
+       -rm -f manpage.links manpage.refs
        -find . -name auth -exec rm -vf {}/password {}/username \;
 
 doc:
@@ -38,5 +40,15 @@ doc:
        man -t -l offlineimap.1 > manual.ps
        ps2pdf manual.ps
        groff -Tascii -man offlineimap.1 | sed $$'s/.\b//g' > manual.txt
-       -rm manpage.links manpage.refs
+       -rm manpage.links manpage.refs manual.ps
+
+targz: ../$(TARGZ)
+../$(TARGZ):
+       if ! pwd | grep -q "/offlineimap-$(VERSION)$$"; then                    \
+         echo "Containing directory must be called offlineimap-$(VERSION)";    \
+         exit 1;                                                               \
+       fi;                                                                     \
+       pwd && cd .. && pwd && tar -zhcv --exclude '_darcs' -f $(TARGZ) offlineimap-$(VERSION)
 
+rpm: targz
+       cd .. && sudo rpmbuild -ta $(TARGZ)