| 1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/media-radio/tucnak2/tucnak2-2.46.ebuild,v 1.4 2012/03/24 17:35:15 phajdan.jr Exp $ |
| 4 |
|
| 5 |
EAPI=2 |
| 6 |
inherit eutils autotools |
| 7 |
|
| 8 |
DESCRIPTION="Amateur Radio VHF Contest Logbook" |
| 9 |
HOMEPAGE="http://tucnak.nagano.cz" |
| 10 |
SRC_URI="http://tucnak.nagano.cz/${P}.tar.gz" |
| 11 |
|
| 12 |
LICENSE="GPL-2" |
| 13 |
SLOT="0" |
| 14 |
KEYWORDS="amd64 x86" |
| 15 |
IUSE="alsa fftw ftdi gpm hamlib suid" |
| 16 |
|
| 17 |
RDEPEND=">=dev-libs/glib-2 |
| 18 |
media-libs/libsndfile |
| 19 |
>=media-libs/libsdl-1.2 |
| 20 |
alsa? ( media-libs/alsa-lib ) |
| 21 |
fftw? ( sci-libs/fftw:3.0 ) |
| 22 |
ftdi? ( dev-embedded/libftdi ) |
| 23 |
gpm? ( sys-libs/gpm ) |
| 24 |
hamlib? ( media-libs/hamlib ) |
| 25 |
>=media-libs/libpng-1.2" |
| 26 |
DEPEND="${RDEPEND} |
| 27 |
virtual/pkgconfig" |
| 28 |
|
| 29 |
src_prepare() { |
| 30 |
epatch "${FILESDIR}/${PN}-2.39-doc.diff" \ |
| 31 |
"${FILESDIR}/${PN}-2.42-appname.diff" \ |
| 32 |
"${FILESDIR}/${PN}-soundwrapper.diff" |
| 33 |
eautoreconf |
| 34 |
} |
| 35 |
|
| 36 |
src_configure() { |
| 37 |
econf $(use_with alsa) $(use_with ftdi) \ |
| 38 |
$(use_with gpm) $(use_with hamlib) \ |
| 39 |
$(use_with fftw fftw3) --with-sdl |
| 40 |
} |
| 41 |
|
| 42 |
src_install() { |
| 43 |
emake DESTDIR="${D}" install || die "install failed" |
| 44 |
doman debian/tucnak2.1 || die "doman failed" |
| 45 |
dodoc AUTHORS ChangeLog TODO doc/NAVOD.pdf || die "dodoc failed" |
| 46 |
if use suid ; then |
| 47 |
fperms 4711 /usr/bin/soundwrapper || die "fperms failed" |
| 48 |
fi |
| 49 |
} |
| 50 |
|
| 51 |
pkg_postinst() { |
| 52 |
elog "In order to use sound with tucnak2 add yourself to the 'audio' group" |
| 53 |
elog "and to key your rig via the parport add yourself to the 'lp' group" |
| 54 |
elog "" |
| 55 |
elog "tucnak2 can be used with the following additional packages:" |
| 56 |
elog " media-radio/cwdaemon : Morse output via code cwdaemon" |
| 57 |
elog " (No need to recompile)" |
| 58 |
if use suid ; then |
| 59 |
ewarn "You have choosen to install the little helper program 'soundwrapper'" |
| 60 |
ewarn "setuid by setting USE=suid. That helper is only needed if you" |
| 61 |
ewarn "want to use morse sidetone output via the PC speaker." |
| 62 |
ewarn "" |
| 63 |
ewarn "While the helper should be safe by design be aware that setting" |
| 64 |
ewarn "any program setuid is a security risk." |
| 65 |
fi |
| 66 |
} |