summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-12-18 15:40:31 -0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2007-12-18 15:40:31 -0200
commit8d6ad996f5d60d569532cdba4febb19c69bdf488 (patch)
treebaa34d8b3fe767f85b06ee7eae5a7b44a14ff43a /Makefile
downloadpython-ethtool-8d6ad996f5d60d569532cdba4febb19c69bdf488.tar.gz
python-ethtool-8d6ad996f5d60d569532cdba4febb19c69bdf488.tar.xz
python-ethtool-8d6ad996f5d60d569532cdba4febb19c69bdf488.zip
[PYTHON-ETHTOOL]: Create repository
From code in fedora's rhpl. Code indented, offload methods (tso, etc) added. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..2f4c484
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,41 @@
+PKGNAME = python-ethtool
+VERSION = $(shell grep version setup.py | cut -f 2 -d \' )
+TAG = $(PKGNAME)-$(VERSION)
+GITURL = git://git.kernel.org/pub/scm/linux/kernel/git/acme/$(PKGNAME).git
+
+all:
+
+clean:
+ -rm *.tar.gz python-ethtool/*.pyc
+ -rm -r dist MANIFEST
+ python setup.py -q clean --all
+
+install: all
+ python setup.py install --root=$(DESTDIR)
+
+tag:
+ git tag $(TAG)
+
+push:
+ @git tag -l | grep -q $(TAG) && \
+ git push origin $(TAG) || \
+ echo Not tagged.
+
+archive:
+ @rm -rf /tmp/${PKGNAME}-$(VERSION) /tmp/${PKGNAME}
+ @cd /tmp; git clone -q $(GITURL) $(PKGNAME)
+ @mv /tmp/${PKGNAME} /tmp/${PKGNAME}-$(VERSION)
+ @cd /tmp/${PKGNAME}-$(VERSION) ; git checkout $(TAG)
+ @cd /tmp/${PKGNAME}-$(VERSION) ; python setup.py -q sdist
+ @cp /tmp/${PKGNAME}-$(VERSION)/dist/${PKGNAME}-$(VERSION).tar.gz .
+ @rm -rf /tmp/${PKGNAME}-$(VERSION)
+ @echo "The archive is in ${PKGNAME}-$(VERSION).tar.gz"
+
+local:
+ @rm -rf ${PKGNAME}-$(VERSION).tar.gz
+ @rm -rf /tmp/${PKGNAME}-$(VERSION) /tmp/${PKGNAME}
+ @dir=$$PWD; cp -a $$dir /tmp/${PKGNAME}-$(VERSION)
+ @cd /tmp/${PKGNAME}-$(VERSION) ; python setup.py -q sdist
+ @cp /tmp/${PKGNAME}-$(VERSION)/dist/${PKGNAME}-$(VERSION).tar.gz .
+ @rm -rf /tmp/${PKGNAME}-$(VERSION)
+ @echo "The archive is in ${PKGNAME}-$(VERSION).tar.gz"