pghmcfc pushed to GeoIP (el5). "Fix %post steps; add cron.weekly support."

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Apr 14 07:38:25 UTC 2015


>From 4a22bd9797a82417e2443b7dbbd9a7c8a91e9d70 Mon Sep 17 00:00:00 2001
From: Philip Prindeville <philipp at fedoraproject.org>
Date: Tue, 2 Apr 2013 16:34:25 -0600
Subject: Fix %post steps; add cron.weekly support.


diff --git a/GeoIP.spec b/GeoIP.spec
index 25fe7ac..6f7f407 100644
--- a/GeoIP.spec
+++ b/GeoIP.spec
@@ -10,6 +10,7 @@ Source1:	LICENSE.txt
 Source2:	fetch-geoipdata-city.pl
 Source3:	fetch-geoipdata.pl
 Source4:	README.Fedora
+Source5:	geoipupdate.cron
 Patch10:	GeoIP-1.5.0-UTF8.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildRequires:	zlib-devel
@@ -65,6 +66,9 @@ make %{?_smp_mflags}
 rm -rf %{buildroot}
 make DESTDIR=%{buildroot} install
 
+# fetch database updates weekly
+install -D -m755 %{SOURCE5} %{buildroot}%{_sysconfdir}/cron.weekly/geoipupdate
+
 # nix the stuff we don't need like .la files.
 rm -f %{buildroot}%{_libdir}/*.la
 
@@ -79,7 +83,8 @@ ln -sf GeoLiteCountry.dat %{buildroot}%{_datadir}/GeoIP/GeoIP.dat
 %clean
 rm -rf %{buildroot}
 
-%post -p /sbin/ldconfig
+%post
+/sbin/ldconfig
 geoipupdate 
 
 %postun -p /sbin/ldconfig
@@ -89,6 +94,7 @@ geoipupdate
 %doc AUTHORS COPYING ChangeLog README TODO LICENSE* fetch-*
 %config(noreplace) %{_sysconfdir}/GeoIP.conf.default
 %config(noreplace) %{_sysconfdir}/GeoIP.conf
+%{_sysconfdir}/cron.weekly/geoipupdate
 %{_bindir}/geoiplookup6
 %{_bindir}/geoiplookup
 %{_datadir}/GeoIP/
@@ -108,9 +114,9 @@ geoipupdate
 %{_includedir}/GeoIPCity.h
 %{_includedir}/GeoIPUpdate.h
 %{_libdir}/libGeoIP.so
+%{_libdir}/pkgconfig/geoip.pc
 # GPLv2+
 %{_libdir}/libGeoIPUpdate.so
-%{_libdir}/pkgconfig/geoip.pc
 
 %changelog
 * Mon Apr 02 2013 Philip Prindeville <philipp at fedoraproject.org> - 1.5.0-1
diff --git a/geoipupdate.cron b/geoipupdate.cron
new file mode 100644
index 0000000..383d82f
--- /dev/null
+++ b/geoipupdate.cron
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+geoipupdate
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/GeoIP.git/commit/?h=el5&id=4a22bd9797a82417e2443b7dbbd9a7c8a91e9d70


More information about the scm-commits mailing list