- new, based on jpackage
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 10 May 2006 22:13:09 +0000 (22:13 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    asm2.spec -> 1.1

asm2.spec [new file with mode: 0644]

diff --git a/asm2.spec b/asm2.spec
new file mode 100644 (file)
index 0000000..7505401
--- /dev/null
+++ b/asm2.spec
@@ -0,0 +1,80 @@
+Summary:       A code manipulation tool to implement adaptable systems
+Name:          asm2
+Version:       2.1
+Release:       0.1
+License:       BSD-style
+Group:         Development/Languages/Java
+URL:           http://asm.objectweb.org/
+Source0:       http://download.forge.objectweb.org/asm/asm-%{version}.tar.gz
+# Source0-md5: dfd62160a88f13e236f9da7d2485c9ec
+Source1:       http://asm.objectweb.org/current/asm-eng.pdf
+# Source1-md5: 5f17bfac3563feb108793575f74ce27c
+Source2:       http://asm.objectweb.org/doc/faq.html
+# Source2-md5: 556c0df057bced41517491784d556acc
+BuildRequires: jakarta-ant
+BuildRequires: objectweb-anttask
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+ASM is a code manipulation tool to implement adaptable systems.
+
+%package       javadoc
+Summary:       Javadoc for %{name}
+Group:         Documentation
+
+%description   javadoc
+Javadoc for %{name}.
+
+%prep
+%setup -q -n asm-%{version}
+find . -name "*.jar" -exec rm -f {} \;
+install -m 644 %{SOURCE1} .
+install -m 644 %{SOURCE2} .
+
+%build
+ant -Dobjectweb.ant.tasks.path=$(build-classpath objectweb-anttask) jar jdoc
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+# 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}`
+done
+
+(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for jar in *-%{version}*; do \
+ln -sf ${jar} $(echo $jar | sed -e s/-%{version}//); done)
+
+# javadoc
+install -p -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})
+
+%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
+
+%files
+%defattr(644,root,root,755)
+%doc README.txt faq.html asm-eng.pdf
+%dir %{_javadir}/%{name}
+%{_javadir}/%{name}/*.jar
+
+%files javadoc
+%defattr(644,root,root,755)
+%dir %{_javadocdir}/%{name}-%{version}
+%{_javadocdir}/%{name}-%{version}/*
+%ghost %dir %{_javadocdir}/%{name}
This page took 0.082716 seconds and 4 git commands to generate.