cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject [2/2] git commit: updated refs/heads/4.2 to 649d7d7
Date Mon, 29 Jul 2013 20:39:57 GMT
Supporting packaging for RHEL 5 and 6.2; updated macros

Signed-off-by: Edison Su <sudison@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/649d7d70
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/649d7d70
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/649d7d70

Branch: refs/heads/4.2
Commit: 649d7d703ce043db1c3fee8cf284679ac0894373
Parents: 97c9a96
Author: rayeesn <rayeesn@citrix.com>
Authored: Mon Jul 29 13:37:27 2013 -0700
Committer: Edison Su <sudison@gmail.com>
Committed: Mon Jul 29 13:39:21 2013 -0700

----------------------------------------------------------------------
 packaging/centos63/cloud.spec | 32 ++++++++++++++++++--------------
 packaging/centos63/package.sh | 10 ++++++++--
 2 files changed, 26 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/649d7d70/packaging/centos63/cloud.spec
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec
index 66f7406..0a6327f 100644
--- a/packaging/centos63/cloud.spec
+++ b/packaging/centos63/cloud.spec
@@ -31,6 +31,9 @@ Release:   %{_rel}%{dist}
 %define _maventag %{_ver}
 Release:   %{_rel}%{dist}
 %endif
+
+%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import
get_python_lib; print(get_python_lib(1))")}
+
 Version:   %{_ver}
 License:   ASL 2.0
 Vendor:    Apache CloudStack <dev@cloudstack.apache.org>
@@ -195,14 +198,15 @@ mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
 # Common
 mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/scripts
 mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/vms
-mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/python2.6/site-packages/
+mkdir -p ${RPM_BUILD_ROOT}%{python_sitearch}/
 cp -r scripts/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/scripts
 install -D services/console-proxy/server/dist/systemvm.iso ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/vms/systemvm.iso
 install -D services/console-proxy/server/dist/systemvm.zip ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/vms/systemvm.zip
-install python/lib/cloud_utils.py ${RPM_BUILD_ROOT}%{_libdir}/python2.6/site-packages/cloud_utils.py
-cp -r python/lib/cloudutils ${RPM_BUILD_ROOT}%{_libdir}/python2.6/site-packages/
-python -m py_compile ${RPM_BUILD_ROOT}%{_libdir}/python2.6/site-packages/cloud_utils.py
-python -m compileall ${RPM_BUILD_ROOT}%{_libdir}/python2.6/site-packages/cloudutils
+install python/lib/cloud_utils.py ${RPM_BUILD_ROOT}%{python_sitearch}/cloud_utils.py
+cp -r python/lib/cloudutils ${RPM_BUILD_ROOT}%{python_sitearch}/
+python -m py_compile ${RPM_BUILD_ROOT}%{python_sitearch}/cloud_utils.py
+python -m compileall ${RPM_BUILD_ROOT}%{python_sitearch}/cloudutils
+ 
 mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/scripts/network/cisco
 cp -r plugins/network-elements/cisco-vnmc/scripts/network/cisco/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/scripts/network/cisco
 
@@ -297,8 +301,8 @@ install -D packaging/centos63/cloud-usage.rc ${RPM_BUILD_ROOT}/%{_sysconfdir}/in
 mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/usage/
 
 # CLI
-cp -r cloud-cli/cloudtool ${RPM_BUILD_ROOT}%{_libdir}/python2.6/site-packages/
-install cloud-cli/cloudapis/cloud.py ${RPM_BUILD_ROOT}%{_libdir}/python2.6/site-packages/cloudapis.py
+cp -r cloud-cli/cloudtool ${RPM_BUILD_ROOT}%{python_sitearch}/
+install cloud-cli/cloudapis/cloud.py ${RPM_BUILD_ROOT}%{python_sitearch}/cloudapis.py
 
 # AWS API
 mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi
@@ -545,14 +549,14 @@ fi
 %{_defaultdocdir}/%{name}-agent-%{version}/NOTICE
 
 %files common
-%dir %attr(0755,root,root) %{_libdir}/python2.6/site-packages/cloudutils
+%dir %attr(0755,root,root) %{python_sitearch}/cloudutils
 %dir %attr(0755,root,root) %{_datadir}/%{name}-common/vms
 %attr(0755,root,root) %{_datadir}/%{name}-common/scripts
 %attr(0644, root, root) %{_datadir}/%{name}-common/vms/systemvm.iso
 %attr(0644, root, root) %{_datadir}/%{name}-common/vms/systemvm.zip
-%attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloud_utils.py
-%attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloud_utils.pyc
-%attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloudutils/*
+%attr(0644,root,root) %{python_sitearch}/cloud_utils.py
+%attr(0644,root,root) %{python_sitearch}/cloud_utils.pyc
+%attr(0644,root,root) %{python_sitearch}/cloudutils/*
 %attr(0644, root, root) %{_datadir}/%{name}-common/lib/jasypt-1.9.0.jar
 %{_defaultdocdir}/%{name}-common-%{version}/LICENSE
 %{_defaultdocdir}/%{name}-common-%{version}/NOTICE
@@ -568,9 +572,9 @@ fi
 %{_defaultdocdir}/%{name}-usage-%{version}/NOTICE
 
 %files cli
-%attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloudapis.py
-%attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloudtool/__init__.py
-%attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloudtool/utils.py
+%attr(0644,root,root) %{python_sitearch}/cloudapis.py
+%attr(0644,root,root) %{python_sitearch}/cloudtool/__init__.py
+%attr(0644,root,root) %{python_sitearch}/cloudtool/utils.py
 %{_defaultdocdir}/%{name}-cli-%{version}/LICENSE
 %{_defaultdocdir}/%{name}-cli-%{version}/NOTICE
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/649d7d70/packaging/centos63/package.sh
----------------------------------------------------------------------
diff --git a/packaging/centos63/package.sh b/packaging/centos63/package.sh
index c466f58..ec56c0f 100755
--- a/packaging/centos63/package.sh
+++ b/packaging/centos63/package.sh
@@ -48,6 +48,9 @@ else
 fi
 
 mkdir -p $RPMDIR/SPECS
+mkdir -p $RPMDIR/BUILD
+mkdir -p $RPMDIR/SRPMS
+mkdir -p $RPMDIR/RPMS
 mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
 
 (cd ../../; tar -c --exclude .git --exclude dist  .  | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
-x )
@@ -55,7 +58,7 @@ mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
 
 cp cloud.spec $RPMDIR/SPECS
 
-(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE")
+(cd $RPMDIR; rpmbuild --define "_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE" -ba SPECS/cloud.spec)
 
 exit
 }
@@ -82,6 +85,9 @@ else
 fi
 
 mkdir -p $RPMDIR/SPECS
+mkdir -p $RPMDIR/BUILD
+mkdir -p $RPMDIR/RPMS
+mkdir -p $RPMDIR/SRPMS
 mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
 
 
@@ -90,7 +96,7 @@ mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
 
 cp cloud.spec $RPMDIR/SPECS
 
-(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE"
"$DEFOSSNOSS")
+(cd $RPMDIR; rpmbuild --define "_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE" "$DEFOSSNOSS"
-bb SPECS/cloud.spec)
 
 exit
 }


Mime
View raw message