This commit is contained in:
parent
b69b1b37c8
commit
0af37e9612
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 9 08:52:37 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Build and package also the previous API version 0.9e, since the
|
||||
jump from 0.9 to 0.10 is completely API incompatible and the
|
||||
build does not require any additional dependencies
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 14 06:59:22 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
%define real_name java-cup
|
||||
%define git_hash d69c832
|
||||
%define git_date 20210814
|
||||
%define compat_name java_cup
|
||||
%define compat_version 9e
|
||||
%bcond_with bootstrap
|
||||
Name: java-cup-bootstrap
|
||||
Version: 0.11
|
||||
@ -32,6 +34,7 @@ Group: Development/Libraries/Java
|
||||
URL: http://www2.cs.tum.edu/projects/cup/
|
||||
Source0: %{real_name}-%{git_hash}.tar.xz
|
||||
Source1: %{real_name}-generated-files.tar.xz
|
||||
Source2: https://www.cs.princeton.edu/~appel/modern/java/CUP/%{compat_name}_v%{compat_version}.tar.gz
|
||||
Source100: java-cup-nogit.patch.in
|
||||
Patch0: java-cup-no-classpath-in-manifest.patch
|
||||
Patch1: java-cup-java8.patch
|
||||
@ -93,6 +96,7 @@ java-cup is a LALR Parser Generator in Java. With v0.11, you can: *
|
||||
|
||||
%prep
|
||||
%setup -q -n %{real_name}-%{git_hash}
|
||||
%setup -q -T -D -a 2 -n %{real_name}-%{git_hash}/compat
|
||||
cat %{SOURCE100} | sed 's#@GIT_HASH@#%{git_hash}#g' | sed 's#@GIT_DATE@#%{git_date}#g' | patch -p1 -u -l
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
@ -104,6 +108,7 @@ cat %{SOURCE100} | sed 's#@GIT_HASH@#%{git_hash}#g' | sed 's#@GIT_DATE@#%{git_da
|
||||
%endif
|
||||
find . -name '*.jar' -print -delete
|
||||
mkdir -p target/classes
|
||||
mkdir -p compat/classes
|
||||
|
||||
%build
|
||||
%if %{with bootstrap}
|
||||
@ -113,21 +118,25 @@ export CLASSPATH=$(build-classpath java-cup jflex)
|
||||
%endif
|
||||
export OPT_JAR_LIST=:
|
||||
ant
|
||||
pushd compat
|
||||
javac -d classes -source 1.7 -target 1.7 %{compat_name}/runtime/*.java %{compat_name}/*.java
|
||||
jar -cf %{compat_name}.jar -c classes .
|
||||
popd
|
||||
|
||||
%install
|
||||
# jar
|
||||
mkdir -p %{buildroot}%{_javadir}
|
||||
cp -a target/dist/%{real_name}-%{cvs_version}.jar %{buildroot}%{_javadir}/%{real_name}.jar
|
||||
cp -a target/dist/%{real_name}-%{cvs_version}-runtime.jar %{buildroot}%{_javadir}/%{real_name}-runtime.jar
|
||||
cp -a compat/%{compat_name}.jar %{buildroot}%{_javadir}/%{compat_name}.jar
|
||||
|
||||
%if %{without bootstrap}
|
||||
# maven data
|
||||
%add_maven_depmap com.github.vbmacher:%{real_name}:%{cvs_version}-%{git_date} %{real_name}.jar
|
||||
%add_maven_depmap com.github.vbmacher:%{real_name}-runtime:%{cvs_version}-%{git_date} %{real_name}-runtime.jar
|
||||
%add_maven_depmap %{compat_name}:${compat_name}:%{compat_version} %{compat_name}.jar
|
||||
%endif
|
||||
|
||||
# compatibility symlinks
|
||||
(cd %{buildroot}%{_javadir} && ln -s %{real_name}.jar java_cup.jar && ln -s %{real_name}-runtime.jar java_cup-runtime.jar)
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
|
||||
%jpackage_script java_cup.Main "" "" %{real_name}:%{real_name}-runtime %{real_name} true
|
||||
@ -135,6 +144,7 @@ mkdir -p %{buildroot}%{_bindir}
|
||||
%if %{with bootstrap}
|
||||
%files
|
||||
%{_javadir}/%{real_name}*.jar
|
||||
%{_javadir}/%{compat_name}.jar
|
||||
%else
|
||||
|
||||
%files -f .mfiles
|
||||
@ -142,7 +152,6 @@ mkdir -p %{buildroot}%{_bindir}
|
||||
%license licence.txt
|
||||
%doc changelog.txt
|
||||
%attr(0755,root,root) %{_bindir}/%{real_name}
|
||||
%{_javadir}/java_cup*.jar
|
||||
|
||||
%if %{without bootstrap}
|
||||
%files manual
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 9 08:52:37 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Build and package also the previous API version 0.9e, since the
|
||||
jump from 0.9 to 0.10 is completely API incompatible and the
|
||||
build does not require any additional dependencies
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 14 06:59:22 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
%define real_name java-cup
|
||||
%define git_hash d69c832
|
||||
%define git_date 20210814
|
||||
%define compat_name java_cup
|
||||
%define compat_version 9e
|
||||
%bcond_with bootstrap
|
||||
Name: java-cup
|
||||
Version: 0.11
|
||||
@ -31,6 +33,7 @@ Group: Development/Libraries/Java
|
||||
URL: http://www2.cs.tum.edu/projects/cup/
|
||||
Source0: %{real_name}-%{git_hash}.tar.xz
|
||||
Source1: %{real_name}-generated-files.tar.xz
|
||||
Source2: https://www.cs.princeton.edu/~appel/modern/java/CUP/%{compat_name}_v%{compat_version}.tar.gz
|
||||
Source100: java-cup-nogit.patch.in
|
||||
Patch0: java-cup-no-classpath-in-manifest.patch
|
||||
Patch1: java-cup-java8.patch
|
||||
@ -92,6 +95,7 @@ java-cup is a LALR Parser Generator in Java. With v0.11, you can: *
|
||||
|
||||
%prep
|
||||
%setup -q -n %{real_name}-%{git_hash}
|
||||
%setup -q -T -D -a 2 -n %{real_name}-%{git_hash}/compat
|
||||
cat %{SOURCE100} | sed 's#@GIT_HASH@#%{git_hash}#g' | sed 's#@GIT_DATE@#%{git_date}#g' | patch -p1 -u -l
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
@ -103,6 +107,7 @@ cat %{SOURCE100} | sed 's#@GIT_HASH@#%{git_hash}#g' | sed 's#@GIT_DATE@#%{git_da
|
||||
%endif
|
||||
find . -name '*.jar' -print -delete
|
||||
mkdir -p target/classes
|
||||
mkdir -p compat/classes
|
||||
|
||||
%build
|
||||
%if %{with bootstrap}
|
||||
@ -112,21 +117,25 @@ export CLASSPATH=$(build-classpath java-cup jflex)
|
||||
%endif
|
||||
export OPT_JAR_LIST=:
|
||||
ant
|
||||
pushd compat
|
||||
javac -d classes -source 1.7 -target 1.7 %{compat_name}/runtime/*.java %{compat_name}/*.java
|
||||
jar -cf %{compat_name}.jar -c classes .
|
||||
popd
|
||||
|
||||
%install
|
||||
# jar
|
||||
mkdir -p %{buildroot}%{_javadir}
|
||||
cp -a target/dist/%{real_name}-%{cvs_version}.jar %{buildroot}%{_javadir}/%{real_name}.jar
|
||||
cp -a target/dist/%{real_name}-%{cvs_version}-runtime.jar %{buildroot}%{_javadir}/%{real_name}-runtime.jar
|
||||
cp -a compat/%{compat_name}.jar %{buildroot}%{_javadir}/%{compat_name}.jar
|
||||
|
||||
%if %{without bootstrap}
|
||||
# maven data
|
||||
%add_maven_depmap com.github.vbmacher:%{real_name}:%{cvs_version}-%{git_date} %{real_name}.jar
|
||||
%add_maven_depmap com.github.vbmacher:%{real_name}-runtime:%{cvs_version}-%{git_date} %{real_name}-runtime.jar
|
||||
%add_maven_depmap %{compat_name}:${compat_name}:%{compat_version} %{compat_name}.jar
|
||||
%endif
|
||||
|
||||
# compatibility symlinks
|
||||
(cd %{buildroot}%{_javadir} && ln -s %{real_name}.jar java_cup.jar && ln -s %{real_name}-runtime.jar java_cup-runtime.jar)
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
|
||||
%jpackage_script java_cup.Main "" "" %{real_name}:%{real_name}-runtime %{real_name} true
|
||||
@ -134,6 +143,7 @@ mkdir -p %{buildroot}%{_bindir}
|
||||
%if %{with bootstrap}
|
||||
%files
|
||||
%{_javadir}/%{real_name}*.jar
|
||||
%{_javadir}/%{compat_name}.jar
|
||||
%else
|
||||
|
||||
%files -f .mfiles
|
||||
@ -141,7 +151,6 @@ mkdir -p %{buildroot}%{_bindir}
|
||||
%license licence.txt
|
||||
%doc changelog.txt
|
||||
%attr(0755,root,root) %{_bindir}/%{real_name}
|
||||
%{_javadir}/java_cup*.jar
|
||||
|
||||
%if %{without bootstrap}
|
||||
%files manual
|
||||
|
3
java_cup_v9e.tar.gz
Normal file
3
java_cup_v9e.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:be176e9356ff1695c64d08277ba31cea14ea4f617b93787502cf93c6fd35625f
|
||||
size 93657
|
Loading…
Reference in New Issue
Block a user