SPECS: jakarta-commons-codec.spec - unify java package; builds now
glen
glen at pld-linux.org
Wed Apr 18 00:05:03 CEST 2007
Author: glen Date: Tue Apr 17 22:05:02 2007 GMT
Module: SPECS Tag: HEAD
---- Log message:
- unify java package; builds now
---- Files affected:
SPECS:
jakarta-commons-codec.spec (1.6 -> 1.7)
---- Diffs:
================================================================
Index: SPECS/jakarta-commons-codec.spec
diff -u SPECS/jakarta-commons-codec.spec:1.6 SPECS/jakarta-commons-codec.spec:1.7
--- SPECS/jakarta-commons-codec.spec:1.6 Tue Feb 13 09:06:35 2007
+++ SPECS/jakarta-commons-codec.spec Wed Apr 18 00:04:56 2007
@@ -1,9 +1,8 @@
# $Revision$, $Date$
-%define base_name codec
-%define short_name commons-%{base_name}
+%include /usr/lib/rpm/macros.java
Summary: Jakarta Commons Codec Package
Summary(pl.UTF-8): Pakiet Jakarta Commons Codec
-Name: jakarta-%{short_name}
+Name: jakarta-commons-codec
Version: 1.3
Release: 3
License: Apache Software License
@@ -13,8 +12,12 @@
Patch0: %{name}-buildscript.patch
URL: http://jakarta.apache.org/commons/codec/
BuildRequires: ant >= 1.6.2
+BuildRequires: ant-junit
+BuildRequires: jpackage-utils
BuildRequires: junit
-Provides: %{short_name}
+BuildRequires: rpm-javaprov
+BuildRequires: rpmbuild(macros) >= 1.300
+Provides: commons-codec
Obsoletes: commons-codec
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -31,6 +34,7 @@
Summary: Javadoc for %{name}
Summary(pl.UTF-8): Dokumentacja javadoc dla pakietu %{name}
Group: Documentation
+Requires: jpackage-utils
%description javadoc
Javadoc for %{name}.
@@ -39,7 +43,9 @@
Dokumentacja javadoc dla pakietu %{name}.
%prep
-%setup -q -n commons-codec-%{version}
+%setup -qc
+touch LICENSE
+cd commons-codec-%{version}
# FIXME Remove SoundexTest which is failing
# and thus preventing the build to proceed.
@@ -47,58 +53,44 @@
%patch0 -p1
%build
-ant \
- -Dbuild.sysclasspath=first \
- -Dconf.home=src/conf \
- -Dbuild.home=build \
- -Dsource.home=src/java \
- -Dtest.home=src/test \
- -Ddist.home=dist \
- -Dcomponent.title=%{short_name} \
- -Dcomponent.version=%{version} \
- -Dfinal.name=%{name}-%{version} \
- -Dextension.name=%{short_name} \
- test jar javadoc
+cd commons-codec-%{version}
+
+export LC_ALL=en_US # source not in ASCII
+
+required_jars="junit"
+export CLASSPATH=$(build-classpath $required_jars)
+
+%ant dist
%install
rm -rf $RPM_BUILD_ROOT
+cd commons-codec-%{version}
# jars
install -d $RPM_BUILD_ROOT%{_javadir}
-cp -p dist/%{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}
-cd $RPM_BUILD_ROOT%{_javadir}
-for jar in *-%{version}*; do
- ln -sf ${jar} `echo $jar| sed "s|jakarta-||g"`
-done
-for jar in *-%{version}*; do
- ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
-done
-cd -
+cp -a dist/commons-codec-%{version}.jar $RPM_BUILD_ROOT%{_javadir}
+ln -s commons-codec-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/commons-codec.jar
# javadoc
install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-cp -pr dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+cp -a dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+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" = "0" ]; then
- rm -f %{_javadocdir}/%{name}
-fi
+ln -sf %{name}-%{version} %{_javadocdir}/%{name}
%files
%defattr(644,root,root,755)
-%doc RELEASE-NOTES.txt
-%{_javadir}/*
+%doc commons-codec-%{version}/RELEASE-NOTES.txt
+%{_javadir}/*.jar
%files javadoc
%defattr(644,root,root,755)
%{_javadocdir}/%{name}-%{version}
+%ghost %{_javadocdir}/%{name}
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -106,6 +98,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.7 2007/04/17 22:04:56 glen
+- unify java package; builds now
+
Revision 1.6 2007/02/13 08:06:35 glen
- tabs in preamble
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/jakarta-commons-codec.spec?r1=1.6&r2=1.7&f=u
More information about the pld-cvs-commit
mailing list