From f4dedf0d4d4cffd533f948b87cc76e55eaf9e352 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Mon, 3 Jan 2011 15:50:59 +0000 Subject: [PATCH] Weitergekommen git-svn-id: http://svn.brehm-online.com/svn/my-stuff/python/fbrehm/trunk@178 ec8d2aa5-1599-4edb-8739-2b3a1bc399aa --- Makefile | 29 +++++++++++++++++++++++++---- setup.py | 2 +- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 1d7c87f..599015f 100644 --- a/Makefile +++ b/Makefile @@ -3,20 +3,41 @@ # $URL$ # -PYTHON=`which python` +PYTHON=$(shell which python ) DESTDIR=/var/tmp/testinst -PROJECT=fbrehm-libs +PROJECT=$(shell cat setup.py | grep 'name[ ]*=' | sed -e "s/.*=[ ]*'//" -e "s/'.*//" ) BUILDIR=$(CURDIR)/debian/python-$(PROJECT) -VERSION=0.1.1 +VERSION=$(shell cat setup.py | grep version | sed -e "s/.*=[ ]*'//" -e "s/'.*//" ) +WWW_DOCROOT=/var/www/localhost/htdocs/projects/$(PROJECT) +ARCHIVE=$(PROJECT)-$(VERSION).tar.gz all: @echo "make source - Create source package" @echo "make install - Install on local system" - @echo "make buildrpm - Generate a rpm package" @echo "make builddeb - Generate a deb package" @echo "make clean - Get rid of scratch and byte files" source: $(PYTHON) setup.py sdist $(COMPILE) + @echo "Archive: '$(ARCHIVE)'" + cd dist && md5sum $(ARCHIVE) >$(ARCHIVE).md5 && sha1sum $(ARCHIVE) >$(ARCHIVE).sha1 && cd .. + mkdir -p $(WWW_DOCROOT) + cp -pv dist/$(ARCHIVE)* $(WWW_DOCROOT) +install: + $(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE) + +builddeb: + # build the source package in the parent directory + # then rename it to project_version.orig.tar.gz + $(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../ --prune + mv -v ../$(PROJECT)-$(VERSION).tar.gz ../python-$(PROJECT)_$(VERSION).orig.tar.gz + # build the package + #dpkg-buildpackage -i -I -rfakeroot + +clean: + $(PYTHON) setup.py clean + $(MAKE) -f $(CURDIR)/debian/rules clean + rm -rf build/ MANIFEST + find . -name '*.pyc' -delete diff --git a/setup.py b/setup.py index 959acc0..f98b2dd 100755 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ made by Frank Brehm. ''' setup( name = 'fbrehm-libs', - version = '0.1', + version = '0.2', description = 'collection of common python modules by Frank Brehm', long_description = long_description, author = 'Frank Brehm', -- 2.39.5