blob: a41979192cd68c84fd233ba8338c78d67d05de84 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-irc/ptlink-services/ptlink-services-2.24.1.ebuild,v 1.3 2004/07/17 10:00:57 dholm Exp $
inherit fixheadtails eutils
MY_P="PTlink.Services${PV}"
DESCRIPTION="PTlink Services"
HOMEPAGE="http://www.ptlink.net/"
SRC_URI="ftp://ftp.sunsite.dk/projects/ptlink/services/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~ppc"
IUSE="mysql"
DEPEND="mysql? ( dev-db/mysql )"
S=${WORKDIR}/${MY_P}
src_unpack() {
unpack ${A}
cd ${S}
ht_fix_file configure
find ${S} -type d -name CVS -exec rm -rf {} \; 2>/dev/null
}
src_compile() {
econf || die "econf failed"
# Now we're going to override the paths setup by configure
echo "#define BINPATH \"/usr/bin\"" > include/path.h
echo "#define ETCPATH \"/etc/ptlink-services\"" >> include/path.h
echo "#define DATAPATH \"/var/lib/ptlink-services\"" >> include/path.h
emake CFLAGS="${CFLAGS}" || die "emake failed"
emake -C src/lang CFLAGS="${CFLAGS}" || die "emake failed"
}
src_install() {
newbin src/services ptlink-services
keepdir /var/{lib,log}/ptlink-services
dosym /var/log/ptlink-services /var/lib/ptlink-services/logs
insinto /usr/share/ptlink-services/languages
for file in src/lang/*.l ; do
doins src/lang/$(basename ${file} .l)
doins src/lang/$(basename ${file} .l).auth
doins src/lang/$(basename ${file} .l).setemail
done
dosym /usr/share/ptlink-services/languages /var/lib/ptlink-services
insinto /etc/ptlink-services
newins data/example.conf services.conf
doins data/create_tables.sql
dohtml html_manual/*
dodoc CHANGES FAQ FEATURES README
exeinto /etc/init.d
newexe ${FILESDIR}/ptlink-services.init.d ptlink-services
insinto /etc/conf.d
newins ${FILESDIR}/ptlink-services.conf.d ptlink-services
}
pkg_postinst() {
enewuser ptlink-services
chown ptlink-services ${ROOT}/var/{log,lib}/ptlink-services
}
|