%ifarch x86_64 %global libdir /usr/lib64 %else %global libdir /usr/lib %endif Name: aqute-bndlib Version: 1.50.0 Release: 4%{?dist} Summary: BND Library License: ASL 2.0 Group: Development/Tools URL: http://www.aQute.biz/Code/Bnd Source0: http://repo1.maven.org/maven2/biz/aQute/bndlib/1.50.0/bndlib-1.50.0.jar Source1: http://repo1.maven.org/maven2/biz/aQute/bndlib/1.50.0/bndlib-1.50.0.pom # wget http://dl.dropbox.com/u/2590603/bnd/biz.aQute.bnd.jar # jar xf biz.aQute.bnd.jar # tar czf aqute-bnd-1.50.0-icons.tar.gz icons Source2: aqute-bnd-1.50.0-icons.tar.gz # add biz.aQute.bnd.jar 1.50.0 source and metadata files # provides an ant task and an eclipse plugin Patch0: aqute-bndlib-1.50.0-add-bnd-stuff.patch # use eclipse libraries as system dependency. add ant and junit # add bundle, conpiler, jar plugin configuration Patch1: aqute-bndlib-1.50.0-pom.patch # Tested on: http://koji.fedoraproject.org/koji/taskinfo?taskID=4449562 # http://kojipkgs.fedoraproject.org//work/tasks/9563/4449563/build.log BuildArch: noarch BuildRequires: jpackage-utils BuildRequires: java-devel BuildRequires: ant BuildRequires: eclipse-jdt BuildRequires: eclipse-platform BuildRequires: eclipse-rcp BuildRequires: eclipse-swt BuildRequires: junit BuildRequires: maven BuildRequires: maven-plugin-bundle BuildRequires: maven-surefire-provider-junit4 Requires: java Requires: jpackage-utils %description The bnd tool helps you create and diagnose OSGi R4 bundles. The key functions are: - Show the manifest and JAR contents of a bundle - Wrap a JAR so that it becomes a bundle - Create a Bundle from a specification and a class path - Verify the validity of the manifest entries The tool is capable of acting as: - Command line tool - File format - Directives - Use of macros %package javadoc BuildRequires: jpackage-utils Summary: Javadoc for %{name} Group: Documentation %description javadoc API documentation for %{name}. %prep %setup -q -c # fixing incomplete source directory structure mkdir -p src/main/java target/classes mv -f OSGI-OPT/src/* src/main/java/ %patch0 -p1 # removing bundled classess & junk rm -rf OSGI-OPT rm -rf META-INF rm -rf src/main/java/aQute/bnd/test find . -iname '*.class' -delete find . -iname '*.jar' -delete find . -iname 'packageinfo' -delete tar -xf %{SOURCE2} # recycling all data files mv -f aQute target/classes mv -f org target/classes mv -f icons target/classes mv -f plugin.xml target/classes # for building with maven cp %{SOURCE1} pom.xml %patch1 -p0 # CR+LF -> LF sed -i "s|\r||g" LICENSE %build # some of these deps are available in maven depmap CORECVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.core.commands_ | sed 's/org.eclipse.core.commands_//') | sed 's/.jar//') COREJOBSVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.core.jobs_ | sed 's/org.eclipse.core.jobs_//') | sed 's/.jar//') CORERESOURCESVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.core.resources_ | sed 's/org.eclipse.core.resources_//') | sed 's/.jar//') CORERUNTIMEVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.core.runtime_ | sed 's/org.eclipse.core.runtime_//') | sed 's/.jar//') DEBUGUIVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.debug.ui_ | sed 's/org.eclipse.debug.ui_//') | sed 's/.jar//') DEBUGCOREVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.debug.core_ | sed 's/org.eclipse.debug.core_//') | sed 's/.jar//') ECVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.equinox.common_ | sed 's/org.eclipse.equinox.common_//') | sed 's/.jar//') ERVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.equinox.registry_ | sed 's/org.eclipse.equinox.registry_//') | sed 's/.jar//') JDTVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.jdt.core_ | sed 's/org.eclipse.jdt.core_//') | sed 's/.jar//') JDTDUVERSION=$(echo $(ls %{libdir}/eclipse/dropins/jdt/plugins | grep org.eclipse.jdt.debug.ui_ | sed 's/org.eclipse.jdt.debug.ui_//') | sed 's/.jar//') JDTJVERSION=$(echo $(ls %{libdir}/eclipse/dropins/jdt/plugins | grep org.eclipse.jdt.junit_ | sed 's/org.eclipse.jdt.junit_//') | sed 's/.jar//') JDTJCVERSION=$(echo $(ls %{libdir}/eclipse/dropins/jdt/plugins | grep org.eclipse.jdt.junit.core_ | sed 's/org.eclipse.jdt.junit.core_//') | sed 's/.jar//') JDTLVERSION=$(echo $(ls %{libdir}/eclipse/dropins/jdt/plugins | grep org.eclipse.jdt.launching_ | sed 's/org.eclipse.jdt.launching_//') | sed 's/.jar//') JDTUIVERSION=$(echo $(ls %{libdir}/eclipse/dropins/jdt/plugins | grep org.eclipse.jdt.ui_ | sed 's/org.eclipse.jdt.ui_//') | sed 's/.jar//') JFACEVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.jface_ | sed 's/org.eclipse.jface_//') | sed 's/.jar//') JFACETEXTVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.jface.text_ | sed 's/org.eclipse.jface.text_//') | sed 's/.jar//') OSGIVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.osgi_ | sed 's/org.eclipse.osgi_//') | sed 's/.jar//') OSGISVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.osgi.services_ | sed 's/org.eclipse.osgi.services_//') | sed 's/.jar//') TEXTVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.text_ | sed 's/org.eclipse.text_//') | sed 's/.jar//') UIVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.ui_ | sed 's/org.eclipse.ui_//') | sed 's/.jar//') UIEVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.ui.editors_ | sed 's/org.eclipse.ui.editors_//') | sed 's/.jar//') UIIDEVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.ui.ide_ | sed 's/org.eclipse.ui.ide_//') | sed 's/.jar//') UIWVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.ui.workbench_ | sed 's/org.eclipse.ui.workbench_//') | sed 's/.jar//') UIWTVERSION=$(echo $(ls %{libdir}/eclipse/plugins | grep org.eclipse.ui.workbench.texteditor_ | sed 's/org.eclipse.ui.workbench.texteditor_//') | sed 's/.jar//') export LC_ALL=en_US.UTF-8 mvn-rpmbuild \ -D_libdir=%{libdir} \ -Dcore.commands.version=$CORECVERSION \ -Dcore.jobs.version=$COREJOBSVERSION \ -Dcore.resources.version=$CORERESOURCESVERSION \ -Dcore.runtime.version=$CORERUNTIMEVERSION \ -Ddebug.ui.version=$DEBUGUIVERSION \ -Ddebug.core.version=$DEBUGCOREVERSION \ -Dequinox.common.version=$ECVERSION \ -Dequinox.registry.version=$ERVERSION \ -Djdt.version=$JDTVERSION \ -Djdt.debug.ui.version=$JDTDUVERSION \ -Djdt.junit.version=$JDTJVERSION \ -Djdt.junit.core.version=$JDTJCVERSION \ -Djdt.launching.version=$JDTLVERSION \ -Djdt.ui.version=$JDTUIVERSION \ -Djface.version=$JFACEVERSION \ -Djface.text.version=$JFACETEXTVERSION \ -Dosgi.version=$OSGIVERSION \ -Dosgi.service.version=$OSGISVERSION \ -Dtext.version=$TEXTVERSION \ -Dui.version=$UIVERSION \ -Dui.editors.version=$UIEVERSION \ -Dui.ide.version=$UIIDEVERSION \ -Dui.w.version=$UIWVERSION \ -Dui.wt.version=$UIWTVERSION \ install javadoc:aggregate %install # jars install -Dpm 644 target/bndlib-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar # pom install -Dpm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom # javadoc install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name} cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} %add_maven_depmap JPP-%{name}.pom %{name}.jar %files %doc LICENSE %{_javadir}/%{name}.jar %{_mavenpomdir}/JPP-%{name}.pom %{_mavendepmapfragdir}/%{name} %files javadoc %doc LICENSE %{_javadocdir}/%{name} %changelog * Mon Sep 03 2012 gil cattaneo - 1.50.0-4 - Added bnd support - Added OSGi support * Wed Jul 18 2012 Fedora Release Engineering - 1.50.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Thu Jan 12 2012 Fedora Release Engineering - 1.50.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Wed Dec 21 2011 Jaromir Capik - 1.50.0-1 - Update to 1.50.0 * Fri Dec 02 2011 Jaromir Capik - 1.43.0-2 - Missing non-class files added * Thu Sep 15 2011 Jaromir Capik - 1.43.0-1 - Update to 1.43.0 - Spec file changes according to the latest guidelines * Mon Feb 07 2011 Fedora Release Engineering - 0:0.0.363-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Tue Nov 9 2010 Alexander Kurtakov 0:0.0.363-3 - BR java-devel >= 1.6.0. * Tue Nov 9 2010 Alexander Kurtakov 0:0.0.363-2 - Fix FTBFS. * Thu Sep 3 2009 Alexander Kurtakov 0:0.0.363-1 - Update to 0.0.363. * Wed Aug 19 2009 Andrew Overholt 0:0.0.203-4.3 - Add LICENSE - Clean up Group tag * Mon Aug 17 2009 Andrew Overholt 0:0.0.203-4.2 - Remove gcj support * Wed May 20 2009 Fernando Nasser 0:0.0.203-4.1 - Remove unedded BRs at Andrew Overholt's recommendation - Changed libdir to /usr/lib* at 'ajax' suggestion on irc to avoid noarch on 64-bit arches problem * Fri Mar 20 2009 Yong Yang 0.0.203-4 - rebuild with new maven2 2.0.8 built in bootstrap mode - merge from JPP-6 * Tue Jan 15 2009 David Walluck 0:0.0.203-3 - fix build * Thu Jan 15 2009 Yong Yang 0.0.203-3jpp.1 - Imported from dbhole's maven 2.0.8 packages, initial building * Tue Mar 11 2008 Deepak Bhole 0.0.203-2jpp.1 - Import from JPackage + change per Fedora requirements * Thu Feb 14 2008 Ralph Apel - 0:0.0.203-2jpp - Add several non class files to jar * Mon Jan 07 2008 Ralph Apel - 0:0.0.203-1jpp - First release