diff --git a/antlr-bootstrap.changes b/antlr-bootstrap.changes index 4325334..90a732e 100644 --- a/antlr-bootstrap.changes +++ b/antlr-bootstrap.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jul 4 11:17:30 UTC 2014 - tchvatal@suse.com + +- Cleanup a bit with spec-cleaner + ------------------------------------------------------------------- Wed Jul 17 13:14:27 UTC 2013 - schwab@suse.de diff --git a/antlr-bootstrap.spec b/antlr-bootstrap.spec index f098171..7eea14a 100644 --- a/antlr-bootstrap.spec +++ b/antlr-bootstrap.spec @@ -1,4 +1,3 @@ -# vim:fdm=marker:foldmarker=#>>>,#<<<:foldcolumn=6: # # spec file for package antlr-bootstrap # @@ -17,46 +16,33 @@ # +%define real_name antlr Name: antlr-bootstrap -%define non_bootstrap_name antlr +Version: 2.7.7 +Release: 0 +Summary: Antlr for bootstrapping purposes +License: BSD-3-Clause and SUSE-Public-Domain +Group: Development/Libraries/Java +Url: http://www.antlr.org +Source0: antlr-%{version}.tar.bz2 +Source1: manifest.antlr BuildRequires: ecj-bootstrap >= 0.570 BuildRequires: fastjar BuildRequires: gcc-gij BuildRequires: gcc-java BuildRequires: unzip BuildRequires: zip -%define real_name antlr -Summary: Antlr for bootstrapping purposes -License: BSD-3-Clause and SUSE-Public-Domain -Group: Development/Libraries/Java -Version: 2.7.7 -Release: 0 -Url: http://www.antlr.org -Source0: antlr-%{version}.tar.bz2 -Source1: manifest.antlr -# files for the source package BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch -%description +%description This antlr package is used for bootstrapping purposes only. - - -Authors: --------- - This antlr package is used for bootstrapping purposes only. - -%prep -#<<< package descriptions end -#>>> -# antlr -%setup -n %{real_name}-%{version} +%prep +%setup -q -n %{real_name}-%{version} find | grep "\(ShowString.java$\|StreamConverter.java$\)" && exit 42 -#<<< -#>>> %build -%build +%build #>>> some useful functions ... used throughout bootstrap packages # variables: TARGET_DIR=`pwd` @@ -66,13 +52,12 @@ LIB_GCJ="`ls %{_javadir}/libgcj-*.jar`" function delBinaryFiles() { set +x echo deleting binary files ... - for file in `find . -name "*.class" -o -name "*.jar" -o -name "*DELETED-BY-PACKAGER*"` - do + for file in `find . -name "*.class" -o -name "*.jar" -o -name "*DELETED-BY-PACKAGER*"` + do rm -rf $file done set -x } -#<<< #>>> make a string with all jar files found in target folder that can be used for a classpath string # string is saved in JAR_CLASSPATH function mkTargetClasspath() { @@ -84,7 +69,6 @@ function mkTargetClasspath() { done set -x } -#<<< #>>> compiles all *.java file in the current directory tree # uses mkTargetClasspath for CLASSPATH variable # uses LIB_GCJ for CLASSPATH @@ -107,20 +91,16 @@ function compileFiles() { done set -x } -#<<< #>>> make jar archive # PARAM#1: name of jar archive (without .jar suffix) # uses $TARGET_DIR to move created jar to function mkJar() { find -name "version.txt" -or -name "*.class" -or -name "*.properties" -or -name "*.rsc" -or -name "*manifest*" |\ - xargs /usr/bin/fastjar -m manifest.* -cf ${1}.jar ; + xargs %{_bindir}/fastjar -m manifest.* -cf ${1}.jar ; mv ${1}.jar $TARGET_DIR } -#<<< COMPILER_COMMAND="gij -jar %{_javadir}/jdtcore.jar -cp " -#<<< end functions delBinaryFiles -#>>> antlr mkdir src mv antlr src cd src @@ -128,24 +108,14 @@ cp %{SOURCE1} . compileFiles mkJar %{name} delBinaryFiles -#<<< end antlr -#<<< end %build -#>>> %install %install -%{__install} -d -m 0755 %{buildroot}%{_javadir} -%{__install} -m 0644 %{name}.jar %{buildroot}%{_javadir}/ -%{__ln_s} -f %{_javadir}/%{name}.jar %{buildroot}/%{_javadir}/%{name}-%{version}.jar -#<<< - -%clean -%{__rm} -rf %{buildroot} -#>>> files +install -d -m 0755 %{buildroot}%{_javadir} +install -m 0644 %{name}.jar %{buildroot}%{_javadir}/ +ln -s -f %{_javadir}/%{name}.jar %{buildroot}/%{_javadir}/%{name}-%{version}.jar %files -%defattr(-,root,root) -#%dir %{_javadir} +%defattr(-,root,root) %{_javadir}/%{name}*.jar -#<<< %changelog diff --git a/antlr.changes b/antlr.changes index 8f184fa..a674c06 100644 --- a/antlr.changes +++ b/antlr.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jul 4 11:17:42 UTC 2014 - tchvatal@suse.com + +- Cleanup with spec-cleaner and fix the sle11 build properly. + ------------------------------------------------------------------- Wed Apr 30 13:58:14 UTC 2014 - darin@darins.net diff --git a/antlr.spec b/antlr.spec index 7f02882..6e2f4a1 100644 --- a/antlr.spec +++ b/antlr.spec @@ -17,7 +17,6 @@ %define section free - Name: antlr Version: 2.7.7 Release: 0 @@ -25,11 +24,10 @@ Summary: Another Tool for Language Recognition License: GPL-2.0+ and SUSE-Public-Domain and MIT Group: Development/Tools/Other Url: http://www.antlr.org/ -#Source0: http://www.antlr.org/download/antlr-2.7.4.tar.gz -Source0: %{name}-%{version}.tar.bz2 +Source0: antlr-%{version}.tar.bz2 Source1: %{name}-build.xml Source2: %{name}-script -Source3: http://www.antlr.org/share/1069557132934/makefile.gcj +Source3: makefile.gcj Source1000: antlr-rpmlintrc Patch0: %{name}-jedit.patch Patch1: gcc45fix.diff @@ -47,12 +45,6 @@ Requires: javapackages-tools Provides: %{name}-bootstrap = %{version} Obsoletes: %{name}-bootstrap < %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build -%py_requires - -# force package arch for SLE_11 -%if 0%{?suse_version} == 1110 -BuildArch: %{_arch} -%endif %description ANTLR, Another Tool for Language Recognition, (formerly PCCTS) is a @@ -61,12 +53,15 @@ compilers, and translators from grammatical descriptions containing C++ or Java actions (you can use PCCTS 1.xx to generate C-based parsers). # To not introduce arch dependent java package, lets have this in separate subpackage + %package java Summary: ANother Tool for Language Recognition (Manual) Group: Development/Tools/Other Requires: java >= 1.6.0 Provides: file:/%{_javadir}/%{name}.jar +%if 0%{?suse_version} > 1200 BuildArch: noarch +%endif %description java ANTLR, Another Tool for Language Recognition, (formerly PCCTS) is a @@ -79,7 +74,9 @@ This package provides the Java runtime for antlr %package manual Summary: ANother Tool for Language Recognition (Manual) Group: Development/Tools/Other +%if 0%{?suse_version} > 1200 BuildArch: noarch +%endif %description manual ANTLR, Another Tool for Language Recognition, (formerly PCCTS) is a @@ -92,8 +89,9 @@ This package provides the manual and examples for antlr. %package javadoc Summary: ANother Tool for Language Recognition (Java Documentation) Group: Development/Tools/Other -PreReq: coreutils +%if 0%{?suse_version} > 1200 BuildArch: noarch +%endif %description javadoc ANTLR, Another Tool for Language Recognition, (formerly PCCTS) is a @@ -114,14 +112,13 @@ language tool that provides a framework for constructing recognizers, compilers, and translators from grammatical descriptions containing C++ or Java actions (you can use PCCTS 1.xx to generate C-based parsers). -This package provides the C++ runtime (libantlr.a) and a headers files +This package provides the C++ runtime (libantlr.a) and a headers files of antlr %package -n python-%{name} Summary: ANother Tool for Language Recognition (python runtime) Group: Development/Tools/Other Requires: antlr -%py_requires %description -n python-%{name} Python support for generating your Lexers, Parsers and TreeParsers in Python. @@ -135,29 +132,24 @@ Haefelinger and Marq Kole. %setup -q # remove all binary libs find . -name "*.jar" -exec rm -f {} \; -%patch0 -p0 +%patch0 cp -p %{SOURCE1} build.xml #Fix the source so that it compiles with GCC 4.5 %patch1 -p1 #Ensure that the manuals are installed in the correct openSUSE docpath -%patch2 -p0 +%patch2 # check for license problematic files: find | grep "\(ShowString.java$\|StreamConverter.java$\)" && exit 42 %build -ant -Dj2se.apidoc=%{_javadocdir}/java +ant \ + -Dj2se.apidoc=%{_javadocdir}/java \ + -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 %configure -make +make -j1 %py_compile lib/python/antlr %install -# % {makeinstall} -# The upstream make install just installs a files to more or less random location -# instead of fixing it, let's install it in %%install section -%if 0%{?suse_version} == 1110 -export NO_BRP_CHECK_BYTECODE_VERSION=true -%endif - #### jars ### install -d -m 0755 %{buildroot}%{_javadir} cp -a work/lib/%{name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar @@ -188,22 +180,12 @@ install -d -m 0755 %{buildroot}%{_includedir}/%{name} install -m 0644 lib/cpp/%{name}/*hpp %{buildroot}%{_includedir}/%{name} ### find duplicates ### -find examples -type f | xargs chmod 0644 +find examples -type f | xargs chmod 0644 %fdupes -s examples -%clean -rm -rf %{buildroot} - -%check -# % {__make} check - -# % post -p /sbin/ldconfig - -# % postun -p /sbin/ldconfig - %files %defattr(0644,root,root,0755) -%doc LICENSE.txt README.txt CHANGES.txt +%doc LICENSE.txt README.txt CHANGES.txt %dir %{_datadir}/%{name}-%{version} %defattr(0755,root,root,0755) %{_bindir}/antlr @@ -233,6 +215,6 @@ rm -rf %{buildroot} %dir %{_datadir}/%{name}-%{version} %{_datadir}/%{name}-%{version}/*py %{_datadir}/%{name}-%{version}/*pyc -%py_sitedir/%{name} +%{py_sitedir}/%{name} %changelog