app-cdr/uif2iso: Cleanup per bug #85210
[gentoo.git] / app-cdr / cdemu / cdemu-3.0.0.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="5"
6
7 CMAKE_MIN_VERSION="2.8.5"
8 PYTHON_COMPAT=( python2_7 )
9 PLOCALES="no sl sv"
10
11 inherit bash-completion-r1 cmake-utils eutils fdo-mime l10n python-single-r1
12
13 DESCRIPTION="Command-line tool for controlling cdemu-daemon"
14 HOMEPAGE="http://cdemu.org"
15 SRC_URI="mirror://sourceforge/cdemu/cdemu-client-${PV}.tar.bz2"
16
17 LICENSE="GPL-2+"
18 SLOT="0"
19 KEYWORDS="amd64 ~hppa x86"
20 IUSE="+cdemu-daemon"
21 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
22
23 RDEPEND="${PYTHON_DEPS}
24         dev-python/dbus-python[${PYTHON_USEDEP}]
25         cdemu-daemon? ( app-cdr/cdemu-daemon:0/7 )"
26 DEPEND="${RDEPEND}
27         dev-util/desktop-file-utils
28         >=dev-util/intltool-0.21
29         >=sys-devel/gettext-0.18"
30
31 S=${WORKDIR}/cdemu-client-${PV}
32
33 pkg_setup() {
34         python-single-r1_pkg_setup
35 }
36
37 src_prepare() {
38         python_fix_shebang src/cdemu
39         epatch "${FILESDIR}/${PN}-3.0.0-bash-completion-dir.patch"
40 }
41
42 src_configure() {
43         DOCS="AUTHORS README"
44         local mycmakeargs=(
45                 -DPOST_INSTALL_HOOKS=OFF
46                 -DGENTOO_BASHCOMPDIR="$(get_bashcompdir)"
47         )
48         cmake-utils_src_configure
49 }
50
51 src_install() {
52         cmake-utils_src_install
53         # Build system doesn't respect LINGUAS, and changing list of installed
54         # translations requires error-prone editing of CMakeLists.txt
55         rm_po() {
56                 rm -r "${ED}"/usr/share/locale/$1 || die
57                 ls "${ED}"/usr/share/locale/* &> /dev/null || rmdir "${ED}"/usr/share/locale || die
58         }
59         l10n_for_each_disabled_locale_do rm_po
60 }
61
62 pkg_postinst() {
63         fdo-mime_desktop_database_update
64 }
65
66 pkg_postrm() {
67         fdo-mime_desktop_database_update
68 }