%global namedreltag -SNAPSHOT %global namedversion %{version}%{?namedreltag} Name: bcel5.3 Version: 5.3 Release: %mkrel 1 Summary: Bytecode Engineering Library Group: Development/Java License: ASL 2.0 Url: http://commons.apache.org/bcel/ # svn co -r417157 https://svn.apache.org/repos/asf/commons/proper/bcel/trunk/ bcel5.3 # tar czf bcel5.3-src-svn.tar.gz bcel5.3 Source0: %{name}-src-svn.tar.gz BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: junit BuildRequires: regexp BuildRequires: maven-compiler-plugin BuildRequires: maven-surefire-plugin Requires: regexp Requires: jpackage-utils Requires(post): jpackage-utils Requires(postun): jpackage-utils Requires: java BuildArch: noarch %description The Byte Code Engineering Library (formerly known as JavaClass) is intended to give users a convenient possibility to analyze, create, and manipulate (binary) Java class files (those ending with .class). Classes are represented by objects which contain all the symbolic information of the given class: methods, fields and byte code instructions, in particular. Such objects can be read from an existing file, be transformed by a program (e.g. a class loader at run-time) and dumped to a file again. An even more interesting application is the creation of classes from scratch at run-time. The Byte Code Engineering Library (BCEL) may be also useful if you want to learn about the Java Virtual Machine (JVM) and the format of Java .class files. BCEL is already being used successfully in several projects such as compilers, optimizers, obsfuscators and analysis tools, the most popular probably being the Xalan XSLT processor at Apache. %package javadoc Summary: Javadocs for %{name} Group: Development/Java Requires: jpackage-utils %description javadoc This package contains the API documentation for %{name} %prep %setup -q -n %{name} for f in $(find . -name "*.jar"); do mv $f $f.no done find . -name '*.class' -exec rm -rf {} \; sed -i 's/\r//' LICENSE.txt NOTICE.txt README.txt RELEASE-NOTES.txt TODO.JustIce %build mvn-rpmbuild -e install javadoc:aggregate %install [ %{buildroot} != / ] && rm -rf %{buildroot} mkdir -p %{buildroot}%{_javadir} install -m 644 target/bcel-%{namedversion}.jar \ %{buildroot}%{_javadir}/%{name}.jar mkdir -p %{buildroot}%{_javadocdir}/%{name} cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name} %files %{_javadir}/%{name}.jar %doc LICENSE.txt NOTICE.txt README.txt RELEASE-NOTES.txt TODO.JustIce %files javadoc %{_javadocdir}/%{name} %changelog * Wed Oct 26 2011 gil <gil> 5.3-1.mga2 + Revision: 158327 - imported package bcel5.3