9d2bc8c
%{!?_httpd_apxs:       %{expand: %%global _httpd_apxs       %%{_sbindir}/apxs}}
9d2bc8c
%{!?_httpd_mmn:        %{expand: %%global _httpd_mmn        %%(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel)}}
9d2bc8c
%{!?_httpd_confdir:    %{expand: %%global _httpd_confdir    %%{_sysconfdir}/httpd/conf.d}}
9d2bc8c
# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4
9d2bc8c
%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
48a2d21
a2841e7
%global namedreltag .Final
a2841e7
%global namedversion %{version}%{?namedreltag}
Marek Goldmann 5eedfbb
Marek Goldmann 5eedfbb
Summary:    Apache HTTP load balancer
Marek Goldmann 5eedfbb
Name:       mod_cluster
9230fbf
Version:    1.2.1
23976a8
Release:    5%{?dist}
Marek Goldmann 5eedfbb
License:    LGPLv2
Marek Goldmann 5eedfbb
URL:        http://jboss.org/mod_cluster
Marek Goldmann 5eedfbb
Group:      System Environment/Daemons
a2841e7
9230fbf
# svn export http://anonsvn.jboss.org/repos/mod_cluster/tags/1.2.1.Final/ mod_cluster-1.2.1.Final
9230fbf
# tar cafJ mod_cluster-1.2.1.Final.tar.xz mod_cluster-1.2.1.Final
9230fbf
Source:     mod_cluster-%{namedversion}.tar.xz
9230fbf
Marek Goldmann 5eedfbb
Source1:    mod_cluster.conf
Marek Goldmann 5eedfbb
Source2:    README.fedora
a2841e7
9230fbf
Patch0:     mod_cluster-%{namedversion}-pom.patch
Marek Goldmann 5eedfbb
Marek Goldmann 5eedfbb
Requires:      httpd >= 2.2.8
48a2d21
Requires:      httpd-mmn = %{_httpd_mmn}
a2841e7
Stanislav Ochotnicky 5af7398
BuildRequires: maven-local
9230fbf
BuildRequires: maven-enforcer-plugin
9230fbf
BuildRequires: jboss-parent
a2841e7
BuildRequires: jpackage-utils
a2841e7
BuildRequires: java-devel
a2841e7
BuildRequires: jcip-annotations
a2841e7
BuildRequires: jboss-logging
a2841e7
BuildRequires: jboss-servlet-3.0-api
a2841e7
BuildRequires: jboss-web
Marek Goldmann 5eedfbb
BuildRequires: httpd-devel >= 2.2.8
Marek Goldmann 5eedfbb
BuildRequires: autoconf
a2841e7
BuildRequires: make
a2841e7
BuildRequires: gcc
a2841e7
BuildRequires: tomcat-lib
Marek Goldmann 5eedfbb
Marek Goldmann 5eedfbb
%description
Marek Goldmann 5eedfbb
Mod_cluster is an httpd-based load balancer. Like mod_jk and mod_proxy,
Marek Goldmann 5eedfbb
mod_cluster uses a communication channel to forward requests from httpd to one
Marek Goldmann 5eedfbb
of a set of application server nodes. Unlike mod_jk and mod_proxy, mod_cluster
Marek Goldmann 5eedfbb
leverages an additional connection between the application server nodes and
Marek Goldmann 5eedfbb
httpd. The application server nodes use this connection to transmit server-side
Marek Goldmann 5eedfbb
load balance factors and lifecycle events back to httpd via a custom set of
Marek Goldmann 5eedfbb
HTTP methods, affectionately called the Mod-Cluster Management Protocol (MCMP).
Marek Goldmann 5eedfbb
This additional feedback channel allows mod_cluster to offer a level of
Marek Goldmann 5eedfbb
intelligence and granularity not found in other load balancing solutions.
Marek Goldmann 5eedfbb
a2841e7
%package java
a2841e7
Summary:          Java bindings for %{name}
a2841e7
Group:            Development/Libraries
a2841e7
Requires:         jpackage-utils
a2841e7
Requires:         jcip-annotations
a2841e7
Requires:         jboss-logging
a2841e7
Requires:         jboss-servlet-3.0-api
a2841e7
a2841e7
%description java
a2841e7
This package contains Java part of %{name}.
a2841e7
a2841e7
%package javadoc
a2841e7
Summary:          Javadocs for %{name}
a2841e7
Group:            Documentation
a2841e7
Requires:         jpackage-utils
Marek Goldmann 5eedfbb
a2841e7
%description javadoc
a2841e7
This package contains the API documentation for %{name}.
Marek Goldmann 5eedfbb
a2841e7
%prep
9230fbf
%setup -q -n mod_cluster-%{namedversion}
Marek Goldmann 5eedfbb
%patch0 -p1
Marek Goldmann 5eedfbb
Marek Goldmann 5eedfbb
%build
Marek Goldmann 5eedfbb
CFLAGS="$RPM_OPT_FLAGS"
Marek Goldmann 5eedfbb
export CFLAGS
Marek Goldmann 5eedfbb
Marek Goldmann 5eedfbb
module_dirs=( advertise mod_manager mod_proxy_cluster mod_slotmem )
Marek Goldmann 5eedfbb
Marek Goldmann 5eedfbb
for dir in ${module_dirs[@]} ; do
9230fbf
    pushd native/${dir}
Marek Goldmann 5eedfbb
        sh buildconf
9d2bc8c
        ./configure --libdir=%{_libdir} --with-apxs=%{_httpd_apxs}
Marek Goldmann 5eedfbb
        make %{?_smp_mflags}
Marek Goldmann 5eedfbb
    popd
Marek Goldmann 5eedfbb
done
Marek Goldmann 5eedfbb
a2841e7
# Build the AS7 required libs
a2841e7
# Tests skipped because of lack of mockito library
a2841e7
mvn-rpmbuild -Dmaven.test.skip=true -P AS7 install javadoc:aggregate
Marek Goldmann 5eedfbb
a2841e7
%install
Marek Goldmann 5eedfbb
install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/httpd/modules
a2841e7
install -d -m 755 $RPM_BUILD_ROOT/etc/httpd/conf.d
a2841e7
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
a2841e7
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
a2841e7
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
Marek Goldmann 5eedfbb
Marek Goldmann 5eedfbb
module_dirs=( advertise mod_manager mod_proxy_cluster mod_slotmem )
Marek Goldmann 5eedfbb
Marek Goldmann 5eedfbb
for dir in ${module_dirs[@]} ; do
9230fbf
    pushd native/${dir}
Marek Goldmann 5eedfbb
        cp ./*.so $RPM_BUILD_ROOT%{_libdir}/httpd/modules
Marek Goldmann 5eedfbb
    popd
Marek Goldmann 5eedfbb
done
Marek Goldmann 5eedfbb
Marek Goldmann 5eedfbb
cp -a %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/conf.d/
Marek Goldmann 5eedfbb
Marek Goldmann 5eedfbb
install -m 0644 %{SOURCE2} README
Marek Goldmann 5eedfbb
a2841e7
# JAR
a2841e7
cp -p core/target/mod_cluster-core-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/core.jar
a2841e7
cp -p container/catalina/target/mod_cluster-container-catalina-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/container-catalina.jar
a2841e7
cp -p container/jbossweb/target/mod_cluster-container-jbossweb-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/container-jbossweb.jar
a2841e7
cp -p container-spi/target/mod_cluster-container-spi-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}/container-spi.jar
a2841e7
a2841e7
# APIDOCS
a2841e7
cp -rp target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
a2841e7
a2841e7
# POM
a2841e7
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-parent.pom
a2841e7
install -pm 644 core/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-core.pom
832db55
install -pm 644 container/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-container.pom
a2841e7
install -pm 644 container-spi/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-container-spi.pom
a2841e7
install -pm 644 container/catalina/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-container-catalina.pom
a2841e7
install -pm 644 container/jbossweb/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-container-jbossweb.pom
Marek Goldmann 5eedfbb
a2841e7
# DEPMAP
a2841e7
%add_maven_depmap JPP.%{name}-parent.pom
a2841e7
%add_maven_depmap JPP.%{name}-core.pom %{name}/core.jar
a2841e7
%add_maven_depmap JPP.%{name}-container-spi.pom %{name}/container-spi.jar
832db55
%add_maven_depmap JPP.%{name}-container.pom
a2841e7
%add_maven_depmap JPP.%{name}-container-jbossweb.pom %{name}/container-jbossweb.jar
a2841e7
%add_maven_depmap JPP.%{name}-container-catalina.pom %{name}/container-catalina.jar
Marek Goldmann 5eedfbb
a2841e7
%files
Marek Goldmann 5eedfbb
%doc README
Marek Goldmann 5eedfbb
%doc lgpl.txt
Marek Goldmann 5eedfbb
%{_libdir}/httpd/modules/mod_advertise.so
Marek Goldmann 5eedfbb
%{_libdir}/httpd/modules/mod_manager.so
Marek Goldmann 5eedfbb
%{_libdir}/httpd/modules/mod_proxy_cluster.so
Marek Goldmann 5eedfbb
%{_libdir}/httpd/modules/mod_slotmem.so
Marek Goldmann 5eedfbb
%config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf
Marek Goldmann 5eedfbb
a2841e7
%files javadoc
a2841e7
%{_javadocdir}/%{name}
a2841e7
%doc lgpl.txt
a2841e7
a2841e7
%files java
a2841e7
%{_mavenpomdir}/*
a2841e7
%{_mavendepmapfragdir}/*
a2841e7
%{_javadir}/*
a2841e7
%doc lgpl.txt
a2841e7
Marek Goldmann 5eedfbb
%changelog
23976a8
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-5
23976a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
23976a8
Stanislav Ochotnicky 5af7398
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 1.2.1-4
Stanislav Ochotnicky 5af7398
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
Stanislav Ochotnicky 5af7398
- Replace maven BuildRequires with maven-local
Stanislav Ochotnicky 5af7398
940406c
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.1-3
940406c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
940406c
832db55
* Tue Jun 05 2012 Marek Goldmann <mgoldman@redhat.com> - 1.2.1-2
832db55
- Added missing container.pom
832db55
9230fbf
* Mon May 07 2012 Marek Goldmann <mgoldman@redhat.com> - 1.2.1-1
9230fbf
- Upstream release 1.2.1.Final
9230fbf
- Port to httpd 2.4, RHBZ#813871
9230fbf
a2841e7
* Wed Mar 28 2012 Marek Goldmann <mgoldman@redhat.com> - 1.2.0-1
a2841e7
- Upstream release 1.2.0.Final
a2841e7
- Add java subpackage with AS7 required jars
a2841e7
48a2d21
* Tue Mar 27 2012 Marek Goldmann <mgoldman@redhat.com> - 1.1.1-4
48a2d21
- Require httpd-mmn RHBZ#803068
48a2d21
267820a
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-3
267820a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
267820a
Marek Goldmann 5eedfbb
* Fri Mar 11 2011 Marek Goldmann <mgoldman@redhat.com> - 1.1.1-2
Marek Goldmann 5eedfbb
- Another round of cleanup in spec file
Marek Goldmann 5eedfbb
- Patch that disables compilation-time warnings
Marek Goldmann 5eedfbb
Marek Goldmann 5eedfbb
* Thu Mar 10 2011 Marek Goldmann <mgoldman@redhat.com> - 1.1.1-1
Marek Goldmann 5eedfbb
- Upstream release 1.1.1
Marek Goldmann 5eedfbb
- Cleanup in spec file
Marek Goldmann 5eedfbb
Marek Goldmann 5eedfbb
* Fri Nov 12 2010 Marek Goldmann <mgoldman@redhat.com> - 1.1.0-1
Marek Goldmann 5eedfbb
- Initial release
Marek Goldmann 5eedfbb