SPECS: asm2.spec - unify java package; builds now
glen
glen at pld-linux.org
Wed Apr 18 01:33:12 CEST 2007
Author: glen Date: Tue Apr 17 23:33:12 2007 GMT
Module: SPECS Tag: HEAD
---- Log message:
- unify java package; builds now
---- Files affected:
SPECS:
asm2.spec (1.5 -> 1.6)
---- Diffs:
================================================================
Index: SPECS/asm2.spec
diff -u SPECS/asm2.spec:1.5 SPECS/asm2.spec:1.6
--- SPECS/asm2.spec:1.5 Mon Feb 12 23:09:09 2007
+++ SPECS/asm2.spec Wed Apr 18 01:33:03 2007
@@ -1,4 +1,5 @@
# $Revision$, $Date$
+%include /usr/lib/rpm/macros.java
Summary: A code manipulation tool to implement adaptable systems
Summary(pl.UTF-8): Narzędzie do obróbki kodu do implementowania systemów adaptacyjnych
Name: asm2
@@ -14,7 +15,9 @@
# Source2-md5: 556c0df057bced41517491784d556acc
URL: http://asm.objectweb.org/
BuildRequires: ant
+BuildRequires: jpackage-utils
BuildRequires: objectweb-anttask
+BuildRequires: rpmbuild(macros) >= 1.300
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -29,6 +32,7 @@
Summary: Javadoc for %{name}
Summary(pl.UTF-8): Dokumentacja javadoc dla pakietu %{name}
Group: Documentation
+Requires: jpackage-utils
%description javadoc
Javadoc for %{name}.
@@ -38,12 +42,14 @@
%prep
%setup -q -n asm-%{version}
-find . -name "*.jar" -exec rm -f {} \;
+find -name '*.jar' | xargs rm -vf
install -m 644 %{SOURCE1} .
install -m 644 %{SOURCE2} .
%build
-ant -Dobjectweb.ant.tasks.path=$(build-classpath objectweb-anttask) jar jdoc
+export LC_ALL=en_US # source not in ASCII
+%ant jar jdoc \
+ -Dobjectweb.ant.tasks.path=$(build-classpath objectweb-anttask)
%install
rm -rf $RPM_BUILD_ROOT
@@ -51,46 +57,32 @@
# jars
install -d $RPM_BUILD_ROOT%{_javadir}/%{name}
-for jar in output/dist/lib/*.jar; do
- newjar=$(echo $jar | sed /asm-/asm2-/)
- install ${jar} $RPM_BUILD_ROOT%{_javadir}/%{name}/`basename ${newjar}`
+for a in output/dist/lib/*.jar; do
+ jar=${a##*/}
+ cp -a output/dist/lib/$jar $RPM_BUILD_ROOT%{_javadir}/$jar
+ ln -s $jar $RPM_BUILD_ROOT%{_javadir}/${jar%%-%{version}.jar}.jar
done
-cd $RPM_BUILD_ROOT%{_javadir}/%{name}
-for jar in *-%{version}*; do
- ln -sf ${jar} $(echo $jar | sed -e s/-%{version}//)
-done
-cd -
-
# javadoc
install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr output/dist/doc/javadoc/user/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-cd $RPM_BUILD_ROOT%{_javadocdir}
-ln -sf %{name}-%{version} %{name}
+ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink
%clean
rm -rf $RPM_BUILD_ROOT
%post javadoc
-rm -f %{_javadocdir}/%{name}
-ln -s %{name}-%{version} %{_javadocdir}/%{name}
-
-%postun javadoc
-if [ $1 -eq 0 ]; then
- rm -f %{_javadocdir}/%{name}
-fi
+ln -sf %{name}-%{version} %{_javadocdir}/%{name}
%files
%defattr(644,root,root,755)
%doc README.txt faq.html asm-eng.pdf
-%dir %{_javadir}/%{name}
-%{_javadir}/%{name}/*.jar
+%{_javadir}/*.jar
%files javadoc
%defattr(644,root,root,755)
-%dir %{_javadocdir}/%{name}-%{version}
-%{_javadocdir}/%{name}-%{version}/*
-%ghost %dir %{_javadocdir}/%{name}
+%{_javadocdir}/%{name}-%{version}
+%ghost %{_javadocdir}/%{name}
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -98,6 +90,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.6 2007/04/17 23:33:03 glen
+- unify java package; builds now
+
Revision 1.5 2007/02/12 22:09:09 glen
- tabs in preamble
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/asm2.spec?r1=1.5&r2=1.6&f=u
More information about the pld-cvs-commit
mailing list