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