/[gentoo-x86]/app-mobilephone/sobexsrv/sobexsrv-1.0.1.ebuild
Gentoo

Contents of /app-mobilephone/sobexsrv/sobexsrv-1.0.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Sat Jun 2 05:04:06 2012 UTC (2 years, 2 months ago) by zmedico
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +3 -3 lines
inherit user for enewgroup and enewuser

(Portage version: 2.2.0_alpha108_p25/cvs/Linux i686)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-mobilephone/sobexsrv/sobexsrv-1.0.1.ebuild,v 1.10 2010/10/29 21:23:23 joker Exp $
4
5 inherit eutils toolchain-funcs user
6
7 MY_P="${P/_pre/pre}"
8
9 IUSE="gtk"
10
11 DESCRIPTION="Scripting/Secure OBEX Server (for BlueZ Linux)"
12 SRC_URI="http://www.mulliner.org/bluetooth/${MY_P}.tar.gz
13 http://dev.gentoo.org/~joker/${P}-fix64.patch"
14 HOMEPAGE="http://www.mulliner.org/bluetooth/sobexsrv.php"
15
16 SLOT="0"
17 LICENSE="GPL-2"
18 KEYWORDS="amd64 ppc x86"
19
20 DEPEND="dev-libs/openobex
21 net-wireless/bluez"
22 RDEPEND="${DEPEND}
23 gtk? ( >=dev-python/pygtk-2.2 )"
24
25 S="${WORKDIR}/${MY_P}"
26
27 pkg_setup() {
28 enewgroup sobexsrv
29 enewuser sobexsrv -1 -1 /var/spool/sobexsrv sobexsrv
30 }
31
32 src_unpack() {
33 unpack ${A}
34
35 cd "${S}"
36
37 epatch "${DISTDIR}/${P}"-fix64.patch || die "fix64 patch failed"
38
39 sed -e 's:/usr/man/man8:/usr/share/man/man8:' \
40 -i Makefile
41
42 sed -e 's/^CFLAGS =/CFLAGS +=/' \
43 -e 's/^CC =/CC ?=/' \
44 -e 's/$(CC) $(CFLAGS)/$(CC) $(LDFLAGS) $(CFLAGS)/' \
45 -i src/Makefile
46 }
47
48 src_compile() {
49 tc-export CC
50 emake || die "emake failed"
51 }
52
53 src_install() {
54 make DESTDIR="${D}" install || die "make install failed"
55 dodoc AUTHOR CHANGELOG CONFIG README SECURITY TODO
56
57 use gtk || rm "${D}/usr/bin/sobexsrv_handler"
58
59 newinitd "${FILESDIR}/init.d_sobexsrv" sobexsrv
60 newconfd "${FILESDIR}/conf.d_sobexsrv" sobexsrv
61
62 keepdir /var/spool/sobexsrv
63 fowners sobexsrv:sobexsrv /var/spool/sobexsrv
64 }
65
66 pkg_postinst() {
67 elog
68 elog "/usr/bin/sobexsrv is *NOT* installed set-uid root by"
69 elog "default. suid is required for the chroot option (-R)."
70 elog
71 elog "Execute the following commands to enable suid:"
72 elog
73 elog "chown root:sobexsrv /usr/bin/sobexsrv"
74 elog "chmod 4710 /usr/bin/sobexsrv"
75 elog
76 }

  ViewVC Help
Powered by ViewVC 1.1.20