Rearrange how BC-compiled stuff is built and installed
This commit is contained in:
parent
3c7417c633
commit
a7d0434ca9
@ -1,4 +1,4 @@
|
||||
javacc-3.2-src.tar.gz
|
||||
javacc-3.2
|
||||
noarch
|
||||
i386
|
||||
*.src.rpm
|
||||
|
||||
58
javacc.spec
58
javacc.spec
@ -1,6 +1,4 @@
|
||||
%define section free
|
||||
%define gcj_support 1
|
||||
ExclusiveArch: i386 x86_64 ppc
|
||||
|
||||
Name: javacc
|
||||
Version: 3.2
|
||||
@ -17,10 +15,11 @@ Group: Development/Code Generators
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||
Requires: jpackage-utils >= 0:1.5
|
||||
BuildRequires: ant, /bin/bash
|
||||
%if %{gcj_support}
|
||||
BuildRequires: java-1.4.2-gcj-compat-devel >= 1.4.2.0-40jpp_30rh
|
||||
Requires(post,postun): java-1.4.2-gcj-compat
|
||||
%endif
|
||||
# libgcj aot-compiled native libraries
|
||||
BuildRequires: gcc-java >= 4.0.0-0.43
|
||||
BuildRequires: java-1.4.2-gcj-compat >= 1.4.2.0-40jpp_16rh
|
||||
Requires(post,postun): java-1.4.2-gcj-compat >= 1.4.2.0-40jpp_16rh
|
||||
ExclusiveArch: %{ix86} x86_64 ppc alpha
|
||||
|
||||
%description
|
||||
Java Compiler Compiler (JavaCC) is the most popular parser generator for use
|
||||
@ -56,9 +55,15 @@ ant \
|
||||
-Dversion=%{version} \
|
||||
jar
|
||||
|
||||
%if %{gcj_support}
|
||||
find-and-aot-compile . "-fPIC"
|
||||
%endif
|
||||
gcj-dbtool -n bin/lib/%{name}-%{version}.db 256
|
||||
aot-compile \
|
||||
bin/lib/%{name}.jar \
|
||||
bin/lib/lib%{name}-%{version}.jar.so \
|
||||
"$RPM_OPT_FLAGS -fPIC"
|
||||
gcj-dbtool -f \
|
||||
bin/lib/%{name}-%{version}.db \
|
||||
bin/lib/%{name}.jar \
|
||||
%{_libdir}/lib%{name}-%{version}.jar.so
|
||||
|
||||
%install
|
||||
rm -fr $RPM_BUILD_ROOT
|
||||
@ -70,41 +75,28 @@ install -m 755 javacc jjdoc jjtree $RPM_BUILD_ROOT/usr/bin
|
||||
install -d -m 755 $RPM_BUILD_ROOT/usr/share/%{name}
|
||||
cp -pr examples $RPM_BUILD_ROOT/usr/share/%{name}
|
||||
|
||||
%if %{gcj_support}
|
||||
install -dm 755 $RPM_BUILD_ROOT%{_libdir}
|
||||
install -pm 755 bin/lib/lib%{name}*.jar.so \
|
||||
$RPM_BUILD_ROOT%{_libdir}/lib%{name}-%{version}.jar.so
|
||||
ln -s lib%{name}-%{version}.jar.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}.jar.so
|
||||
|
||||
gcjdbdir=$RPM_BUILD_ROOT`gcj-dbtool -p %{_libdir}`.d
|
||||
mkdir -p $gcjdbdir
|
||||
gcj-dbtool -n $gcjdbdir/%{name}.db 100
|
||||
gcj-dbtool -f $gcjdbdir/%{name}.db $RPM_BUILD_ROOT%{_javadir}/%{name}.jar \
|
||||
%{_libdir}/lib%{name}.jar.so
|
||||
%endif
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_libdir}
|
||||
install -m 755 bin/lib/lib%{name}-%{version}.jar.so $RPM_BUILD_ROOT%{_libdir}
|
||||
gcjdbdir=`gcj-dbtool -p %{_libdir}`.d
|
||||
install -d -m 755 $RPM_BUILD_ROOT$gcjdbdir
|
||||
install -m 644 bin/lib/%{name}-%{version}.db $RPM_BUILD_ROOT$gcjdbdir
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%if %{gcj_support}
|
||||
%post
|
||||
/usr/bin/rebuild-gcj-db %{_libdir}
|
||||
|
||||
%postun
|
||||
/usr/bin/rebuild-gcj-db %{_libdir}
|
||||
%endif
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
%{_javadir}/*.jar
|
||||
%doc LICENSE README
|
||||
%defattr(0755,root,root,0755)
|
||||
/usr/bin/*
|
||||
%if %{gcj_support}
|
||||
%{_libdir}/gcj-4.0.0/classmap.db.d/%{name}.db
|
||||
%{_libdir}/lib%{name}-%{version}.jar.so
|
||||
%{_libdir}/lib%{name}.jar.so
|
||||
%endif
|
||||
%attr(0755,root,root) /usr/bin/*
|
||||
%attr(0755,root,root) %{_libdir}/lib*.jar.so
|
||||
%{_libdir}/*/*/%{name}-%{version}.db
|
||||
|
||||
%files manual
|
||||
%defattr(0644,root,root,0755)
|
||||
@ -115,8 +107,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_datadir}/%{name}/*
|
||||
|
||||
%changelog
|
||||
* Thu Jun 09 2005 Andrew Overholt <overholt@redhat.com> 3.2-1jpp_1fc
|
||||
- Build for Fedora.
|
||||
* Fri Jun 10 2005 Gary Benson <gbenson@redhat.com> 0:3.2-1jpp_1fc
|
||||
- Rearrange how BC-compiled stuff is built and installed.
|
||||
|
||||
* Thu Jun 9 2005 Andrew Overholt <overholt@redhat.com>
|
||||
- Natively-compile.
|
||||
|
||||
* Thu Mar 4 2004 Frank Ch. Eigler <fche@redhat.com> 0:3.2-1jpp_1rh
|
||||
|
||||
Loading…
Reference in New Issue
Block a user