2018-04-09 00:30:03 +02:00
|
|
|
# Copyright (C) 2002 - 2018 John Goerzen & contributors.
|
2002-06-19 07:22:21 +02:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
2003-04-16 21:23:45 +02:00
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
2002-06-19 07:22:21 +02:00
|
|
|
#
|
|
|
|
# This program 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, write to the Free Software
|
2006-08-12 06:15:55 +02:00
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
2006-05-15 03:59:52 +02:00
|
|
|
|
2015-10-13 00:30:03 +02:00
|
|
|
VERSION=$(shell ./offlineimap.py --version)
|
|
|
|
ABBREV=$(shell git log --format='%h' HEAD~1..)
|
|
|
|
TARGZ=offlineimap-$(VERSION)-$(ABBREV)
|
2002-07-12 08:43:07 +02:00
|
|
|
SHELL=/bin/bash
|
2011-03-07 22:23:21 +01:00
|
|
|
RST2HTML=`type rst2html >/dev/null 2>&1 && echo rst2html || echo rst2html.py`
|
2002-06-19 07:22:21 +02:00
|
|
|
|
2011-01-15 21:04:59 +01:00
|
|
|
all: build
|
|
|
|
|
|
|
|
build:
|
|
|
|
python setup.py build
|
|
|
|
@echo
|
|
|
|
@echo "Build process finished, run 'python setup.py install' to install" \
|
|
|
|
"or 'python setup.py --help' for more information".
|
|
|
|
|
2002-06-19 07:22:21 +02:00
|
|
|
clean:
|
2006-12-06 04:24:11 +01:00
|
|
|
-python setup.py clean --all
|
2015-10-13 00:30:03 +02:00
|
|
|
-rm -f bin/offlineimapc 2>/dev/null
|
2011-01-16 17:53:32 +01:00
|
|
|
-find . -name '*.pyc' -exec rm -f {} \;
|
|
|
|
-find . -name '*.pygc' -exec rm -f {} \;
|
|
|
|
-find . -name '*.class' -exec rm -f {} \;
|
|
|
|
-find . -name '.cache*' -exec rm -f {} \;
|
2018-04-09 00:30:03 +02:00
|
|
|
-find . -type d -name '__pycache__' -exec rm -rf {} \;
|
2015-10-13 00:30:03 +02:00
|
|
|
-rm -f manpage.links manpage.refs 2>/dev/null
|
2002-07-18 00:55:52 +02:00
|
|
|
-find . -name auth -exec rm -vf {}/password {}/username \;
|
2017-04-21 21:02:54 +02:00
|
|
|
-$(MAKE) -C docs clean
|
2002-07-12 08:43:07 +02:00
|
|
|
|
2016-03-21 12:59:38 +01:00
|
|
|
.PHONY: docs
|
2015-03-13 19:10:48 +01:00
|
|
|
docs:
|
2011-01-15 16:48:30 +01:00
|
|
|
@$(MAKE) -C docs
|
2006-12-02 22:02:56 +01:00
|
|
|
|
2015-03-25 20:10:29 +01:00
|
|
|
websitedoc:
|
|
|
|
@$(MAKE) -C websitedoc
|
|
|
|
|
2006-05-15 03:59:52 +02:00
|
|
|
targz: ../$(TARGZ)
|
|
|
|
../$(TARGZ):
|
2018-04-09 01:20:58 +02:00
|
|
|
cd .. && tar -zhcv -f $(TARGZ).tar.gz --exclude '.*.swp' --exclude '.*.swo' --exclude '*.pyc' --exclude '__pycache__' offlineimap/{bin,Changelog.md,Changelog.maint.md,contrib,CONTRIBUTING.rst,COPYING,docs,MAINTAINERS.rst,Makefile,MANIFEST.in,offlineimap,offlineimap.conf,offlineimap.conf.minimal,offlineimap.py,README.md,requirements.txt,scripts,setup.cfg,setup.py,snapcraft.yaml,test,tests,TODO.rst}
|
2006-05-15 03:59:52 +02:00
|
|
|
|
|
|
|
rpm: targz
|
|
|
|
cd .. && sudo rpmbuild -ta $(TARGZ)
|