]> git.pld-linux.org Git - packages/apache-mod_geoip.git/commitdiff
- new; based on fedora package
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 10 Apr 2012 13:41:29 +0000 (13:41 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apache-mod_geoip.spec -> 1.1
    apache.conf -> 1.1

apache-mod_geoip.spec [new file with mode: 0644]
apache.conf [new file with mode: 0644]

diff --git a/apache-mod_geoip.spec b/apache-mod_geoip.spec
new file mode 100644 (file)
index 0000000..eba52ee
--- /dev/null
@@ -0,0 +1,59 @@
+%define                mod_name        geoip
+%define        apxs            %{_sbindir}/apxs
+Summary:       GeoIP module for the Apache HTTP Server
+Name:          apache-mod_%{mod_name}
+Version:       1.2.7
+Release:       1
+License:       ASL 1.1
+Group:         Daemons
+URL:           https://www.maxmind.com/app/mod_geoip
+Source0:       http://www.maxmind.com/download/geoip/api/mod_geoip2/mod_%{mod_name}2_%{version}.tar.gz
+# Source0-md5: 76514ad0e8adb8cd8231c5e3646d03fd
+Source1:       apache.conf
+BuildRequires: GeoIP-devel
+BuildRequires: %{apxs}
+BuildRequires: apache-devel >= 2.2
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires:      GeoIP
+Requires:      apache(modules-api) = %apache_modules_api
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
+%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
+
+%description
+mod_geoip is an Apache module for finding the country that a web
+request originated from. It uses the GeoIP library and database to
+perform the lookup. It is free software, licensed under the Apache
+license.
+
+%prep
+%setup -q -n mod_geoip2_%{version}
+
+%build
+%{apxs} -Wc,"%{rpmcflags}" -Wl,-lGeoIP -c mod_geoip.c
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
+install -Dp .libs/mod_geoip.so $RPM_BUILD_ROOT%{_pkglibdir}
+
+cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%service -q httpd restart
+
+%postun
+if [ "$1" = "0" ]; then
+       %service -q httpd restart
+fi
+
+
+%files
+%defattr(644,root,root,755)
+%doc INSTALL README* Changes
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
+%attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so
diff --git a/apache.conf b/apache.conf
new file mode 100644 (file)
index 0000000..7bf0f6a
--- /dev/null
@@ -0,0 +1,7 @@
+LoadModule geoip_module modules/mod_geoip.so
+
+<IfModule mod_geoip.c>
+  GeoIPEnable On
+GeoIPDBFile /usr/share/GeoIP/GeoIP.dat
+</IfModule>
+
This page took 0.066108 seconds and 4 git commands to generate.