summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sping@gentoo.org>2010-03-10 16:13:36 +0000
committerSebastian Pipping <sping@gentoo.org>2010-03-10 16:13:36 +0000
commitdedb1b5bab3c5346260fc96f6d72b55d84333515 (patch)
treea310f0e914b02a387060559f5cb723f5edc16930 /app-admin/geolizer
parentAutomated update of use.local.desc (diff)
downloadgentoo-2-dedb1b5bab3c5346260fc96f6d72b55d84333515.tar.gz
gentoo-2-dedb1b5bab3c5346260fc96f6d72b55d84333515.tar.bz2
gentoo-2-dedb1b5bab3c5346260fc96f6d72b55d84333515.zip
app-admin/geolizer: New package split off from webalizer
(Portage version: 2.2_rc66/cvs/Linux i686)
Diffstat (limited to 'app-admin/geolizer')
-rw-r--r--app-admin/geolizer/ChangeLog12
-rw-r--r--app-admin/geolizer/files/apache.geolizer9
-rw-r--r--app-admin/geolizer/files/geolizer-2.01.10_p20070115-etc-geolizer-conf.patch81
-rw-r--r--app-admin/geolizer/files/geolizer-language-list.txt136
-rw-r--r--app-admin/geolizer/geolizer-2.01.10_p20070115.ebuild118
-rw-r--r--app-admin/geolizer/metadata.xml5
6 files changed, 361 insertions, 0 deletions
diff --git a/app-admin/geolizer/ChangeLog b/app-admin/geolizer/ChangeLog
new file mode 100644
index 000000000000..6f7cb07dbd17
--- /dev/null
+++ b/app-admin/geolizer/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for app-admin/geolizer
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/geolizer/ChangeLog,v 1.1 2010/03/10 16:13:36 sping Exp $
+
+*geolizer-2.01.10_p20070115 (10 Mar 2010)
+
+ 10 Mar 2010; Sebastian Pipping <sping@gentoo.org>
+ +geolizer-2.01.10_p20070115.ebuild,
+ +files/geolizer-2.01.10_p20070115-etc-geolizer-conf.patch,
+ +files/apache.geolizer, +files/geolizer-language-list.txt, +metadata.xml:
+ New package split off from webalizer
+
diff --git a/app-admin/geolizer/files/apache.geolizer b/app-admin/geolizer/files/apache.geolizer
new file mode 100644
index 000000000000..e4e457c274e6
--- /dev/null
+++ b/app-admin/geolizer/files/apache.geolizer
@@ -0,0 +1,9 @@
+# This is the config snippet for Geolizer
+<Directory "/var/www/localhost/htdocs/geolizer">
+ Options None
+ AllowOverride None
+ Order allow,deny
+ Allow from all
+</Directory>
+
+# vim: ts=4 filetype=apache
diff --git a/app-admin/geolizer/files/geolizer-2.01.10_p20070115-etc-geolizer-conf.patch b/app-admin/geolizer/files/geolizer-2.01.10_p20070115-etc-geolizer-conf.patch
new file mode 100644
index 000000000000..e515a9aee5a3
--- /dev/null
+++ b/app-admin/geolizer/files/geolizer-2.01.10_p20070115-etc-geolizer-conf.patch
@@ -0,0 +1,81 @@
+From 64325c4fed853418f75357e0bb78668f999478ab Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Wed, 10 Mar 2010 16:55:28 +0100
+Subject: [PATCH] etc-eolizer-conf
+
+---
+ sample.conf | 4 ++--
+ webalizer.1 | 6 +++---
+ webalizer.c | 8 ++++----
+ 3 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/sample.conf b/sample.conf
+index 9eaef68..1d0b048 100644
+--- a/sample.conf
++++ b/sample.conf
+@@ -16,8 +16,8 @@
+ # at least one space or tab between the keyword and its value.
+ #
+ # As of version 0.98, The Webalizer will look for a 'default' configuration
+-# file named "webalizer.conf" in the current directory, and if not found
+-# there, will look for "/etc/webalizer.conf".
++# file named "geolizer.conf" in the current directory, and if not found
++# there, will look for "/etc/geolizer.conf".
+
+
+ # LogFile defines the web server log file to use. If not specified
+diff --git a/webalizer.1 b/webalizer.1
+index b810c1f..fe0a589 100644
+--- a/webalizer.1
++++ b/webalizer.1
+@@ -43,9 +43,9 @@ as a \fBcrond(8)\fP job. Once executed, the general flow of the program is:
+ .TP 8
+ .B o
+ A default configuration file is scanned for. A file named
+-\fIwebalizer.conf\fP is searched for in the current directory, and if
++\fIgeolizer.conf\fP is searched for in the current directory, and if
+ found, it's configuration data is parsed. If the file is not
+-present in the current directory, the file \fI/etc/webalizer.conf\fP
++present in the current directory, the file \fI/etc/geolizer.conf\fP
+ is searched for and, if found, is used instead.
+ .TP 8
+ .B o
+@@ -688,7 +688,7 @@ Specifies GeoIP database file. Defaults to libGeoIP precompiled one
+ (normally \fI/usr/local/share/GeoIP/GeoIP.dat\fP).
+ .SH FILES
+ .TP 20
+-.I webalizer.conf
++.I geolizer.conf
+ Default configuration file. Is searched for in the current directory
+ and if not found, in the \fI/etc/\fP directory.
+ .TP 20
+diff --git a/webalizer.c b/webalizer.c
+index 2daad89..db7adb2 100644
+--- a/webalizer.c
++++ b/webalizer.c
+@@ -278,9 +278,9 @@ int main(int argc, char *argv[])
+ len = GetModuleFileName(GetModuleHandle(NULL), tmp_buf, sizeof(tmp_buf) - 1);
+ for (p = tmp_buf + len; (p > tmp_buf) && (*p != '\\'); p--);
+ *p = '\0';
+- strncat(tmp_buf, "\\webalizer.conf", sizeof(tmp_buf) - 1);
++ strncat(tmp_buf, "\\geolizer.conf", sizeof(tmp_buf) - 1);
+ #else
+- sprintf(tmp_buf,"%s/webalizer.conf",ETCDIR);
++ sprintf(tmp_buf,"%s/geolizer.conf",ETCDIR);
+ #endif /* WIN32 */
+
+ /* initalize epoch */
+@@ -290,8 +290,8 @@ int main(int argc, char *argv[])
+ add_nlist("index.",&index_alias);
+
+ /* check for default config file */
+- if (!access("webalizer.conf",F_OK))
+- get_config("webalizer.conf");
++ if (!access("geolizer.conf",F_OK))
++ get_config("geolizer.conf");
+ else if (!access(tmp_buf,F_OK))
+ get_config(tmp_buf);
+
+--
+1.7.0.1.61.gdc05d.dirty
+
diff --git a/app-admin/geolizer/files/geolizer-language-list.txt b/app-admin/geolizer/files/geolizer-language-list.txt
new file mode 100644
index 000000000000..ed9e3232417b
--- /dev/null
+++ b/app-admin/geolizer/files/geolizer-language-list.txt
@@ -0,0 +1,136 @@
+aa afar
+ab abkhazian
+af afrikaans
+am amharic
+ar arabic
+as assamese
+ay aymara
+az azerbaijani
+ba bashkir
+be byelorussian
+bg bulgarian
+bh bihari
+bi bislama
+bn bengali
+bo tibetan
+br breton
+ca catalan
+co corsican
+cs czech
+cy welsh
+da danish
+de german
+dz bhutani
+el greek
+en english
+eo esperanto
+es spanish
+et estonian
+eu basque
+fa persian
+fi finnish
+fj fiji
+fo faeroese
+fr french
+fy frisian
+ga irish
+gd gaelic
+gl galician
+gn guarani
+gu gujarati
+ha hausa
+hi hindi
+hr croatian
+hu hungarian
+hy armenian
+ia interlingua
+ie interlingue
+ik inupiak
+in indonesian
+is icelandic
+it italian
+iw hebrew
+ja japanese
+ji yiddish
+jw javanese
+ka georgian
+kk kazakh
+kl greenlandic
+km cambodian
+kn kannada
+ko korean
+ks kashmiri
+ku kurdish
+ky kirghiz
+la latin
+ln lingala
+lo laothian
+lt lithuanian
+lv latvian
+mg malagasy
+mi maori
+mk macedonian
+ml malayalam
+mn mongolian
+mo moldavian
+mr marathi
+ms malay
+mt maltese
+my burmese
+na nauru
+ne nepali
+nl dutch
+no norwegian
+oc occitan
+om oromo afan
+or oriya
+pa punjabi
+pl polish
+ps pashto
+pt portuguese
+qu quechua
+rm rhaeto-romance
+rn kirundi
+ro romanian
+ru russian
+rw kinyarwanda
+sa sanskrit
+sd sindhi
+sg sangro
+sh serbo-croatian
+si singhalese
+sk slovak
+sl slovenian
+sm samoan
+sn shona
+so somali
+sq albanian
+sr serbian
+ss siswati
+st sesotho
+su sudanese
+sv swedish
+sw swahili
+ta tamil
+te tegulu
+tg tajik
+th thai
+ti tigrinya
+tk turkmen
+tl tagalog
+tn setswana
+to tonga
+tr turkish
+ts tsonga
+tt tatar
+tw twi
+uk ukrainian
+ur urdu
+uz uzbek
+vi vietnamese
+vo volapuk
+wo wolof
+xh xhosa
+yo yoruba
+zh chinese
+zu zulu
diff --git a/app-admin/geolizer/geolizer-2.01.10_p20070115.ebuild b/app-admin/geolizer/geolizer-2.01.10_p20070115.ebuild
new file mode 100644
index 000000000000..9a27cba31e2e
--- /dev/null
+++ b/app-admin/geolizer/geolizer-2.01.10_p20070115.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/geolizer/geolizer-2.01.10_p20070115.ebuild,v 1.1 2010/03/10 16:13:36 sping Exp $
+
+# uses webapp.eclass to create directories with right permissions
+# probably slight overkill but works well
+
+EAPI="2"
+
+inherit versionator confutils eutils webapp db-use autotools
+
+WEBAPP_MANUAL_SLOT="yes"
+
+MY_PV="$(get_version_component_range 1-2)-$(get_version_component_range 3)"
+WEBALIZER_P="webalizer-${MY_PV}"
+GEOLIZER_P="${PN}_${MY_PV}-patch.${PV/*_p/}"
+echo ${GEOLIZER_P}
+
+DESCRIPTION="Webserver log file analyzer"
+HOMEPAGE="http://sysd.org/stas/node/10"
+SRC_URI="ftp://ftp.mrunix.net/pub/webalizer/old/${WEBALIZER_P}-src.tar.bz2
+ http://sysd.org/stas/files/active/0/${GEOLIZER_P}.tar.gz
+ mirror://gentoo/webalizer.conf.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="nls"
+SLOT="0"
+
+DEPEND=">=sys-libs/db-4.2
+ >=sys-libs/zlib-1.1.4
+ >=media-libs/libpng-1.2
+ >=media-libs/gd-1.8.3
+ dev-libs/geoip"
+
+S="${WORKDIR}"/${WEBALIZER_P}
+
+pkg_setup() {
+ webapp_pkg_setup
+ confutils_require_built_with_all media-libs/gd png
+
+ # USE=nls has no real meaning if LINGUAS isn't set
+ if use nls && [[ -z "${LINGUAS}" ]]; then
+ ewarn "you must set LINGUAS in /etc/make.conf"
+ ewarn "if you want to USE=nls"
+ die "please either set LINGUAS or do not use nls"
+ fi
+}
+
+src_prepare() {
+ epatch "${WORKDIR}"/${PN}_${MY_PV}-patch/${PN}.patch
+ epatch "${FILESDIR}"/${P}-etc-geolizer-conf.patch
+ eautoreconf
+}
+
+src_configure() {
+ # really dirty hack; necessary due to a really gross ./configure
+ # basically, it just sets the natural language the program uses
+ # unfortunatly, this program only allows for one lang, so only the first
+ # entry in LINGUAS is used
+ if use nls; then
+ local longlang="$(grep ^${LINGUAS:0:2} "${FILESDIR}"/geolizer-language-list.txt)"
+ local myconf="${myconf} --with-language=${longlang:3}"
+ else
+ local myconf="${myconf} --with-language=english"
+ fi
+
+ econf --enable-dns \
+ --with-db=$(db_includedir) \
+ --with-dblib=$(db_libname) \
+ ${myconf} \
+ || die "econf failed"
+}
+
+src_install() {
+ webapp_src_preinst
+
+ newbin webalizer geolizer
+ fperms 755 /usr/bin/geolizer
+ dosym geolizer /usr/bin/geozolver || die 'dosym failed'
+ newman webalizer.1 geolizer.1 || die 'newman failed'
+
+ insinto /etc
+ newins "${WORKDIR}"/webalizer.conf geolizer.conf || die 'doins failed'
+ dosed "s/apache/apache2/g" /etc/geolizer.conf || die 'dosed failed'
+
+ dodoc CHANGES *README* INSTALL sample.conf "${FILESDIR}"/apache.geolizer || die 'dodoc failed'
+
+ webapp_src_install
+}
+
+pkg_postinst() {
+ elog
+ elog "It is suggested that you restart apache before using geolizer"
+ elog "You may want to review /etc/geolizer.conf and ensure that"
+ elog "OutputDir is set correctly"
+ elog
+ elog "Then just type geolizer to generate your stats."
+ elog "You can also use cron to generate them e.g. every day."
+ elog "They can be accessed via http://localhost/geolizer"
+ elog
+ elog "A sample Apache config file has been installed into"
+ elog "/usr/share/doc/${PF}/apache.geolizer"
+ elog "Please edit and install it as necessary"
+ elog
+
+ if [[ ${#LINGUAS} -gt 2 ]] && use nls; then
+ ewarn
+ ewarn "You have more than one language in LINGUAS"
+ ewarn "Due to the limitations of this packge, it was built"
+ ewarn "only with ${LINGUAS:0:2} support. If this is not what"
+ ewarn "you intended, please place the language you desire"
+ ewarn "_first_ in the list of LINGUAS in /etc/make.conf"
+ ewarn
+ fi
+
+ webapp_pkg_postinst
+}
diff --git a/app-admin/geolizer/metadata.xml b/app-admin/geolizer/metadata.xml
new file mode 100644
index 000000000000..6632069b5aff
--- /dev/null
+++ b/app-admin/geolizer/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>web-apps</herd>
+</pkgmetadata>