Search
j0ke.net Open Build Service
>
Projects
>
Apache
:
Modules
>
apache2-mod_mirrorbrain
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 2
[-]
[+]
Added
apache2-mod_mirrorbrain.spec
@@ -0,0 +1,189 @@ +# +# spec file for package mirrorbrain +# +# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +%define apxs /usr/sbin/apxs2 +%define apache apache2 +%define apache_libexecdir %(%{apxs} -q LIBEXECDIR) +%define apache_sysconfdir %(%{apxs} -q SYSCONFDIR) +%define apache_includedir %(%{apxs} -q INCLUDEDIR) +%define apache_serverroot %(%{apxs} -q PREFIX) +%define apache_localstatedir %(%{apxs} -q LOCALSTATEDIR) +%define apache_mmn %(MMN=$(%{apxs} -q LIBEXECDIR)_MMN; test -x $MMN && $MMN) +Name: mirrorbrain +Summary: A download redirector and metalink generator +BuildRequires: apache2-devel apache2-prefork GeoIP GeoIP-devel apache2-webthings-collection python-devel +# to build a man page, we need to have the script functional, and thus we need more stuff +# but python-cmdln is not available +#BuildRequires: help2man python-cmdln +Url: http://mirrorbrain.org/ +Packager: Peter Poeml, mirrorbrain at mirrorbrain.org +Version: 2.8 +Release: 0 +License: Apache License 2.0, GPL +Group: Productivity/Networking/Web/Servers +# +# v=2.7; rm -rf mirrorbrain-$v; svn export -q 'https://forgesvn1.novell.com/svn/opensuse/trunk/tools/download-redirector-v2' mirrorbrain-$v; tar czf mirrorbrain-$v.tar.gz mirrorbrain-$v +Source: http://mirrorbrain.org/files/releases/mirrorbrain-%{version}.tar.gz +# +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + +%description +This apache module redirects clients to mirror servers, using an SQL backend, +and generates metalinks. + +See http://mirrorbrain.org/ + +The package contains also +* tools to maintain the mirror database +* mirror monitoring +* mirror scanning + +(The tools should be split into a subpackage in fact...) + +Author: Peter Poeml <poeml@suse.de> + +%package -n apache2-mod_mirrorbrain +License: Apache License 2.0, GPL +Summary: MirrorBrain redirector Apache module +Obsoletes: apache2-mod_zrkadlo +Group: Productivity/Networking/Web/Servers +# see http://mirrorbrain.org/requirements +Requires: apache2 >= 2.2.6 +Requires: %{apache_mmn} +Requires: libapr-util1 >= 1.3.0 +Requires: GeoIP apache2-mod_geoip +# +# for mod_form +Requires: apache2-webthings-collection +# building with memcache support: +%if %{?build_with_memcache:1}0 +BuildRequires: apache2-mod_memcache +Requires: apache2-mod_memcache +%define memcache_cflags -DWITH_MEMCACHE +%else +%define memcache_cflags %nil +%endif +Autoreqprov: on + + +%description -n apache2-mod_mirrorbrain +Utilities provided by the MirrorBrain framework to maintain the database and +scan mirrors. + + +%package tools +License: Apache License 2.0, GPL +Summary: MirrorBrain utilities +Group: Productivity/Networking/Web/Servers +Requires: python-psycopg2 python-sqlobject python-cmdln +Requires: GeoIP + +%description tools +Utilities provided by the MirrorBrain framework to maintain the database and +scan mirrors. + + +%package scanner +License: Apache License 2.0, GPL +Summary: MirrorBrain scanner +Group: Productivity/Networking/Web/Servers +Requires: perl-Config-IniFiles perl-libwww-perl perl-Digest-MD4 perl-DBD-Pg + +%description scanner +Utilities provided by the MirrorBrain framework to maintain the database and +scan mirrors. + + + +%prep +%setup -n mirrorbrain-%{version} + +%build +cd mod_mirrorbrain +%{apxs} -c -Wc,"%memcache_cflags -Wall -g" mod_mirrorbrain.c +cd ../mod_autoindex_mb +%{apxs} -c -Wc,"%memcache_cflags -Wall -g" mod_autoindex_mb.c +cd ../tools +gcc $RPM_OPT_FLAGS -Wall -lGeoIP -o geoiplookup_continent geoiplookup_continent.c +gcc $RPM_OPT_FLAGS -Wall -lGeoIP -o geoiplookup_city geoiplookup_city.c +cd ../mirrordoctor +CFLAGS="%{optflags}" \ +%{__python} setup.py build + + +%install +mkdir -p $RPM_BUILD_ROOT/%{apache_libexecdir} +cp -p mod_mirrorbrain/.libs/mod_mirrorbrain.so $RPM_BUILD_ROOT/%{apache_libexecdir} +cp -p mod_autoindex_mb/.libs/mod_autoindex_mb.so $RPM_BUILD_ROOT/%{apache_libexecdir} +# tools +install -D -m 755 tools/geoiplookup_continent $RPM_BUILD_ROOT/%{_bindir}/geoiplookup_continent +install -D -m 755 tools/geoiplookup_city $RPM_BUILD_ROOT/%{_bindir}/geoiplookup_city +install -D -m 755 tools/rsyncinfo.py $RPM_BUILD_ROOT/%{_bindir}/rsyncinfo +install -D -m 755 tools/rsyncusers $RPM_BUILD_ROOT/%{_bindir}/rsyncusers +install -D -m 755 tools/metalink-hasher.py $RPM_BUILD_ROOT/%{_bindir}/metalink-hasher +install -D -m 755 tools/geoip-lite-update $RPM_BUILD_ROOT/%{_bindir}/geoip-lite-update +install -D -m 755 tools/create_timestamp $RPM_BUILD_ROOT/%{_bindir}/create_timestamp +install -D -m 755 tools/scanner.pl $RPM_BUILD_ROOT/%{_bindir}/scanner +install -D -m 755 mirrorprobe/mirrorprobe.py $RPM_BUILD_ROOT/%{_bindir}/mirrorprobe +cd mirrordoctor +%{__python} setup.py install --prefix=%{_prefix} --root %{buildroot} +ln -s mirrordoctor.py %{buildroot}/%{_bindir}/mirrordoctor +ln -s mirrordoctor.py %{buildroot}/%{_bindir}/mb +# man page for mb tool +#%{buildroot}/%{_bindir}/mb --version +#help2man --no-info %{buildroot}/%{_bindir}/mb > mb.1 +# Icons +mkdir -p $RPM_BUILD_ROOT/usr/share/mirrorbrain +cp -a famfamfam_flag_icons $RPM_BUILD_ROOT/usr/share/mirrorbrain/ + + + + +%files +%defattr(-,root,root) +%doc ABOUT BUGS COPYING INSTALL THANKS FAQ TODO NEWS +%doc mod_autoindex_mb/NOTICE +%doc mod_mirrorbrain/*.conf +%doc sql + +%files -n apache2-mod_mirrorbrain +%defattr(-,root,root) +%{apache_libexecdir}/mod_autoindex_mb.so +%{apache_libexecdir}/mod_mirrorbrain.so + +%files tools +%defattr(-,root,root) +%{python_sitelib}/* +%{_bindir}/create_timestamp +%{_bindir}/geoip-lite-update +%{_bindir}/geoiplookup_city +%{_bindir}/geoiplookup_continent +%{_bindir}/mb +%{_bindir}/metalink-hasher +%{_bindir}/mirrordoctor +%{_bindir}/mirrordoctor.py +%{_bindir}/mirrorprobe +%{_bindir}/rsyncinfo +%{_bindir}/rsyncusers +# Icons +/usr/share/mirrorbrain + +%files scanner +%defattr(-,root,root) +%{_bindir}/scanner + + + + +%changelog -n apache2-mod_mirrorbrain