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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Tue Nov 20 21:08:15 2007 UTC (7 years ago) by mrness
Branch: MAIN
Changes since 1.5: +6 -3 lines
Link with -lpcreposix instead libpcreposix.a (#199535).
(Portage version: 2.1.3.16)

1 # Copyright 1999-2007 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-r2.ebuild,v 1.5 2007/11/04 08:17:05 mrness Exp $
4
5 WANT_AUTOMAKE="none"
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_unpack() {
34 unpack ${A}
35
36 cd "${S}"
37 epatch "${WORKDIR}/${P}.patch"
38 epatch "${FILESDIR}/${P/_*}-textrel.patch"
39 epatch "${FILESDIR}/${P/_*}-pthread-rwlock.patch"
40 epatch "${FILESDIR}/modules-as-needed.patch"
41 epatch "${FILESDIR}/implicit-decl.patch"
42 epatch "${FILESDIR}/libpcreposix.patch"
43 sed -i -e 's:y\.tab\.h:y.tab.c:' src/Makefile.in
44 eautoconf
45 }
46
47 src_compile() {
48 econf \
49 --prefix=/usr \
50 --libdir=/usr/$(get_libdir)/oops \
51 --enable-oops-user=oops \
52 --sysconfdir=/etc/oops \
53 --sbindir=/usr/sbin \
54 --with-regexp=pcre \
55 --localstatedir=/var/run/oops \
56 --enable-large-files \
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 emake || die "compile problem"
72 }
73
74 src_install() {
75 dodir /usr/sbin
76 einstall || die "install problem"
77
78 newinitd "${FILESDIR}/oops.initd" oops
79 diropts -m0750 -o root -g oops
80 dodir /etc/oops
81 insinto /etc/oops
82 doins "${FILESDIR}/oops.cfg"
83
84 diropts -m0755 -o oops -g oops
85 keepdir /var/run/oops
86 diropts -m0770 -o oops -g oops
87 keepdir /var/log/oops
88 keepdir /var/lib/oops/storage
89 keepdir /var/lib/oops/db
90
91 # cleanups
92 rm -rf "${D}/usr/oops"
93 rm -rf "${D}/usr/lib/oops/modules"
94 }
95
96 pkg_postinst() {
97 #Set proper owner/group if installed from binary package
98 chgrp oops "${ROOT}/etc/oops"
99 chown -R oops:oops "${ROOT}/var/run/oops" "${ROOT}/var/log/oops" "${ROOT}/var/lib/oops"
100 }

  ViewVC Help
Powered by ViewVC 1.1.20