/[gentoo-x86]/net-misc/asterisk/asterisk-0.9.0.ebuild
Gentoo

Contents of /net-misc/asterisk/asterisk-0.9.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Mon Jul 25 22:27:44 2005 UTC (14 years, 4 months ago) by stkn
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED
Removing old version.
(Portage version: 2.0.51.19)

1 # Copyright 1999-2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-0.9.0.ebuild,v 1.9 2005/07/10 01:08:32 swegener Exp $
4
5 inherit eutils webapp-apache
6
7 DESCRIPTION="Asterisk: A Modular Open Source PBX System"
8 HOMEPAGE="http://www.asterisk.org/"
9 SRC_URI="ftp://ftp.asterisk.org/pub/telephony/asterisk/old-releases/${P}.tar.gz"
10
11 IUSE="alsa doc gtk mmx mysql nopri nozaptel"
12 SLOT="0"
13 LICENSE="GPL-2"
14 KEYWORDS="x86"
15
16 DEPEND="virtual/libc
17 media-sound/mpg123
18 dev-libs/newt
19 doc? ( app-doc/doxygen )
20 alsa? ( media-libs/alsa-lib )
21 mysql? ( dev-db/mysql )
22 gtk? ( =x11-libs/gtk+-1.2* )
23 !nopri? ( >=net-libs/libpri-0.4 )
24 !nozaptel? ( >=net-misc/zaptel-0.9.1
25 >=net-libs/zapata-0.9.1 )"
26
27 pkg_setup() {
28 NO_WEBSERVER=0
29
30 webapp-detect || NO_WEBSERVER=1
31 webapp-pkg_setup "${NO_WEBSERVER}"
32 if [ $NO_WEBSERVER -eq 0 ]; then
33 einfo "Voicemail webapp will be installed into: ${ROOT}${HTTPD_ROOT}"
34 else
35 einfo "Skipping installation of Voicemail webapp"
36 fi
37 }
38
39 src_unpack() {
40 unpack ${A}
41
42 cd ${S}
43 # epatch ${FILESDIR}/${PV}/${P}-makefile-fix.diff
44
45 # set cflags & mmx optimization
46 sed -i -e "s:^\(OPTIMIZE=\).*:\1 ${CFLAGS}:" Makefile
47
48 if use mmx; then
49 einfo "enabling mmx optimization"
50 sed -i -e "s:^#\(K6OPT.*\):\1:" Makefile
51 fi
52
53 # change image path in voicemail cgi
54 sed -i -e "s:^\(\$astpath = \).*:\1 \"/asterisk\";:" contrib/scripts/vmail.cgi
55 }
56
57 src_compile() {
58 # build asterisk first...
59 einfo "Building Asterisk..."
60 cd ${S}
61 emake -j1 || die "Make failed"
62 }
63
64 src_install() {
65 emake -j1 DESTDIR=${D} install || die "Make install failed"
66 emake -j1 DESTDIR=${D} samples || die "Make install samples failed"
67
68 # install addmailbox and astgenkey
69 dosbin contrib/scripts/addmailbox
70 dosbin contrib/scripts/astgenkey
71
72 # documentation
73 use doc && \
74 emake -j1 DESTDIR=${D} progdocs
75
76 # voicemail webapp
77 if [ $NO_WEBSERVER -eq 0 ]; then
78 einfo "Installing voicemail webapp"
79 insinto ${HTTPD_CGIBIN}
80 doins contrib/scripts/vmail.cgi
81 fperms 1755 ${HTTPD_CGIBIN}/vmail.cgi
82
83 insinto ${HTTPD_ROOT}/asterisk
84 for i in "images/*.gif"; do
85 doins $i
86 done
87 fi
88
89
90 # install necessary files
91 dodir /etc/env.d
92 echo "LD_LIBRARY_PATH=\"/usr/lib/asterisk\"" > ${D}/etc/env.d/25asterisk
93
94 exeinto /etc/init.d
95 newexe ${FILESDIR}/${PV}/asterisk.rc6 asterisk
96
97 insinto /etc/conf.d
98 newins ${FILESDIR}/${PV}/asterisk.confd asterisk
99
100 # don't delete these, even if they are empty
101 keepdir /var/spool/asterisk/voicemail/default/1234/INBOX
102 keepdir /var/log/asterisk/cdr-csv
103
104 # install standard docs...
105 dodoc BUGS CREDITS LICENSE ChangeLog HARDWARE README SECURITY
106
107 docinto scripts
108 dodoc contrib/scripts/*.pl
109 dodoc contrib/scripts/*.sql
110 }
111
112 pkg_postinst() {
113 einfo "Asterisk has been installed"
114 einfo ""
115 einfo "to add new Mailboxes use: /usr/sbin/addmailbox"
116 einfo ""
117 einfo "If you want to know more about asterisk, visit these sites:"
118 einfo "http://www.automated.it/guidetoasterisk.htm"
119 einfo "http://asterisk.xvoip.com/"
120 einfo "http://www.voip-info.org/wiki-Asterisk"
121 einfo "http://ns1.jnetdns.de/jn/relaunch/asterisk/"
122 }

  ViewVC Help
Powered by ViewVC 1.1.20