/[gentoo-x86]/net-proxy/oops/oops-1.5.24_pre20050503-r4.ebuild
Gentoo

Contents of /net-proxy/oops/oops-1.5.24_pre20050503-r4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Mon Jan 10 10:48:34 2011 UTC (3 years, 11 months ago) by flameeyes
Branch: MAIN
Changes since 1.4: +3 -2 lines
Fix build with Berkeley DB 5.0 (bug #319955).

(Portage version: 2.2.0_alpha14/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-proxy/oops/oops-1.5.24_pre20050503-r4.ebuild,v 1.4 2010/07/11 11:41:51 armin76 Exp $
4
5 EAPI="2"
6
7 inherit eutils flag-o-matic toolchain-funcs autotools
8
9 MY_P="${PN}-1.5.23"
10
11 DESCRIPTION="An advanced multithreaded caching web proxy"
12 HOMEPAGE="http://zipper.paco.net/~igor/oops.eng/"
13 SRC_URI="http://zipper.paco.net/~igor/oops/${MY_P}.tar.gz
14 mirror://gentoo/${P}.patch.gz"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 KEYWORDS="amd64 sparc x86"
19 IUSE=""
20
21 RDEPEND="dev-libs/libpcre
22 >=sys-libs/db-3"
23 DEPEND="${RDEPEND}
24 sys-devel/flex"
25
26 S="${WORKDIR}/${MY_P}"
27
28 pkg_setup() {
29 enewgroup oops
30 enewuser oops -1 -1 /var/lib/oops oops
31 }
32
33 src_prepare() {
34 epatch "${WORKDIR}/${P}.patch"
35 epatch "${FILESDIR}/${P/_*}-textrel.patch"
36 epatch "${FILESDIR}/${P/_*}-pthread-rwlock.patch"
37 epatch "${FILESDIR}/modules-as-needed.patch"
38 epatch "${FILESDIR}/implicit-decl.patch"
39 epatch "${FILESDIR}/libpcreposix.patch"
40 epatch "${FILESDIR}/rotate-logs.patch"
41 epatch "${FILESDIR}/${P}+db-5.0.patch"
42 sed -i -e 's:y\.tab\.h:y.tab.c:' src/Makefile.in
43 eautoreconf
44 }
45
46 src_configure() {
47 econf \
48 --prefix=/usr \
49 --libdir=/usr/$(get_libdir)/oops \
50 --enable-oops-user=oops \
51 --sysconfdir=/etc/oops \
52 --sbindir=/usr/sbin \
53 --with-regexp=pcre \
54 --localstatedir=/var/run/oops \
55 --enable-large-files \
56 --with-zlib=-lz \
57 || die "configure problem"
58
59 sed -i -e '/STRERROR_R/d' src/config.h.in
60 sed -i \
61 -e "s|OOPS_LIBDIR = /usr/$(get_libdir)/oops|OOPS_LIBDIR = ${D}/usr/$(get_libdir)/oops|" \
62 -e "s|OOPS_SBINDIR = /usr/sbin|OOPS_SBINDIR = ${D}/usr/sbin|" \
63 -e "s|OOPS_SYSCONFDIR = /etc/oops|OOPS_SYSCONFDIR = ${D}/etc/oops|" \
64 -e "s|OOPS_LOCALSTATEDIR = /var/run/oops|OOPS_LOCALSTATEDIR = ${D}/var/run/oops|" \
65 -e "s|OOPSPATH=/usr/oops|OOPSPATH=${D}/usr/oops|" \
66 src/Makefile
67 sed -i \
68 -e "s|^\(LDFLAGS *= *\)${LDFLAGS}|\1$(raw-ldflags)|" \
69 src/modules/Makefile #modules makefile use ld directly
70 }
71
72 src_install() {
73 dodir /usr/sbin
74 einstall || die "install problem"
75
76 newinitd "${FILESDIR}/oops.initd" oops
77 diropts -m0750 -o root -g oops
78 dodir /etc/oops
79 insinto /etc/oops
80 doins "${FILESDIR}/oops.cfg"
81
82 diropts -m0755 -o oops -g oops
83 keepdir /var/run/oops
84 diropts -m0770 -o oops -g oops
85 keepdir /var/log/oops
86 keepdir /var/lib/oops/storage
87 keepdir /var/lib/oops/db
88
89 # cleanups
90 rm -rf "${D}/usr/oops"
91 rm -rf "${D}/usr/lib/oops/modules"
92 }
93
94 pkg_postinst() {
95 #Set proper owner/group if installed from binary package
96 chgrp oops "${ROOT}/etc/oops"
97 chown -R oops:oops "${ROOT}/var/run/oops" "${ROOT}/var/log/oops" "${ROOT}/var/lib/oops"
98 }

  ViewVC Help
Powered by ViewVC 1.1.20