[fedora-java] Eclipse plugins and .dbs
Andrew Overholt
overholt at redhat.com
Wed Mar 23 15:59:07 UTC 2005
I've attached a patch for the changelog plugin. This will fix up the
native-compilation situation until everything's sorted out.
Andrew
-------------- next part --------------
Index: eclipse-changelog.spec
===================================================================
RCS file: /cvs/dist/rpms/eclipse-changelog/devel/eclipse-changelog.spec,v
retrieving revision 1.22
diff -u -p -r1.22 eclipse-changelog.spec
--- eclipse-changelog.spec 10 Mar 2005 21:55:06 -0000 1.22
+++ eclipse-changelog.spec 23 Mar 2005 15:58:25 -0000
@@ -20,11 +20,12 @@ ExclusiveArch: i386 ppc x86_64
Summary: %{pkg_summary}
Name: %{eclipse_name}-changelog
Version: %{changelog_majmin}.%{changelog_micro}_fc
-Release: 17
+Release: 18
License: EPL (Eclipse Public License) <http://www.eclipse.org/legal/epl-v10.html>
Group: Text Editors/Integrated Development Environments (IDE)
URL: http://www.redhat.com
-Requires: eclipse-ui
+Requires: eclipse-platform
+Requires: gcc-java
# Note that following the Eclipse Releng process we do not distribute a
# real .tar.gz file. Instead, you must build it by hand. The way to do
@@ -107,9 +108,6 @@ for file in $(pwd)/com.redhat.eclipse.ch
# Once compiled, we don't care about the jar (it's still in the original tar)
rm $jarname
-
- # Create a text mapping of the jar <-->so mapping for later use.
- echo %{eclipse_base}/plugins/$jarname::%{eclipse_lib_base}/plugins/$jarname.so >> %{name}.jarswithnativelibs
done
;;
esac
@@ -141,10 +139,13 @@ gcj-dbtool -n $RPM_BUILD_ROOT/%{eclipse_
# Create plugins directory in eclipse lib base
install -d -m755 $RPM_BUILD_ROOT/%{eclipse_lib_base}/plugins/
-cd $nativehome/eclipse/plugins
+# Populate db with mappings
+for j in `find $RPM_BUILD_ROOT/%{eclipse_base} -name \*.jar`; do
+ gcj-dbtool -f $RPM_BUILD_ROOT%{eclipse_lib_base}/mappings/changelog.db \
+ $j `echo $j | sed "s:$RPM_BUILD_ROOT/::" | sed "s:%{_datadir}:%{_libdir}:"`.so;
+done;
-# Install the text jar <--> so mapping we created when we compiled
-install -m644 %{name}.jarswithnativelibs $RPM_BUILD_ROOT/%{eclipse_lib_base}
+cd $nativehome/eclipse/plugins
# Copy the .so(s) we created earlier into the build root
for file in `find . -type f -name *.so`; do
@@ -153,23 +154,24 @@ for file in `find . -type f -name *.so`;
done
%post
-
-# Populate db with mappings
-for j in `cat %{eclipse_lib_base}/%{name}.jarswithnativelibs`; do
- gcj-dbtool -a %{eclipse_lib_base}/mappings/changelog.db `echo $j | sed "s/::/ /"`
-done
-
# Merge all dbs together after install
+dbLocation=`gcj-dbtool -p`
+if ! [ -e $dbLocation ]; then
+ dirname $dbLocation | xargs mkdir -p
+ gcj-dbtool -n $dbLocation
+fi
+
if [ -n "`find %{eclipse_lib_base}/mappings -name \*.db`" ]; then
- gcj-dbtool -m %{eclipse_lib_base}/eclipse.db `find %{eclipse_lib_base}/mappings -name \*.db`
+ gcj-dbtool -m $dbLocation `find %{eclipse_lib_base}/mappings -name \*.db` $dbLocation
fi
%postun
# After uninstall has removed our db, again merge the dbs
# to remove our entries
+dbLocation=`gcj-dbtool -p`
if [ -n "`find %{eclipse_lib_base}/mappings -name \*.db`" ]; then
- gcj-dbtool -m %{eclipse_lib_base}/eclipse.db `find %{eclipse_lib_base}/mappings -name \*.db`
+ gcj-dbtool -m $dbLocation `find %{eclipse_lib_base}/mappings -name \*.db` $dbLocation
fi
%clean
@@ -181,9 +183,13 @@ rm -rf ${RPM_BUILD_ROOT}
%{eclipse_base}/plugins/com.redhat.eclipse.changelog*
%{eclipse_lib_base}/plugins/com.redhat.eclipse.changelog*
%{eclipse_lib_base}/mappings/changelog.db
-%{eclipse_lib_base}/%{name}.jarswithnativelibs
%changelog
+* Wed Mar 23 2005 Andrew Overholt <overholt at redhat.com> 2.0.1_fc-18
+- Update with new gcj-dbtool stuff.
+- Fix Requires.
+- Remove *.jarswithnativelibs.
+
* Thu Mar 10 2005 Phil Muldoon <pmuldoon at redhat.com> 2.0.1-17
- Redo arches
- Clean up BuildRequires
More information about the fedora-devel-java-list
mailing list