# # 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 mirrorbrain_user mirrorbrain %define mirrorbrain_group mirrorbrain %define apxs /usr/bin/apxs BuildRequires: apache-devel # BuildRequires: geoip BuildRequires: geoip-devel BuildRequires: apache-mod_form BuildRequires: python-devel # %define apache apache %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) # Name: mirrorbrain Summary: A download redirector and metalink generator # 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, poeml at mirrorbrain.org Version: 2.18.1 Release: %mkrel 5 License: Apache License 2.0, GPL Group: System/Servers # # v=2.8.1+r7675; rm -rf mirrorbrain-$v; osc rm *.tar.gz; svn export -q 'http://svn.mirrorbrain.org/svn/mirrorbrain/trunk' mirrorbrain-$v; tar czf mirrorbrain-$v.tar.gz mirrorbrain-$v; osc add mirrorbrain-$v.tar.gz Source: http://mirrorbrain.org/files/releases/mirrorbrain-%{version}.tar.gz # # %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True)")} %description This apache module redirects clients to mirror servers, using an SQL backend, and generates metalinks. See http://mirrorbrain.org/ Author: Peter Poeml <peter@poeml.de> %package -n apache-mod_mirrorbrain License: Apache License 2.0, GPL Summary: MirrorBrain redirector Apache module Group: System/Servers # see http://mirrorbrain.org/requirements Requires: apache >= 2.2.6 Requires: apr-util-dbd-pgsql Requires: geoip apache-mod_geoip # # for mod_form Requires: apache-mod_form # building with memcache support: %if %{?build_with_memcache:1}0 BuildRequires: apache-mod_memcache Requires: apache-mod_memcache %define memcache_cflags -DWITH_MEMCACHE %else %define memcache_cflags %nil %endif # this module was was split off in a separate package with 2.10.1. Require it # so that existing installations will keep having it installed. # the requires can be removed later (let's say, a few months after October '09) Requires: apache-mod_autoindex_mb Autoreqprov: on %description -n apache-mod_mirrorbrain MirrorBrain is a scalable download redirector. This package contains mod_mirrorbrain, the Apache module which represents the core of MirrorBrain. %package -n apache-mod_autoindex_mb License: Apache License 2.0, GPL Summary: Apache module generating directory indexes for MirrorBrain Group: System/Servers Requires: apache-mod_mirrorbrain Autoreqprov: on %description -n apache-mod_autoindex_mb This package contains mod_autoindex_mb, the Apache module which represents the core of MirrorBrain. This package contains mod_autoindex_mb, which is a patched mod_autoindex. It adds a little further capability as index option. It adds these two options: <IfModule mod_autoindex_mb.c> IndexOptions Metalink IndexOptions Mirrorlist </IfModule> The Metalink option adds a link named "Metalink" to the index, which links to the same file but with ".metalink" appended. The MirrorList option adds a link named "Mirrors" to the index, which links to the same resources but with "?mirrorlist" appended. %package tools License: Apache License 2.0, GPL Summary: MirrorBrain commandline tools Group: System/Servers Requires: python-mb python-cmdln python-sqlobject python-psycopg2 Requires: geoip %description tools MirrorBrain is a scalable download redirector. This package contains utilities provided by the MirrorBrain framework to maintain the database and scan mirrors. %package -n python-mb License: Apache License 2.0, GPL Summary: mb, a Python module used by the MirrorBrain commandline tools Group: System/Servers Requires: python-sqlobject python-psycopg2 Requires: geoip %description -n python-mb MirrorBrain is a scalable download redirector. This package contains a Python module (named "mb") for easily maintaining MirrorBrain. %package scanner License: Apache License 2.0, GPL Summary: MirrorBrain scanner Group: System/Servers Requires: perl-Config-IniFiles perl-libwww-perl perl-Digest-MD4 perl-DBD-Pg perl-TimeDate %description scanner MirrorBrain is a scalable download redirector. This package contains the mirror scanner. %prep %setup -q -n mirrorbrain-%{version} %build cd mod_mirrorbrain %{apxs} -c -Wc,"%memcache_cflags -Wall -g" -lm 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 -o geoiplookup_continent geoiplookup_continent.c -lGeoIP gcc $RPM_OPT_FLAGS -Wall -o geoiplookup_city geoiplookup_city.c -lGeoIP cd ../mb 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/bdecode $RPM_BUILD_ROOT/%{_bindir}/bdecode install -D -m 755 tools/rsyncinfo $RPM_BUILD_ROOT/%{_bindir}/rsyncinfo install -D -m 755 tools/rsyncusers $RPM_BUILD_ROOT/%{_bindir}/rsyncusers 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/null-rsync $RPM_BUILD_ROOT/%{_bindir}/null-rsync # install -D -m 755 tools/push2mirrors $RPM_BUILD_ROOT/%{_bindir}/push2mirrors install -D -m 755 tools/scanner.pl $RPM_BUILD_ROOT/%{_bindir}/scanner install -D -m 755 mirrorprobe/mirrorprobe.py $RPM_BUILD_ROOT/%{_bindir}/mirrorprobe install -D -m 755 tools/mirrorprobe-logrotate $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/mirrorprobe cd mb %{__python} setup.py install --prefix=%{_prefix} --root %{buildroot} #ln -s mb %{buildroot}/%{_bindir}/mirrordoctor # only for backwards compatibility; removal at end of 2010 # 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/ # log directory mkdir -p $RPM_BUILD_ROOT/%{_var}/log/mirrorbrain %pre %_pre_useradd %{mirrorbrain_user} %{_sysconfdir}/mirrorbrain /bin/false %postun %_postun_userdel %{mirrorbrain_user} %files %doc COPYING FAQ TODO %doc mod_autoindex_mb/NOTICE %doc mod_mirrorbrain/*.conf %doc docs %doc sql %doc tools/push2mirrors %dir %attr(750,%{mirrorbrain_user},%{mirrorbrain_group}) %{_var}/log/mirrorbrain %files -n apache-mod_mirrorbrain %{apache_libexecdir}/mod_mirrorbrain.so %files -n apache-mod_autoindex_mb %{apache_libexecdir}/mod_autoindex_mb.so %files tools %{_bindir}/bdecode %{_bindir}/create_timestamp %{_bindir}/geoip-lite-update %{_bindir}/geoiplookup_city %{_bindir}/geoiplookup_continent #{_bindir}/mirrordoctor %{_bindir}/mirrorprobe %{_bindir}/null-rsync %{_bindir}/rsyncinfo %{_bindir}/rsyncusers %config(noreplace) %{_sysconfdir}/logrotate.d/mirrorprobe # Icons /usr/share/mirrorbrain %files -n python-mb %{_bindir}/mb %{python_sitearch}/* %files scanner %{_bindir}/scanner %changelog * Wed Oct 15 2014 umeabot <umeabot> 2.18.1-5.mga5 + Revision: 739648 - Second Mageia 5 Mass Rebuild * Sat Sep 27 2014 tv <tv> 2.18.1-4.mga5 + Revision: 727317 - rebuild for missing pythoneggs deps * Tue Sep 16 2014 umeabot <umeabot> 2.18.1-3.mga5 + Revision: 682531 - Mageia 5 Mass Rebuild + pterjan <pterjan> - Rebuild for new Python * Fri May 30 2014 ovitters <ovitters> 2.18.1-1.mga5 + Revision: 628011 - new version 2.18.1 * Tue Oct 22 2013 ovitters <ovitters> 2.17.0-1.mga4 + Revision: 546346 - imported package mirrorbrain