[node-patches] Change in ovirt-node[master]: spec: Basic specfile added

fabiand at fedoraproject.org fabiand at fedoraproject.org
Tue Dec 11 20:09:35 UTC 2012


Fabian Deutsch has uploaded a new change for review.

Change subject: spec: Basic specfile added
......................................................................

spec: Basic specfile added

Includes some changes to the "buildsystem"

Change-Id: I084c29e3c69f1369749847f8edfd16e773886070
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
A scripts/tui/Makefile
R scripts/tui/bin/ovirt-config-setup-molch
A scripts/tui/ovirt-node-molch-plugin.spec
R scripts/tui/setup.py
M scripts/tui/src/Makefile
5 files changed, 113 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/93/9893/1

diff --git a/scripts/tui/Makefile b/scripts/tui/Makefile
new file mode 100644
index 0000000..d58da28
--- /dev/null
+++ b/scripts/tui/Makefile
@@ -0,0 +1,48 @@
+
+
+NAME=ovirt-node-molch-plugin
+
+HASH=$(shell git describe --always)
+DATE=$(shell date '+%Y%m%d%H%M%S')
+VERSION=git$(HASH)
+
+DISTARCHIVE=$(NAME)-$(VERSION).tar.gz
+
+ifndef python
+        python := "python"
+endif
+
+
+.PHONY: rpm scm_hash.txt
+
+
+all:
+	@echo targets: rpm, build, dist, install
+
+
+rpm: clean dist check
+	rpmbuild -ta dist/$(DISTARCHIVE)
+
+scm_hash.txt:
+	echo "$(HASH)" > scm_hash.txt
+
+check: scm_hash.txt
+	rpmlint -v *.spec
+
+dist: clean-dist scm_hash.txt
+	${python} setup.py sdist --format=tar
+	tar rvf dist/*.tar scm_hash.txt *.spec
+	gzip dist/*.tar
+	cd dist ; ln -s *.tar.gz $(DISTARCHIVE)
+
+build:
+	${python} setup.py build
+
+install:
+	${python} setup.py install --prefix=$(prefix)
+
+clean: clean-dist
+	-rm -f *~ scm_hash.txt
+
+clean-dist:
+	-rm -f dist/*
diff --git a/scripts/tui/src/app b/scripts/tui/bin/ovirt-config-setup-molch
similarity index 100%
rename from scripts/tui/src/app
rename to scripts/tui/bin/ovirt-config-setup-molch
diff --git a/scripts/tui/ovirt-node-molch-plugin.spec b/scripts/tui/ovirt-node-molch-plugin.spec
new file mode 100644
index 0000000..3c0334f
--- /dev/null
+++ b/scripts/tui/ovirt-node-molch-plugin.spec
@@ -0,0 +1,56 @@
+%if 0%{?rhel} && 0%{?rhel} <= 5
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+%endif
+%global date    %(date '+%Y%m%d%H%M%%S')
+%global hash    %(cat scm_hash.txt)
+%define upstream_name ovirt-node-molch
+
+Name:           %{upstream_name}-plugin
+Version:        0.0.1
+Release:        1.git%{hash}%{?dist}
+Summary:        oVirt Node plugin for an alternate config TUI
+
+License:        GPLv2+
+URL:            https://www.gitorious.org/ovirt/ovirt-node-config-molch
+Source0:        dist/%{name}-git%{hash}.tar.gz
+
+BuildArch:      noarch
+
+BuildRequires:  python2-devel
+Requires:       python-urwid
+
+
+%description
+An alternate configuration TUI based on python-urwid supporting more
+features.
+
+
+%prep
+%setup -q -n %{upstream_name}-%{version}
+
+
+%build
+# Nothing
+
+
+%install
+%makeinstall python=%{__python} lib=%{python_sitelib}
+# Remove some extra data
+rm -rf %{buildroot}/usr/extra
+
+%check
+# Nothing, yet
+
+
+%files
+%doc README
+%{python_sitelib}/ovirt_node_molch*.egg-info
+%{python_sitelib}/ovirt/__init__.*
+%{python_sitelib}/ovirt/node/*
+%{_bindir}/ovirt-config-setup-molch
+
+
+%changelog
+* Oct 09 2012 Fabian Deutsch <fabiand at fedoraproject.org> - 0.0.1-1
+- Initial
diff --git a/scripts/tui/src/setup.py b/scripts/tui/setup.py
similarity index 71%
rename from scripts/tui/src/setup.py
rename to scripts/tui/setup.py
index 742e7b9..8cf8659 100644
--- a/scripts/tui/src/setup.py
+++ b/scripts/tui/setup.py
@@ -2,7 +2,6 @@
 
 from distutils.core import setup
 
-# bump version
 setup(name='ovirt-node-molch',
     version='0.0.1',
     description='oVirt Node COnfiguration TUI',
@@ -10,11 +9,15 @@
     author_email='fabiand at fedoraproject.org',
     url='http://example.com',
     license="GPLv2+",
+    scripts=['bin/ovirt-config-setup-molch'],
+    package_dir = {'': 'src'},
     packages=[
         'ovirt',
         'ovirt.node',
         'ovirt.node.ui',
         'ovirt.node.utils',
         'ovirt.node.plugins',
-        ]
+        ],
+   data_files=[('extra', ['scm_hash.txt',
+                          'Makefile'])]
 )
diff --git a/scripts/tui/src/Makefile b/scripts/tui/src/Makefile
index 8f9b3c6..1db50af 100644
--- a/scripts/tui/src/Makefile
+++ b/scripts/tui/src/Makefile
@@ -3,26 +3,11 @@
 XMLSOURCES=$(shell find . -name \*.xml -or -name \*.xsl)
 CLEANFILES=$(shell find . -name \*.pyc -o -name \*.pyo -o -name \*~ -o -name MANIFEST)
 
-ifndef python
-python := "python"
-endif
 
-all:
-	@echo targets: dist, install
+check: doctests
+	@echo -e "---\n Passed.\n---"
 
-manifest:
-	find . -name \*.py > MANIFEST
-
-dist: manifest
-	${python} setup.py sdist
-
-build:
-	:
-
-install: manifest
-	${python} setup.py install ${root} ${lib}
-
-check-local: doctests pep8 pyflakes
+check-local: check pep8 pyflakes
 	@echo -e "---\n Passed.\n---"
 
 doctests:
@@ -55,5 +40,4 @@
 	done
 
 clean:
-	echo $(CLEANFILES)
-	rm $(CLEANFILES)
+	-rm $(CLEANFILES)


--
To view, visit http://gerrit.ovirt.org/9893
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I084c29e3c69f1369749847f8edfd16e773886070
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list