diff --git a/confluent_xcat/MANIFEST.in b/confluent_xcat/MANIFEST.in new file mode 100644 index 00000000..67b65344 --- /dev/null +++ b/confluent_xcat/MANIFEST.in @@ -0,0 +1 @@ +include confluent/plugins/console/* diff --git a/confluent_xcat/Makefile b/confluent_xcat/Makefile new file mode 100644 index 00000000..737ddd04 --- /dev/null +++ b/confluent_xcat/Makefile @@ -0,0 +1,32 @@ + +PKGNAME=confluent_xcat +VERNUM=`cat VERSION` + +all: clean prepare confluent_xcat + +prepare: + @echo [${PKGNAME}] preparing... + mkdir -p rpmbuild/BUILD + mkdir -p rpmbuild/BUILDROOT + mkdir -p rpmbuild/RPMS + mkdir -p rpmbuild/SOURCES + mkdir -p rpmbuild/SPECS + mkdir -p rpmbuild/SRPMS + + +confluent_xcat: + @echo [${PKGNAME}] building... + sed -e "s/#VERSION#/${VERNUM}/" setup.py.tmpl > setup.py + python setup.py sdist > /dev/null 2>&1 + cp dist/*.tar.gz rpmbuild/SOURCES + sed -e "s/#VERSION#/${VERNUM}/" ${PKGNAME}.spec.tmpl > rpmbuild/SPECS/${PKGNAME}.spec + rpmbuild -ba rpmbuild/SPECS/${PKGNAME}.spec + +clean: + @echo [${PKGNAME}] cleaning... + rm -rf rpmbuild + rm -f setup.py + rm -rf ${PKGNAME}.egg-info + rm -rf dist + + diff --git a/confluent_xcat/README.txt b/confluent_xcat/README.txt new file mode 100644 index 00000000..d34e2f87 --- /dev/null +++ b/confluent_xcat/README.txt @@ -0,0 +1 @@ +xCAT integration with confluent systems management server diff --git a/confluent_xcat/VERSION b/confluent_xcat/VERSION new file mode 100644 index 00000000..d3827e75 --- /dev/null +++ b/confluent_xcat/VERSION @@ -0,0 +1 @@ +1.0 diff --git a/confluent_xcat/buildrpm b/confluent_xcat/buildrpm new file mode 120000 index 00000000..e3ac8f68 --- /dev/null +++ b/confluent_xcat/buildrpm @@ -0,0 +1 @@ +../confluent_server/buildrpm \ No newline at end of file diff --git a/confluent_xcat/confluent/plugins/console/xcathmc.sh b/confluent_xcat/confluent/plugins/console/xcathmc.sh new file mode 100755 index 00000000..5b3a3cc6 --- /dev/null +++ b/confluent_xcat/confluent/plugins/console/xcathmc.sh @@ -0,0 +1,2 @@ +#!/bin/bash +exec /opt/xcat/share/xcat/cons/hmc $CONFLUENT_NODE diff --git a/confluent_xcat/confluent_xcat.spec.tmpl b/confluent_xcat/confluent_xcat.spec.tmpl new file mode 100644 index 00000000..940a20b0 --- /dev/null +++ b/confluent_xcat/confluent_xcat.spec.tmpl @@ -0,0 +1,41 @@ +%define name confluent_xcat +%define version #VERSION# +%define release 1 + +Summary: xCAT integration with confluent systems management server +Name: %{name} +Version: %{version} +Release: %{release} +Source0: %{name}-%{version}.tar.gz +License: Apache2 +Group: Development/Libraries +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +Prefix: %{_prefix} +BuildArch: noarch +Requires: confluent_server +Vendor: Victor Hu +Url: http://xcat.sf.net/ + +%description +xCAT integration with confluent system management server + +%prep +%setup -n %{name}-%{version} -n %{name}-%{version} + +%build +python setup.py build + +%install +python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES.bare --install-purelib=/opt/xcat/lib/python --install-scripts=/opt/xcat/bin +for file in $(grep xcat/__init__.py INSTALLED_FILES.bare); do + rm $RPM_BUILD_ROOT/$file +done +grep -v xcat/__init__.py INSTALLED_FILES.bare > INSTALLED_FILES +cat INSTALLED_FILES + + +%clean +rm -rf $RPM_BUILD_ROOT + +%files -f INSTALLED_FILES +%defattr(-,root,root) diff --git a/confluent_xcat/makesetup b/confluent_xcat/makesetup new file mode 120000 index 00000000..4930d195 --- /dev/null +++ b/confluent_xcat/makesetup @@ -0,0 +1 @@ +../confluent_server/makesetup \ No newline at end of file diff --git a/confluent_xcat/requirements.txt b/confluent_xcat/requirements.txt new file mode 100644 index 00000000..b761cf7b --- /dev/null +++ b/confluent_xcat/requirements.txt @@ -0,0 +1 @@ +confluent_server>=0.1 diff --git a/confluent_xcat/setup.cfg b/confluent_xcat/setup.cfg new file mode 100644 index 00000000..9010fbb0 --- /dev/null +++ b/confluent_xcat/setup.cfg @@ -0,0 +1,18 @@ +[metadata] +name = confluent_xcat +summary = xCAT integration with confluent systems management server +description-file = + README.txt +author = Victor Hu +author-email = vhu@us.ibm.com +home-page = http://xcat.sf.net/ +classifier = + Intended Audience :: Information Technology + Intended Audience :: System Administrators + License :: OSI Approved :: Apache Software License + Operating System :: POSIX :: Linux + Programming Language :: Python :: 2.6 + Programming Language :: Python :: 2.7 + +[files] +packages = diff --git a/confluent_xcat/setup.py.tmpl b/confluent_xcat/setup.py.tmpl new file mode 100644 index 00000000..98feda74 --- /dev/null +++ b/confluent_xcat/setup.py.tmpl @@ -0,0 +1,14 @@ +from setuptools import setup +import os + +setup( + name='confluent_xcat', + version='#VERSION#', + author='Victor Hu', + author_email='vhu@us.ibm.com', + url='http://xcat.sf.net/', + description='xCAT integration with confluent systems management server', + #packages=['xcat'], + install_requires=['confluent_server > 1.0.0'], + data_files=[('/opt/confluent/lib/python/confluent/plugins/console/', ['confluent/plugins/console/xcathmc.sh'])], +)