mirror of https://github.com/apache/cloudstack.git
full opensource -- enable rpm build
This commit is contained in:
parent
ca7fb65ca2
commit
fd18b7f870
142
cloud.spec
142
cloud.spec
|
|
@ -36,7 +36,7 @@ BuildRequires: glibc-devel
|
|||
BuildRequires: /usr/bin/mkisofs
|
||||
BuildRequires: MySQL-python
|
||||
|
||||
%global _premium %(tar jtvmf %{SOURCE0} '*/cloudstack-proprietary/' --occurrence=1 2>/dev/null | wc -l)
|
||||
#%global _premium %(tar jtvmf %{SOURCE0} '*/cloudstack-proprietary/' --occurrence=1 2>/dev/null | wc -l)
|
||||
|
||||
%description
|
||||
This is the Cloud.com Stack, a highly-scalable elastic, open source,
|
||||
|
|
@ -300,33 +300,33 @@ Group: System Environment/Libraries
|
|||
The Cloud.com command line tools contain a few Python modules that can call cloudStack APIs.
|
||||
|
||||
|
||||
%if %{_premium}
|
||||
|
||||
%package test
|
||||
Summary: Cloud.com test suite
|
||||
Requires: java >= 1.6.0
|
||||
Requires: %{name}-utils = %{version}, %{name}-deps = %{version}, wget
|
||||
Group: System Environment/Libraries
|
||||
Obsoletes: vmops-test < %{version}-%{release}
|
||||
%description test
|
||||
The Cloud.com test package contains a suite of automated tests
|
||||
that the very much appreciated QA team at Cloud.com constantly
|
||||
uses to help increase the quality of the Cloud.com Stack.
|
||||
|
||||
%package usage
|
||||
Summary: Cloud.com usage monitor
|
||||
Obsoletes: vmops-usage < %{version}-%{release}
|
||||
Requires: java >= 1.6.0
|
||||
Requires: %{name}-utils = %{version}, %{name}-core = %{version}, %{name}-deps = %{version}, %{name}-server = %{version}, %{name}-premium = %{version}, %{name}-daemonize = %{version}
|
||||
Requires: %{name}-setup = %{version}
|
||||
Requires: %{name}-client = %{version}
|
||||
License: CSL 1.1
|
||||
Group: System Environment/Libraries
|
||||
%description usage
|
||||
The Cloud.com usage monitor provides usage accounting across the entire cloud for
|
||||
cloud operators to charge based on usage parameters.
|
||||
|
||||
%endif
|
||||
#%if %{_premium}
|
||||
#
|
||||
#%package test
|
||||
#Summary: Cloud.com test suite
|
||||
#Requires: java >= 1.6.0
|
||||
#Requires: %{name}-utils = %{version}, %{name}-deps = %{version}, wget
|
||||
#Group: System Environment/Libraries
|
||||
#Obsoletes: vmops-test < %{version}-%{release}
|
||||
#%description test
|
||||
#The Cloud.com test package contains a suite of automated tests
|
||||
#that the very much appreciated QA team at Cloud.com constantly
|
||||
#uses to help increase the quality of the Cloud.com Stack.
|
||||
#
|
||||
#%package usage
|
||||
#Summary: Cloud.com usage monitor
|
||||
#Obsoletes: vmops-usage < %{version}-%{release}
|
||||
#Requires: java >= 1.6.0
|
||||
#Requires: %{name}-utils = %{version}, %{name}-core = %{version}, %{name}-deps = %{version}, %{name}-server = %{version}, %{name}-premium = %{version}, %{name}-daemonize = %{version}
|
||||
#Requires: %{name}-setup = %{version}
|
||||
#Requires: %{name}-client = %{version}
|
||||
#License: CSL 1.1
|
||||
#Group: System Environment/Libraries
|
||||
#%description usage
|
||||
#The Cloud.com usage monitor provides usage accounting across the entire cloud for
|
||||
#cloud operators to charge based on usage parameters.
|
||||
#
|
||||
#%endif
|
||||
|
||||
%prep
|
||||
|
||||
|
|
@ -390,28 +390,28 @@ fi
|
|||
|
||||
|
||||
|
||||
%if %{_premium}
|
||||
|
||||
%preun usage
|
||||
if [ "$1" == "0" ] ; then
|
||||
/sbin/chkconfig --del %{name}-usage > /dev/null 2>&1 || true
|
||||
/sbin/service %{name}-usage stop > /dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
%pre usage
|
||||
id %{name} > /dev/null 2>&1 || /usr/sbin/useradd -M -c "Cloud.com unprivileged user" \
|
||||
-r -s /bin/sh -d %{_sharedstatedir}/%{name}/management %{name}|| true
|
||||
# user harcoded here, also hardcoded on wscript
|
||||
|
||||
%post usage
|
||||
if [ "$1" == "1" ] ; then
|
||||
/sbin/chkconfig --add %{name}-usage > /dev/null 2>&1 || true
|
||||
/sbin/chkconfig --level 345 %{name}-usage on > /dev/null 2>&1 || true
|
||||
else
|
||||
/sbin/service %{name}-usage condrestart >/dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
%endif
|
||||
#%if %{_premium}
|
||||
#
|
||||
#%preun usage
|
||||
#if [ "$1" == "0" ] ; then
|
||||
# /sbin/chkconfig --del %{name}-usage > /dev/null 2>&1 || true
|
||||
# /sbin/service %{name}-usage stop > /dev/null 2>&1 || true
|
||||
#fi
|
||||
#
|
||||
#%pre usage
|
||||
#id %{name} > /dev/null 2>&1 || /usr/sbin/useradd -M -c "Cloud.com unprivileged user" \
|
||||
# -r -s /bin/sh -d %{_sharedstatedir}/%{name}/management %{name}|| true
|
||||
## user harcoded here, also hardcoded on wscript
|
||||
#
|
||||
#%post usage
|
||||
#if [ "$1" == "1" ] ; then
|
||||
# /sbin/chkconfig --add %{name}-usage > /dev/null 2>&1 || true
|
||||
# /sbin/chkconfig --level 345 %{name}-usage on > /dev/null 2>&1 || true
|
||||
#else
|
||||
# /sbin/service %{name}-usage condrestart >/dev/null 2>&1 || true
|
||||
#fi
|
||||
#
|
||||
#%endif
|
||||
|
||||
%pre agent-scripts
|
||||
id %{name} > /dev/null 2>&1 || /usr/sbin/useradd -M -c "Cloud.com unprivileged user" \
|
||||
|
|
@ -597,27 +597,27 @@ fi
|
|||
%files baremetal-agent
|
||||
%attr(0755,root,root) %{_bindir}/cloud-setup-baremetal
|
||||
|
||||
%if %{_premium}
|
||||
|
||||
%files test
|
||||
%defattr(0644,root,root,0755)
|
||||
%attr(0755,root,root) %{_bindir}/%{name}-run-test
|
||||
%{_javadir}/%{name}-test.jar
|
||||
%{_sharedstatedir}/%{name}/test/*
|
||||
%{_libdir}/%{name}/test/*
|
||||
%{_sysconfdir}/%{name}/test/*
|
||||
|
||||
%files usage
|
||||
%defattr(0644,root,root,0775)
|
||||
%{_javadir}/%{name}-usage.jar
|
||||
%attr(0755,root,root) %{_initrddir}/%{name}-usage
|
||||
%attr(0755,root,root) %{_libexecdir}/usage-runner
|
||||
%dir %attr(0770,root,%{name}) %{_localstatedir}/log/%{name}/usage
|
||||
%{_sysconfdir}/%{name}/usage/usage-components.xml
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/usage/log4j-%{name}_usage.xml
|
||||
%config(noreplace) %attr(0640,root,%{name}) %{_sysconfdir}/%{name}/usage/db.properties
|
||||
|
||||
%endif
|
||||
#%if %{_premium}
|
||||
#
|
||||
#%files test
|
||||
#%defattr(0644,root,root,0755)
|
||||
#%attr(0755,root,root) %{_bindir}/%{name}-run-test
|
||||
#%{_javadir}/%{name}-test.jar
|
||||
#%{_sharedstatedir}/%{name}/test/*
|
||||
#%{_libdir}/%{name}/test/*
|
||||
#%{_sysconfdir}/%{name}/test/*
|
||||
#
|
||||
#%files usage
|
||||
#%defattr(0644,root,root,0775)
|
||||
#%{_javadir}/%{name}-usage.jar
|
||||
#%attr(0755,root,root) %{_initrddir}/%{name}-usage
|
||||
#%attr(0755,root,root) %{_libexecdir}/usage-runner
|
||||
#%dir %attr(0770,root,%{name}) %{_localstatedir}/log/%{name}/usage
|
||||
#%{_sysconfdir}/%{name}/usage/usage-components.xml
|
||||
#%config(noreplace) %{_sysconfdir}/%{name}/usage/log4j-%{name}_usage.xml
|
||||
#%config(noreplace) %attr(0640,root,%{name}) %{_sysconfdir}/%{name}/usage/db.properties
|
||||
#
|
||||
#%endif
|
||||
|
||||
%changelog
|
||||
* Mon May 3 2010 Manuel Amador (Rudd-O) <manuel@vmops.com> 1.9.12
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ except ImportError:
|
|||
# Global variables setup
|
||||
sourcedir = bld.srcnode.abspath()
|
||||
builddir = bld.path.abspath(bld.env)
|
||||
buildpremium = _exists(_join(sourcedir,"cloudstack-proprietary"))
|
||||
#buildpremium = _exists(_join(sourcedir,"cloudstack-proprietary"))
|
||||
buildpremium = False
|
||||
filelist = bld.path.ant_glob
|
||||
distdir = Utils.relpath(_join(sourcedir,"dist"))
|
||||
targetdir = Utils.relpath(_join(sourcedir,"target"))
|
||||
|
|
@ -220,9 +221,12 @@ def build_scripts ():
|
|||
bld.substitute('**',"${AGENTLIBDIR}/scripts",chmod=0755, cwd=start_path)
|
||||
|
||||
def build_bin_exec_dirs ():
|
||||
bld.install_files_filtered("${LIBEXECDIR}","*/libexec/* cloudstack-proprietary/*/libexec/*",chmod=0755)
|
||||
bld.install_files_filtered("${BINDIR}","*/bindir/* cloudstack-proprietary/*/bindir/*",chmod=0755)
|
||||
bld.install_files_filtered("${SBINDIR}","*/sbindir/* cloudstack-proprietary/*/sbindir/*",chmod=0755)
|
||||
#bld.install_files_filtered("${LIBEXECDIR}","*/libexec/* cloudstack-proprietary/*/libexec/*",chmod=0755)
|
||||
#bld.install_files_filtered("${BINDIR}","*/bindir/* cloudstack-proprietary/*/bindir/*",chmod=0755)
|
||||
#bld.install_files_filtered("${SBINDIR}","*/sbindir/* cloudstack-proprietary/*/sbindir/*",chmod=0755)
|
||||
bld.install_files_filtered("${LIBEXECDIR}","*/libexec/*",chmod=0755)
|
||||
bld.install_files_filtered("${BINDIR}","*/bindir/*",chmod=0755)
|
||||
bld.install_files_filtered("${SBINDIR}","*/sbindir/*",chmod=0755)
|
||||
|
||||
def build_server_client ():
|
||||
start_path = bld.path.find_dir("client/WEB-INF")
|
||||
|
|
@ -261,7 +265,8 @@ def build_ui ():
|
|||
def build_conf_files ():
|
||||
# apply distro-specific config on top of the 'all' generic cloud-management config
|
||||
globspec = _join("*","distro",bld.env.DISTRO.lower(),"*") # matches premium/distro/centos/SYSCONFDIR
|
||||
distrospecificdirs=_glob(globspec) + _glob(_join("cloudstack-proprietary",globspec))
|
||||
#distrospecificdirs=_glob(globspec) + _glob(_join("cloudstack-proprietary",globspec))
|
||||
distrospecificdirs=_glob(globspec)
|
||||
for dsdir in distrospecificdirs:
|
||||
start_path = bld.srcnode.find_dir(dsdir)
|
||||
subpath,varname = _split(dsdir)
|
||||
|
|
@ -318,8 +323,7 @@ def build_xml_api_description ():
|
|||
str = 'target/jar/cloud-%s.jar' % i
|
||||
sources.append (str)
|
||||
sources.append ("client/tomcatconf/commands.properties.in")
|
||||
if buildpremium:
|
||||
sources.append("client/tomcatconf/commands-ext.properties.in")
|
||||
sources.append("client/tomcatconf/commands-ext.properties.in")
|
||||
|
||||
buildproducts = []
|
||||
for i in sources:
|
||||
|
|
@ -360,7 +364,7 @@ def build_ovm():
|
|||
build_utils_docs ()
|
||||
build_jars ()
|
||||
build_python_and_daemonize ()
|
||||
build_premium ()
|
||||
#build_premium ()
|
||||
#build_thirdparty_dir()
|
||||
build_dependences ()
|
||||
build_console_proxy ()
|
||||
|
|
|
|||
Loading…
Reference in New Issue