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

Changes of Revision 4

[-] Added apache2-mod_asn.spec
x
 
1
@@ -0,0 +1,98 @@
2
+#
3
+# spec file for package apache2-mod_asn
4
+#
5
+# Copyright (c) 2009 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
+Name:           apache2-mod_asn
15
+BuildRequires:  apache2-devel apache2-prefork apache2-worker
16
+%define apxs /usr/sbin/apxs2
17
+%define apache apache2
18
+%define apache_libexecdir %(%{apxs} -q LIBEXECDIR)
19
+%define apache_sysconfdir %(%{apxs} -q SYSCONFDIR)
20
+%define apache_includedir %(%{apxs} -q INCLUDEDIR)
21
+%define apache_serverroot %(%{apxs} -q PREFIX)
22
+%define apache_localstatedir %(%{apxs} -q LOCALSTATEDIR)
23
+%define apache_mmn        %(MMN=$(%{apxs} -q LIBEXECDIR)_MMN; test -x $MMN && $MMN)
24
+Version:        1.0
25
+Release:        0
26
+License:        Apache License, Version 2.0
27
+Group:          Productivity/Networking/Web/Servers
28
+Requires:       apache2 %{apache_mmn} 
29
+Autoreqprov:    on
30
+Summary:        mod_asn looks up the AS and network prefix of IP address
31
+#
32
+# http://svn.poeml.de/svn/mod_asn/trunk
33
+Source10:       mod_asn.c
34
+Source11:       mod_asn.conf
35
+Source20:       asn_import.py
36
+Source21:       asn_get_routeviews.py
37
+Source22:       asn.sql
38
+Source30:       README
39
+Source31:       INSTALL
40
+#
41
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
42
+
43
+%description
44
+
45
+mod_asn is an Apache module doing lookups of the autonomous system (AS)[1], and
46
+the network prefix[2] which contains a given (clients) IP address.
47
+
48
+It is written with scalability in mind. To do high-speed lookups, it uses the
49
+PostgreSQL ip4r datatype[3] that is indexable with a Patricia Trie[4] algorithm to
50
+store network prefixes. This is the only algorithm that can search through the
51
+~250.000 existing prefixes in a breeze.
52
+
53
+It comes with script to create such a database (and keep it up to date) with
54
+snapshots from global routing data - from a router's "view of the
55
+world", so to speak.
56
+
57
+Apache-internally, the module sets the looked up data as env table variables,
58
+for perusal by other Apache modules. In addition, it can send it as response
59
+headers to the client.
60
+
61
+It is published under the Apache License, Version 2.0.
62
+
63
+Source code can be obtained here: http://svn.poeml.de/svn/mod_asn/
64
+
65
+Links:
66
+[1] http://en.wikipedia.org/wiki/Autonomous_system_(Internet)
67
+[2] http://en.wikipedia.org/wiki/Subnetwork
68
+[3] http://pgfoundry.org/projects/ip4r/
69
+[4] http://en.wikipedia.org/wiki/Radix_tree
70
+
71
+Author: Peter Poeml
72
+
73
+
74
+%prep
75
+cp -p %{S:10} %{S:11} %{S:20} %{S:21} %{S:22} %{S:30} %{S:31} .
76
+
77
+%build
78
+%{apxs} -c mod_asn.c
79
+
80
+
81
+
82
+%install
83
+rm -rf $RPM_BUILD_ROOT
84
+mkdir -p $RPM_BUILD_ROOT/%{apache_libexecdir}
85
+cp -p .libs/mod_asn.so $RPM_BUILD_ROOT/%{apache_libexecdir}
86
+
87
+install -D -m 0755 asn_import.py $RPM_BUILD_ROOT/%{_bindir}/asn_import
88
+install -D -m 0755 asn_get_routeviews.py $RPM_BUILD_ROOT/%{_bindir}/asn_get_routeviews
89
+
90
+%files
91
+%defattr(-,root,root)
92
+%doc README
93
+%doc INSTALL
94
+%doc asn.sql
95
+%doc mod_asn.conf
96
+%{apache_libexecdir}/*.so
97
+%{_bindir}/*
98
+
99
+%changelog -n apache2-asn
100