summaryrefslogtreecommitdiff
path: root/www-misc/pglogd/pglogd-2.3-r1.ebuild
Unidiff
Diffstat (limited to 'www-misc/pglogd/pglogd-2.3-r1.ebuild') (more/less context) (ignore whitespace changes)
-rw-r--r--www-misc/pglogd/pglogd-2.3-r1.ebuild62
1 files changed, 62 insertions, 0 deletions
diff --git a/www-misc/pglogd/pglogd-2.3-r1.ebuild b/www-misc/pglogd/pglogd-2.3-r1.ebuild
new file mode 100644
index 0000000..7af6198
--- a/dev/null
+++ b/www-misc/pglogd/pglogd-2.3-r1.ebuild
@@ -0,0 +1,62 @@
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/download/${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 epatch ${FILESDIR}/${P}-foreground.patch
23}
24
25src_compile() {
26 local pgconfig=$(postgresql_get_pgconfig)
27 emake COPTS= \
28 CFLAGS="${CFLAGS} -I$(${pgconfig} --includedir)" \
29 LDFLAGS="${LDFLAGS} -L$(${pgconfig} --libdir)" \
30 || die "emake failed"
31}
32
33src_install() {
34 dobin pglogctl
35 dosbin pglogd
36 dodoc CHANGELOG README pglogd_tables.sql weblog_daily.sql queries.txt pglogd.conf
37
38 insinto /etc
39 doins pglogd.conf
40
41 exeinto /etc/init.d
42 newexe ${FILESDIR}/pglogd.init pglogd
43}
44
45pkg_postinst() {
46 echo
47 einfo "Create a database on PostgreSQL server,"
48 einfo "default name pglogd, but call it what you want,"
49 einfo "and create the required tables within the database. An SQL script is"
50 einfo "included with the source /usr/share/doc/${PF}/pglogd_tables.sql.gz"
51 einfo "to accomplish this:"
52 einfo
53 einfo " # su - postgres"
54 einfo " $ createdb pglogd"
55 einfo " $ zcat /usr/share/doc/${PF}/pglogd_tables.sql.gz | psql pglogd"
56 einfo " $ exit"
57 einfo
58 einfo "Then, you need to edit /etc/pglogd.conf against your enviroment."
59 einfo "Finally, start up pglogd."
60 einfo " # /etc/init.d/pglogd start before apache server."
61 echo
62}