1 |
mrness |
1.3 |
# Copyright 1999-2008 Gentoo Foundation |
2 |
mrness |
1.1 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
mrness |
1.3 |
# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/smsclient/smsclient-2.0.9a-r1.ebuild,v 1.2 2007/02/03 06:54:22 mrness Exp $ |
4 |
mrness |
1.1 |
|
5 |
mrness |
1.3 |
inherit eutils toolchain-funcs |
6 |
mrness |
1.1 |
|
7 |
|
|
DESCRIPTION="Utility to send SMS messages to mobile phones and pagers." |
8 |
|
|
HOMEPAGE="http://www.smsclient.org" |
9 |
|
|
SRC_URI="http://www.smsclient.org/download/${PN}-${PV%?}/${P}.tar.gz" |
10 |
|
|
|
11 |
|
|
LICENSE="GPL-2" |
12 |
|
|
SLOT="0" |
13 |
mrness |
1.2 |
KEYWORDS="~amd64 ~x86" |
14 |
mrness |
1.1 |
IUSE="" |
15 |
|
|
|
16 |
|
|
src_unpack() { |
17 |
|
|
unpack ${A} |
18 |
|
|
|
19 |
|
|
epatch "${FILESDIR}/${P}-gentoo.patch" |
20 |
|
|
epatch "${FILESDIR}/${P}-sender.patch" |
21 |
|
|
} |
22 |
|
|
|
23 |
|
|
src_compile() { |
24 |
|
|
rm .configured && ./configure || die "Configure failed" |
25 |
mrness |
1.3 |
emake CC="$(tc-getCC)" || die "Make failed" |
26 |
mrness |
1.1 |
} |
27 |
|
|
|
28 |
|
|
src_install() { |
29 |
|
|
make DESTDIR="${D}" install || die "Install failed" |
30 |
|
|
dosym sms_client /usr/bin/smsclient |
31 |
|
|
dosym sms_address /usr/bin/smsaddress |
32 |
|
|
|
33 |
|
|
diropts -g dialout -m 0770 |
34 |
|
|
keepdir /var/lock/sms |
35 |
|
|
diropts |
36 |
|
|
|
37 |
|
|
doman docs/sms_client.1 |
38 |
|
|
dodoc Authors Changelog* FAQ README* TODO docs/sms_protocol |
39 |
|
|
} |
40 |
|
|
|
41 |
|
|
pkg_postinst() { |
42 |
|
|
local MY_LOGFILE="${ROOT}/var/log/smsclient.log" |
43 |
|
|
[ -f "${MY_LOGFILE}" ] || touch "${MY_LOGFILE}" |
44 |
|
|
chgrp dialout "${MY_LOGFILE}" |
45 |
|
|
chmod g+rwx,o-rwx "${MY_LOGFILE}" |
46 |
|
|
|
47 |
|
|
einfo "If you run sms_client as normal user, make sure you are member of dialout group." |
48 |
|
|
} |