%define maven 0 Name: apache-felix-shell-tui Version: 1.4.1 Release: 3mamba Summary: Apache Felix Shell TUI Group: Development/Libraries/Java Vendor: openmamba Distribution: openmamba Packager: gil URL: http://felix.apache.org/ Source0: http://www.apache.org/dist/felix/org.apache.felix.shell.tui-%{version}-project.tar.gz Source1: maven2-2.2.0-settings.xml Source2: apache-felix-shell-tui-1.4.1-build.xml Source3: apache-felix-shell-tui-1.4.1-maven-build.properties Source4: apache-felix-shell-tui-1.4.1-maven-build.xml Source5: apache-felix-shell-tui-%{version}-maven-build.bnd Source6: apache-felix-shell-tui-1.4.1-bnd-build.xml Source7: apache-felix-shell-tui-%{version}-OSGi-MANIFEST.MF License: Apache Software License 2.0 BuildRequires: apache-ant BuildRequires: apache-felix-javax-servlet BuildRequires: apache-felix-osgi-compendium BuildRequires: apache-felix-osgi-core BuildRequires: apache-felix-osgi-foundation BuildRequires: apache-felix-shell %if %maven BuildRequires: apache-maven2 BuildRequires: apache-maven2-ant-plugin BuildRequires: apache-maven2-compiler-plugin BuildRequires: apache-maven2-jar-plugin BuildRequires: apache-maven2-javadoc-plugin BuildRequires: mojo-rat-maven-plugin BuildRequires: felix-maven-bundle-plugin %endif #BuildRequires: aqute-bnd BuildRequires: java-easymock2 BuildRequires: java-junit48 BuildRequires: java-mockito17 BuildRequires: jpackage-utils Requires: apache-felix-shell Requires: jpackage-utils BuildRoot: %{_tmppath}/%{name}-%{version}-root %description A simple textual user interface for Felix shell service. %package javadoc Group: Documentation Summary: Javadoc for %{name} %description javadoc Apache Felix Shell TUI. This package contains javadoc for %{name}. %prep %setup -q -n org.apache.felix.shell.tui-%{version} chmod -R go=u-w * for j in $(find . -name "*.jar"); do mv $j ${j}.no done %if %maven cp %{SOURCE1} settings.xml mkdir -p .m2/repository/JPP/maven2/default_poms sed -i -e "s|__INTERNAL_REPO_PLACEHOLDER__|file://`pwd`/external_repo|g" settings.xml sed -i -e "s|__EXTERNAL_REPO_PLACEHOLDER__|file://`pwd`/.m2/repository|g" settings.xml %else cp %{SOURCE2} build.xml cp %{SOURCE3} maven-build.properties cp %{SOURCE4} maven-build.xml cp %{SOURCE5} maven-build.bnd %endif %build export JAVA_HOME=/usr/lib/jvm/java export MAVEN_REPO_LOCAL=$PWD/.m2/repository export MAVEN_SETTINGS=$PWD/settings.xml mkdir -p $MAVEN_REPO_LOCAL %if %maven mkdir external_repo ln -s %{_javadir} external_repo/JPP mvn-jpp \ -e \ -s $MAVEN_SETTINGS \ -Dmaven.test.failure.ignore=true \ -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ -Dpackaging=bundle \ ant:ant org.apache.felix:maven-bundle-plugin:ant install javadoc:javadoc %else export CLASSPATH="" CLASSPATH=$CLASSPATH:$(build-classpath felix/org.osgi.compendium felix/org.osgi.core felix/org.osgi.foundation) CLASSPATH=$CLASSPATH:$(build-classpath felix/javax.servlet felix/org.apache.felix.shell) CLASSPATH=$CLASSPATH:$(build-classpath junit48 easymock2 mockito17-all):target/classes:target/test-classes ant \ -Duser.home=$PWD \ -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ -Dmaven.settings.offline=true \ -Dmaven.settings.interactiveMode=false \ -Dbuild.sysclasspath=first \ jar javadoc mkdir META-INF cp %{SOURCE7} META-INF/MANIFEST.MF touch META-INF/MANIFEST.MF zip -u target/org.apache.felix.shell.tui-%{version}.jar META-INF/MANIFEST.MF # generates the OSGi jar # mkdir -p target/bnd # BUNDLE_CLASSPATH="target/classes" # bnd build -classpath $BUNDLE_CLASSPATH -output target/bnd/org.apache.felix.shell.tui-%{version}.jar maven-build.bnd # rm -rf temp # pushd target/classes # touch META-INF/maven/org.apache.felix/org.apache.felix.shell.tui/pom.properties # touch META-INF/maven/org.apache.felix/org.apache.felix.shell.tui/pom.xml # zip -u ../../target/bnd/org.apache.felix.shell.tui-%{version}.jar META-INF/maven/org.apache.felix/org.apache.felix.shell.tui/* %endif %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" mkdir -p %{buildroot}%{_javadir}/felix mkdir -p %{buildroot}%{_datadir}/maven2/poms %if %maven install -pm 644 target/org.apache.felix.shell.tui-%{version}.jar \ %{buildroot}%{_javadir}/felix/org.apache.felix.shell.tui-%{version}.jar %else # install -pm 644 target/bnd/org.apache.felix.shell.tui-%{version}.jar \ install -pm 644 target/org.apache.felix.shell.tui-%{version}.jar \ %{buildroot}%{_javadir}/felix/org.apache.felix.shell.tui-%{version}.jar %endif install -m 644 pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP.felix-felix-shell-tui.pom %add_to_maven_depmap org.apache.felix org.apache.felix.shell.tui %{version} JPP/felix org.apache.felix.shell.tui ( cd %{buildroot}%{_javadir}/felix for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"` done ) mkdir -p %{buildroot}%{_javadocdir}/felix-shell-tui-%{version} cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/felix-shell-tui-%{version} ln -s felix-shell-tui-%{version} %{buildroot}%{_javadocdir}/felix-shell-tui rm -rf target/site/apidocs %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post %update_maven_depmap %postun %update_maven_depmap %files %defattr(-,root,root) %{_javadir}/felix/org.apache.felix.shell.tui-%{version}.jar %{_javadir}/felix/org.apache.felix.shell.tui.jar %{_mavendepmapfragdir} %{_datadir}/maven2/poms %doc LICENSE NOTICE doc/* %files javadoc %defattr(-,root,root) %{_javadocdir}/felix-shell-tui-%{version} %{_javadocdir}/felix-shell-tui %changelog * Mon Mar 28 2011 gil 1.4.1-3mamba - rebuilt with java-openjdk support * Sat Nov 27 2010 gil 1.4.1-2mamba - rebuilt devel * Tue Apr 13 2010 gil 1.4.1-1mamba - update to 1.4.1 * Fri Mar 12 2010 gil 1.4.0-1mamba - package created by autospec