Logoj0ke.net Open Build Service > Projects > Apache:Modules > apache2-mod_zrkadlo > Changes
Sign Up | Log In

Changes of Revision 2

[-] Added apache2-mod_zrkadlo.spec
x
 
1
@@ -0,0 +1,107 @@
2
+#
3
+# spec file for package apache2-mod_zrkadlo (Version 1.0)
4
+#
5
+# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
6
+# This file and all modifications and additions to the pristine
7
+# package are under the same license as the package itself.
8
+#
9
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
10
+#
11
+
12
+# norootforbuild
13
+
14
+%define apxs /usr/sbin/apxs2
15
+%define apache apache2
16
+%define apache_libexecdir %(%{apxs} -q LIBEXECDIR)
17
+%define apache_sysconfdir %(%{apxs} -q SYSCONFDIR)
18
+%define apache_includedir %(%{apxs} -q INCLUDEDIR)
19
+%define apache_serverroot %(%{apxs} -q PREFIX)
20
+%define apache_localstatedir %(%{apxs} -q LOCALSTATEDIR)
21
+%define apache_mmn        %(MMN=$(%{apxs} -q LIBEXECDIR)_MMN; test -x $MMN && $MMN)
22
+Name:           apache2-mod_zrkadlo
23
+Summary:        A download redirector
24
+BuildRequires:  apache2-devel apache2-prefork GeoIP GeoIP-devel apache2-webthings-collection
25
+BuildRequires:  apache2-mod_memcache
26
+BuildRequires:  python-devel
27
+Version:        2.2
28
+Release:        0
29
+License:        Apache License 2.0
30
+Group:          Productivity/Networking/Web/Servers
31
+#Source1:        mod_zrkadlo.c
32
+Requires:       apache2 %{apache_mmn} 
33
+#
34
+# for mod_form
35
+Requires:       apache2-webthings-collection
36
+Requires:       apache2-mod_memcache
37
+#
38
+# for the tools:
39
+Requires:       python-mysql python-sqlobject python-cmdln perl-Config-IniFiles
40
+#
41
+Autoreqprov:    on
42
+#
43
+# svn export 'https://forgesvn1.novell.com/svn/opensuse/trunk/tools/download-redirector-v2' download-redirector-v2; tar czf download-redirector-v2.tar.gz download-redirector-v2
44
+Source:         download-redirector-v2.tar.gz
45
+#
46
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
47
+
48
+%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
49
+
50
+%description
51
+This apache module redirects clients to mirror servers, using an SQL backend.
52
+
53
+The package contains also 
54
+* tools to maintain the mirror database
55
+* mirror monitoring
56
+* mirror scanning
57
+
58
+(The tools should be split into a subpackage in fact...)
59
+
60
+Author: Peter Poeml <poeml@suse.de>
61
+
62
+%prep
63
+%setup -n download-redirector-v2
64
+
65
+%build
66
+cd mod_zrkadlo
67
+%{apxs} -c -lGeoIP -Wc,"-Wall -g" mod_zrkadlo.c
68
+gcc $RPM_OPT_FLAGS -Wall -lGeoIP -o geoiplookup_continent geoiplookup_continent.c
69
+cd ../mod_autoindex_mb
70
+%{apxs} -c -Wc,"-Wall -g" mod_autoindex_mb.c
71
+cd ../mirrordoctor
72
+CFLAGS="%{optflags}" \
73
+%{__python} setup.py build
74
+
75
+
76
+%install
77
+mkdir -p $RPM_BUILD_ROOT/%{apache_libexecdir}
78
+cp -p mod_zrkadlo/.libs/mod_zrkadlo.so $RPM_BUILD_ROOT/%{apache_libexecdir}
79
+cp -p mod_autoindex_mb/.libs/mod_autoindex_mb.so $RPM_BUILD_ROOT/%{apache_libexecdir}
80
+install -D -m 755 mod_zrkadlo/geoiplookup_continent $RPM_BUILD_ROOT/%{_bindir}/geoiplookup_continent
81
+# tools
82
+install -D -m 755 tools/set_mirror_score $RPM_BUILD_ROOT/%{_bindir}/set_mirror_score
83
+install -D -m 755 tools/rsyncinfo.py $RPM_BUILD_ROOT/%{_bindir}/rsyncinfo
84
+install -D -m 755 tools/rsyncusers $RPM_BUILD_ROOT/%{_bindir}/rsyncusers
85
+install -D -m 755 tools/metalink-hasher.py $RPM_BUILD_ROOT/%{_bindir}/metalink-hasher
86
+install -D -m 755 tools/geoip-lite-update $RPM_BUILD_ROOT/%{_bindir}/geoip-lite-update
87
+install -D -m 755 scanner/scanner.pl $RPM_BUILD_ROOT/%{_bindir}/scanner
88
+install -D -m 755 mirrorprobe/mirrorprobe.py $RPM_BUILD_ROOT/%{_bindir}/mirrorprobe
89
+# compat for previous name
90
+ln -s mirrorprobe $RPM_BUILD_ROOT/%{_bindir}/pingd
91
+cd mirrordoctor
92
+%{__python} setup.py install --prefix=%{_prefix} --root %{buildroot}
93
+ln -s mirrordoctor.py %{buildroot}/%{_bindir}/mirrordoctor
94
+ln -s mirrordoctor.py %{buildroot}/%{_bindir}/mb
95
+
96
+
97
+
98
+%files
99
+%defattr(-,root,root)
100
+%{apache_libexecdir}/*.so
101
+%doc ABOUT BUGS INSTALL THANKS FAQ TODO NEWS
102
+%doc mod_autoindex_mb/NOTICE
103
+%doc mod_zrkadlo/*.conf
104
+%doc sql
105
+%{_bindir}/*
106
+%{python_sitelib}/*
107
+
108
+%changelog -n apache2-mod_zrkadlo
109