%global git_hash git10597f7 Name: openstack-java-sdk Version: 3.0.0 Release: 0.0.%{?git_hash}%{?dist} Summary: OpenStack Java SDK Group: Development/Libraries License: ASL 2.0 URL: https://github.com/woorea/openstack-java-sdk # git archive --prefix=openstack-java-sdk-3.0.0-git${git_hash}/ ${git_hash} \ # | xz > openstack-java-sdk-3.0.0-git${git_hash}.tar.xz Source0: %{name}-%{version}-%{git_hash}.tar.xz BuildArch: noarch BuildRequires: java-devel >= 1:1.7.0 BuildRequires: jpackage-utils >= 0:1.7.3 BuildRequires: maven-local BuildRequires: resteasy BuildRequires: jboss-annotations-1.1-api %description OpenStack client implementation in Java. %package -n openstack-java-javadoc Summary: Java docs for OpenStack Java SDK Group: Documentation %description -n openstack-java-javadoc This package contains the API documentation for the OpenStack Java SDK. %package -n openstack-java-client Summary: OpenStack Java Client Requires: java >= 1:1.7.0 Requires: jpackage-utils Requires: jackson >= 1.9.4 %description -n openstack-java-client This package contains the %{summary}. %package -n openstack-java-resteasy-connector Summary: OpenStack Java RESTEasy Connector Requires: java >= 1:1.7.0 Requires: jpackage-utils Requires: jackson >= 1.9.4 Requires: resteasy >= 2.3.2 Requires: openstack-java-client >= %{version}-%{release} %description -n openstack-java-resteasy-connector This package contains the %{summary}. %package -n openstack-java-ceilometer-client Summary: OpenStack Java Ceilometer Client Requires: java >= 1:1.7.0 Requires: jpackage-utils Requires: jackson >= 1.9.4 Requires: openstack-java-client >= %{version}-%{release} Requires: openstack-ceilometer-model >= %{version}-%{release} %description -n openstack-java-ceilometer-client This package contains the %{summary}. %package -n openstack-java-ceilometer-model Summary: OpenStack Java Ceilometer Model Requires: java >= 1:1.7.0 Requires: jackson >= 1.9.4 Requires: jpackage-utils %description -n openstack-java-ceilometer-model This package contains the %{summary}. %package -n openstack-java-glance-client Summary: OpenStack Java Glance Client Requires: java >= 1:1.7.0 Requires: jpackage-utils Requires: jackson >= 1.9.4 Requires: openstack-java-client >= %{version}-%{release} Requires: openstack-glance-model >= %{version}-%{release} %description -n openstack-java-glance-client This package contains the %{summary}. %package -n openstack-java-glance-model Summary: OpenStack Java Glance Model Requires: java >= 1:1.7.0 Requires: jackson >= 1.9.4 Requires: jpackage-utils %description -n openstack-java-glance-model This package contains the %{summary}. %package -n openstack-java-keystone-client Summary: OpenStack Java Keystone Client Requires: java >= 1:1.7.0 Requires: jpackage-utils Requires: jackson >= 1.9.4 Requires: openstack-java-client >= %{version}-%{release} Requires: openstack-keystone-model >= %{version}-%{release} %description -n openstack-java-keystone-client This package contains the %{summary}. %package -n openstack-java-keystone-model Summary: OpenStack Java Keystone Model Requires: java >= 1:1.7.0 Requires: jackson >= 1.9.4 Requires: jpackage-utils %description -n openstack-java-keystone-model This package contains the %{summary}. %package -n openstack-java-nova-client Summary: OpenStack Java Nova Client Requires: java >= 1:1.7.0 Requires: jpackage-utils Requires: jackson >= 1.9.4 Requires: openstack-java-client >= %{version}-%{release} Requires: openstack-nova-model >= %{version}-%{release} %description -n openstack-java-nova-client This package contains the %{summary}. %package -n openstack-java-nova-model Summary: OpenStack Java Nova Model Requires: java >= 1:1.7.0 Requires: jackson >= 1.9.4 Requires: jpackage-utils %description -n openstack-java-nova-model This package contains the %{summary}. %package -n openstack-java-quantum-client Summary: OpenStack Java Quantum Client Requires: java >= 1:1.7.0 Requires: jpackage-utils Requires: jackson >= 1.9.4 Requires: openstack-java-client >= %{version}-%{release} Requires: openstack-quantum-model >= %{version}-%{release} %description -n openstack-java-quantum-client This package contains the %{summary}. %package -n openstack-java-quantum-model Summary: OpenStack Java Quantum Model Requires: java >= 1:1.7.0 Requires: jackson >= 1.9.4 Requires: jpackage-utils %description -n openstack-java-quantum-model This package contains the %{summary}. %package -n openstack-java-swift-client Summary: OpenStack Java Swift Client Requires: java >= 1:1.7.0 Requires: jpackage-utils Requires: jackson >= 1.9.4 Requires: openstack-java-client >= %{version}-%{release} Requires: openstack-swift-model >= %{version}-%{release} %description -n openstack-java-swift-client This package contains the %{summary}. %package -n openstack-java-swift-model Summary: OpenStack Java Swift Model Requires: java >= 1:1.7.0 Requires: jackson >= 1.9.4 Requires: jpackage-utils %description -n openstack-java-swift-model This package contains the %{summary}. %prep %setup -q -n %{name}-%{version}-%{git_hash} %build mvn-rpmbuild install javadoc:aggregate -P "!console,!examples,!jersey2,resteasy" %install install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name} OPENSTACK_SERVICES="\ ceilometer-client ceilometer-model glance-client glance-model \ keystone-client keystone-model nova-client nova-model openstack-client \ quantum-client quantum-model swift-client swift-model \ " OPENSTACK_CONNECTORS="\ resteasy-connector \ " install_artifacts() { for i in ${*}; do install -pm 644 ${i}/target/${i}-%{version}-SNAPSHOT.jar \ $RPM_BUILD_ROOT/%{_javadir}/%{name}/${i}.jar install -pm 644 ${i}/pom.xml \ $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP.%{name}-${i}.pom done } install_artifacts $OPENSTACK_SERVICES (cd openstack-client-connectors && install_artifacts $OPENSTACK_CONNECTORS) for i in $OPENSTACK_SERVICES $OPENSTACK_CONNECTORS; do %add_maven_depmap -f ${i} JPP.%{name}-${i}.pom %{name}/${i}.jar done install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name} cp -pr target/site/apidocs $RPM_BUILD_ROOT/%{_javadocdir}/%{name} %files -n openstack-java-javadoc %doc LICENSE.txt README.textile %{_javadocdir}/%{name} %files -n openstack-java-client -f .mfiles-openstack-client %doc LICENSE.txt README.textile %dir %{_javadir}/%{name} %files -n openstack-java-resteasy-connector -f .mfiles-resteasy-connector %doc LICENSE.txt README.textile %dir %{_javadir}/%{name} %files -n openstack-java-ceilometer-client -f .mfiles-ceilometer-client %files -n openstack-java-ceilometer-model -f .mfiles-ceilometer-model %doc LICENSE.txt README.textile %dir %{_javadir}/%{name} %files -n openstack-java-glance-client -f .mfiles-glance-client %files -n openstack-java-glance-model -f .mfiles-glance-model %doc LICENSE.txt README.textile %dir %{_javadir}/%{name} %files -n openstack-java-keystone-client -f .mfiles-keystone-client %files -n openstack-java-keystone-model -f .mfiles-keystone-model %doc LICENSE.txt README.textile %dir %{_javadir}/%{name} %files -n openstack-java-nova-client -f .mfiles-nova-client %files -n openstack-java-nova-model -f .mfiles-nova-model %doc LICENSE.txt README.textile %dir %{_javadir}/%{name} %files -n openstack-java-quantum-client -f .mfiles-quantum-client %files -n openstack-java-quantum-model -f .mfiles-quantum-model %doc LICENSE.txt README.textile %dir %{_javadir}/%{name} %files -n openstack-java-swift-client -f .mfiles-swift-client %files -n openstack-java-swift-model -f .mfiles-swift-model %doc LICENSE.txt README.textile %dir %{_javadir}/%{name} %changelog * Thu May 23 2013 Federico Simoncelli - 3.0.0-0.0.git10597f7 - Initial build