summaryrefslogtreecommitdiff
path: root/www-misc/pglogd/pglogd-2.3.ebuild
Unidiff
Diffstat (limited to 'www-misc/pglogd/pglogd-2.3.ebuild') (more/less context) (ignore whitespace changes)
-rw-r--r--www-misc/pglogd/pglogd-2.3.ebuild61
1 files changed, 61 insertions, 0 deletions
diff --git a/www-misc/pglogd/pglogd-2.3.ebuild b/www-misc/pglogd/pglogd-2.3.ebuild
new file mode 100644
index 0000000..dad9a04
--- a/dev/null
+++ b/www-misc/pglogd/pglogd-2.3.ebuild
@@ -0,0 +1,61 @@
1# Copyright 1999-2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3# $Header: $
4
5inherit eutils postgresql
6
7DESCRIPTION="pgLOGd writes web server log entries to a PostgreSQL database"
8HOMEPAGE="http://www.digitalstratum.com/pglogd/"
9SRC_URI="http://www.digitalstratum.com/pglogd/${P}.tar.gz"
10
11LICENSE="BSD"
12SLOT="0"
13KEYWORDS="~x86 ~amd64"
14IUSE=""
15
16DEPEND="dev-db/postgresql-libs"
17
18src_unpack() {
19 unpack ${A}
20 cd ${S}
21 epatch ${FILESDIR}/${P}-path.patch
22}
23
24src_compile() {
25 local pgconfig=$(postgresql_get_pgconfig)
26 emake COPTS= \
27 CFLAGS="${CFLAGS} -I$(${pgconfig} --includedir)" \
28 LDFLAGS="${LDFLAGS} -L$(${pgconfig} --libdir)" \
29 || die "emake failed"
30}
31
32src_install() {
33 dobin pglogctl
34 dosbin pglogd
35 dodoc CHANGELOG README pglogd_tables.sql weblog_daily.sql queries.txt pglogd.conf
36
37 insinto /etc
38 doins pglogd.conf
39
40 exeinto /etc/init.d
41 newexe ${FILESDIR}/pglogd.init pglogd
42}
43
44pkg_postinst() {
45 echo
46 einfo "Create a database on PostgreSQL server,"
47 einfo "default name pglogd, but call it what you want,"
48 einfo "and create the required tables within the database. An SQL script is"
49 einfo "included with the source /usr/share/doc/${PF}/pglogd_tables.sql.gz"
50 einfo "to accomplish this:"
51 einfo
52 einfo " # su - postgres"
53 einfo " $ createdb pglogd"
54 einfo " $ zcat /usr/share/doc/${PF}/pglogd_tables.sql.gz | psql pglogd"
55 einfo " $ exit"
56 einfo
57 einfo "Then, you need to edit /etc/pglogd.conf against your enviroment."
58 einfo "Finally, start up pglogd."
59 einfo " # /etc/init.d/pglogd start before apache server."
60 echo
61}