packages apache-directory-naming.spec
      Pages: < 1 >  DOWNLOAD      
Name:          apache-directory-naming
Version:       0.8
Release:       1mamba
Summary:       Apache Directory Naming Component
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://directory.apache.org/

# svn export -r 124846 http://svn.apache.org/repos/asf/directory/sandbox/dormant-subprojects/naming/ directory-naming-0.8
Source0:       directory-naming-%{version}-src-svn.tar.gz

Source1:       http://repo1.maven.org/maven2/directory-naming/naming-core/%{version}/naming-core-%{version}.pom
Source2:       http://repo1.maven.org/maven2/directory-naming/naming-config/%{version}/naming-config-%{version}.pom
Source3:       http://repo1.maven.org/maven2/directory-naming/naming-factory/%{version}/naming-factory-%{version}.pom
Source4:       http://repo1.maven.org/maven2/directory-naming/naming-java/%{version}/naming-java-%{version}.pom
Source5:       http://repo1.maven.org/maven2/directory-naming/naming-management/%{version}/naming-management-%{version}.pom
Source6:       http://repo1.maven.org/maven2/directory-naming/naming-resources/%{version}/naming-resources-%{version}.pom

Patch0:        apache-directory-naming-0.8-project_xml.patch

License:       Apache Software License Version 2.0

BuildRequires: apache-ant
BuildRequires: apache-ant-junit
# javamail
BuildRequires: apache-geronimo-1.2-specs
BuildRequires: jakarta-commons-beanutils
BuildRequires: jakarta-commons-collections
BuildRequires: jakarta-commons-dbcp121
BuildRequires: jakarta-commons-digester
BuildRequires: jakarta-commons-lang
BuildRequires: jakarta-commons-logging
BuildRequires: jakarta-commons-pool
BuildRequires: java-classpathx-mail
BuildRequires: java-hsqldb
BuildRequires: java-junit3
BuildRequires: java-mx4j
BuildRequires: jpackage-utils

Requires:      apache-geronimo-1.2-specs
Requires:      jakarta-commons-beanutils
Requires:      jakarta-commons-collections
Requires:      jakarta-commons-dbcp121
Requires:      jakarta-commons-digester
Requires:      jakarta-commons-lang
Requires:      jakarta-commons-logging
Requires:      jakarta-commons-pool
Requires:      java-mx4j
Requires:      jpackage-utils

BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
Apache Directory Naming is a re-usable JNDI component.

%package javadoc
Group:          Documentation
Summary:        Javadoc for %{name}

%description javadoc
Apache Directory Naming is a re-usable JNDI component.

This package contains javadoc for %{name}.

%prep

%setup -q -n directory-naming-%{version}

for j in $(find . -name "*.jar"); do
	mv $j $j.no
done


mkdir -p naming-core/target/lib
ln -sf $(build-classpath commons-logging) naming-core/target/lib/commons-logging-1.0.3.jar
ln -sf $(build-classpath junit-3.8.2) naming-core/target/lib/junit-3.8.1.jar
mkdir -p naming-java/target/lib
ln -sf $(build-classpath commons-logging) naming-java/target/lib/commons-logging-1.0.3.jar
ln -sf $(build-classpath junit-3.8.2) naming-java/target/lib/junit-3.8.1.jar
mkdir -p naming-factory/target/lib
ln -sf $(build-classpath commons-logging) naming-factory/target/lib/commons-logging-1.0.3.jar
ln -sf $(build-classpath junit-3.8.2) naming-factory/target/lib/junit-3.8.1.jar
ln -sf $(build-classpath geronimo/javamail-1.3.1-api) naming-factory/target/lib/geronimo-spec-javamail-1.3.1-rc1.jar
mkdir -p naming-management/target/lib
ln -sf $(build-classpath mx4j/mx4j-jmx) naming-management/target/lib/mx4j-jmx-1.1.1.jar
ln -sf $(build-classpath junit-3.8.2) naming-management/target/lib/junit-3.8.1.jar
mkdir -p naming-resources/target/lib
ln -sf $(build-classpath commons-logging) naming-resources/target/lib/commons-logging-1.0.3.jar
ln -sf $(build-classpath junit-3.8.2) naming-resources/target/lib/junit-3.8.1.jar
mkdir -p naming-config/target/lib
ln -sf $(build-classpath commons-logging) naming-config/target/lib/commons-logging-1.0.3.jar
ln -sf $(build-classpath commons-lang) naming-config/target/lib/commons-lang-1.0.1.jar
ln -sf $(build-classpath commons-digester) naming-config/target/lib/commons-digester-1.4.1.jar
ln -sf $(build-classpath commons-beanutils) naming-config/target/lib/commons-beanutils-1.6.1.jar
ln -sf $(build-classpath commons-collections) naming-config/target/lib/commons-collections-3.1.jar
ln -sf $(build-classpath commons-dbcp121) naming-config/target/lib/commons-dbcp-1.0.jar
ln -sf $(build-classpath commons-pool) naming-config/target/lib/commons-pool-1.0.1.jar
ln -sf $(build-classpath hsqldb) naming-config/target/lib/hsqldb-1.7.1.jar
ln -sf $(build-classpath junit-3.8.2) naming-config/target/lib/junit-3.8.1.jar

%patch0 -p1

%build

export CLASSPATH=
CLASSPATH=$CLASSPATH:$(build-classpath commons-beanutils commons-collections) \
CLASSPATH=$CLASSPATH:$(build-classpath commons-dbcp121 commons-digester)
CLASSPATH=$CLASSPATH:$(build-classpath commons-lang commons-logging commons-pool)
CLASSPATH=$CLASSPATH:$(build-classpath hsqldb geronimo/javamail-1.3.1-api)
CLASSPATH=$CLASSPATH:$(build-classpath ant/ant-junit junit-3.8.2 mx4j/mx4j-jmx)
CLASSPATH=$CLASSPATH:$(pwd)/naming-config/target/classes:$(pwd)/naming-config/target/test-classes
CLASSPATH=$CLASSPATH:$(pwd)/naming-core/target/classes:$(pwd)/naming-core/target/test-classes
CLASSPATH=$CLASSPATH:$(pwd)/naming-factory/target/classes:$(pwd)/naming-factory/target/test-classes
CLASSPATH=$CLASSPATH:$(pwd)/naming-java/target/classes:$(pwd)/naming-java/target/test-classes
CLASSPATH=$CLASSPATH:$(pwd)/naming-management/target/classes:$(pwd)/naming-management/target/test-classes
CLASSPATH=$CLASSPATH:$(pwd)/naming-resources/target/classes:$(pwd)/naming-resources/target/test-classes
#FIXME failed to create task or type setproxy
for f in $(find . -name build.xml); do
    	sed -i "s|<setproxy>|<!-- <setproxy> -->|g" $f
    	sed -i "s|</setproxy>|<!-- </setproxy> -->|g" $f
done;
ant -Dbuild.sysclasspath=only jar javadoc
#ant jar javadoc

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_javadir}/directory-naming

for p in naming-config naming-core naming-factory naming-java \
        naming-management naming-resources ; do

	install -m 644 $p/target/$p-%{version}.jar \
		%{buildroot}%{_javadir}/directory-naming/$p-%{version}.jar
done

(
	cd %{buildroot}%{_javadir}/directory-naming
	for jar in *-%{version}*; do 
		ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`
	done
)

mkdir -p %{buildroot}%{_datadir}/maven2/poms
install -m 644 %{SOURCE1}  %{buildroot}%{_datadir}/maven2/poms/JPP.directory-naming-naming-core.pom
%add_to_maven_depmap directory-naming naming-core %{version} JPP/directory-naming naming-core
install -m 644 %{SOURCE2}  %{buildroot}%{_datadir}/maven2/poms/JPP.directory-naming-naming-config.pom
%add_to_maven_depmap directory-naming naming-config %{version} JPP/directory-naming naming-config
install -m 644 %{SOURCE3}  %{buildroot}%{_datadir}/maven2/poms/JPP.directory-naming-naming-factory.pom
%add_to_maven_depmap directory-naming naming-factory %{version} JPP/directory-naming naming-factory
install -m 644 %{SOURCE4}  %{buildroot}%{_datadir}/maven2/poms/JPP.directory-naming-naming-java.pom
%add_to_maven_depmap directory-naming naming-java %{version} JPP/directory-naming naming-java
install -m 644 %{SOURCE5}  %{buildroot}%{_datadir}/maven2/poms/JPP.directory-naming-naming-management.pom
%add_to_maven_depmap directory-naming naming-management %{version} JPP/directory-naming naming-management
install -m 644 %{SOURCE6} %{buildroot}%{_datadir}/maven2/poms/JPP.directory-naming-naming-resources.pom
%add_to_maven_depmap directory-naming naming-resources %{version} JPP/directory-naming naming-resources

for p in naming-config naming-core naming-factory naming-java \
        naming-management naming-resources ; do
	doc=$(echo $p| sed  "s|naming-||g")
	mkdir -p %{buildroot}%{_javadocdir}/directory-naming-%{version}/$doc
	cp -pr  $p/dist/docs/api/* %{buildroot}%{_javadocdir}/directory-naming-%{version}/$doc
done

mkdir -p %{buildroot}%{_javadocdir}/directory-naming-%{version}
cp -pr dist/docs/api/* %{buildroot}%{_javadocdir}/directory-naming-%{version}
ln -sf directory-naming-%{version} %{buildroot}%{_javadocdir}/directory-naming

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%dir %{_javadir}/directory-naming
%{_javadir}/directory-naming/naming-config-%{version}.jar
%{_javadir}/directory-naming/naming-config.jar
%{_javadir}/directory-naming/naming-core-%{version}.jar
%{_javadir}/directory-naming/naming-core.jar
%{_javadir}/directory-naming/naming-factory-%{version}.jar
%{_javadir}/directory-naming/naming-factory.jar
%{_javadir}/directory-naming/naming-java-%{version}.jar
%{_javadir}/directory-naming/naming-java.jar
%{_javadir}/directory-naming/naming-management-%{version}.jar
%{_javadir}/directory-naming/naming-management.jar
%{_javadir}/directory-naming/naming-resources-%{version}.jar
%{_javadir}/directory-naming/naming-resources.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc *.txt

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/directory-naming-%{version}
%{_javadocdir}/directory-naming

%changelog
* Sat Jul 25 2009 gil <puntogil@...> 0.8-1mamba
- package created by autospec