Search
j0ke.net Open Build Service
>
Projects
>
virtualization
:
Cloud
:
oVirt
:
3.3.1
>
ovirt-host-deploy
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 2
[-]
[+]
Added
ovirt-host-deploy-SLE_11_SP3.spec
@@ -0,0 +1,265 @@ +# +# ovirt-host-deploy -- ovirt host deployer +# Copyright (C) 2012-2013 Red Hat, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# + +%global package_version 1.1.2 +%global package_maven_version 1.1.0 +%global ovirt_host_deploy_root %{_datadir}/%{name}/interface-3 + +%if 0%{?rhel:1} +%global maven2brewrepodir %{_javadir}/repository.jboss.com/maven2-brew/dummy +%endif + +# rhel does not support complex boolean statements +%if 0%{?fedora:1} +%if %{fedora} >= 19 +%global fedora_19_maven 1 +%endif +%endif + +Summary: oVirt host deploy tool +Name: ovirt-host-deploy +Version: 1.1.2 +Release: 1%{?release_suffix}%{?dist} +License: LGPLv2+ +URL: http://www.ovirt.org +Source: http://resources.ovirt.org/releases/3.3/src/%{name}-%{package_version}.tar.gz +Group: Applications/System + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +%if 0%{!?suse_version} +BuildArch: noarch +%endif + +Requires: python +Requires: otopi +BuildRequires: gettext +BuildRequires: otopi-devel +BuildRequires: python-devel +BuildRequires: java-devel + +%if 0%{?fedora:1} +BuildRequires: maven-compiler-plugin +BuildRequires: maven-enforcer-plugin +BuildRequires: maven-install-plugin +BuildRequires: maven-jar-plugin +BuildRequires: maven-javadoc-plugin +BuildRequires: maven-source-plugin + +%if 0%{?fedora_19_maven:1} +BuildRequires: maven-local +%else +BuildRequires: maven +BuildRequires: jpackage-utils +%endif + +%endif + +%description +Host deployment tool for oVirt project. + +%package java +Summary: %{name} java support +Requires: %{name} = %{version}-%{release} +Requires: java +Requires: otopi-java + +%if !0%{?fedora_19_maven:1} +Requires: jpackage-utils +%endif + +%description java +java libraries. + +%if 0%{?fedora:1} +%package javadoc +Summary: Javadocs for %{name} +Group: Documentation + +%description javadoc +This package contains the API documentation for %{name}. +%endif + +%package offline +Summary: ovirt-host-deploy offline dependencies +Requires: dmidecode +Requires: iproute +Requires: libselinux-python +Requires: m2crypto +Requires: python +Requires: tuned +Requires: util-linux +Requires: vdsm +Requires: vdsm-cli +%description offline +meta package for offline setup + +%if 0%{?rhel:1} +%package repolib +Summary: %{name} maven repo +%description repolib +%{name} maven repo +%endif + +%prep +%setup -q -n %{name}-%{package_version} + +%build +%if 0%{?fedora:1} +%global conf --disable-java-sdk-compile +%endif +%configure \ + --docdir="%{_docdir}/%{name}-%{version}" \ + --disable-python-syntax-check \ + --enable-java-sdk \ + --with-local-version="%{name}-%{version}-%{release}" \ + %{?conf} +make %{?_smp_mflags} + +%if 0%{?fedora:1} +cd src/java +%if 0%{?fedora_19_maven:1} +%mvn_build +%else +mvn-rpmbuild install javadoc:aggregate +%endif +cd ../.. +%endif + +%install +rm -rf "%{buildroot}" +make %{?_smp_mflags} install DESTDIR="%{buildroot}" + +%if 0%{?fedora:1} + +%if 0%{?fedora_19_maven:1} +cd src/java +%mvn_install +cd ../.. +%else +install -d -m 755 "%{buildroot}%{_javadir}/%{name}" +install -d -m 755 "%{buildroot}%{_mavenpomdir}" +install -pm 644 src/java/target/%{name}-%{package_maven_version}.jar %{buildroot}%{_javadir}/%{name} +ln -s "%{name}-%{package_maven_version}.jar" "%{buildroot}%{_javadir}/%{name}/%{name}.jar" +install -pm 644 "src/java/pom.xml" "%{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}.pom" +%add_maven_depmap "JPP.%{name}-%{name}.pom" "%{name}/%{name}.jar" +mkdir -p "%{buildroot}%{_javadocdir}/%{name}" +cp -rp src/java/target/apidocs/* "%{buildroot}%{_javadocdir}/%{name}" +%endif + +%else +install -d "%{buildroot}%{_javadir}/%{name}" +install target/%{name}-%{package_maven_version}.jar %{buildroot}%{_javadir}/%{name} +ln -s %{name}-%{package_maven_version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar +%endif + +install -d -m 755 "%{buildroot}%{_sysconfdir}/%{name}.conf.d" +install -pm 644 conf.d/50-offline-packager.conf "%{buildroot}%{_sysconfdir}/%{name}.conf.d" + +%if 0%{?rhel:1} +install -d "%{buildroot}%{maven2brewrepodir}" +cp "%{buildroot}%{_javadir}/%{name}/%{name}.jar" "%{buildroot}%{maven2brewrepodir}/%{name}-%{package_maven_version}.jar" +cp src/java/pom.xml "%{buildroot}%{maven2brewrepodir}/%{name}-%{package_maven_version}.pom" +%endif + +%if 0%{?fedora:1} +%if !0%{?fedora_19_maven:1} +%post java +%update_maven_depmap +%postun java +%update_maven_depmap +%endif +%endif + +%files +%defattr(-,root,root) +%dir %{_datadir}/%{name} +%dir %{_datadir}/%{name}/plugins +%dir %{_sysconfdir}/%{name}.conf.d +%dir %{ovirt_host_deploy_root} +%dir %{ovirt_host_deploy_root}/pythonlib +%doc AUTHORS +%doc COPYING +%doc README +%doc README.environment