| 1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sys-fs/udisks/udisks-1.99.0.ebuild,v 1.4 2012/08/03 08:32:35 ssuominen Exp $ |
| 4 |
|
| 5 |
EAPI=4 |
| 6 |
inherit eutils bash-completion-r1 linux-info systemd toolchain-funcs |
| 7 |
|
| 8 |
DESCRIPTION="Daemon providing interfaces to work with storage devices" |
| 9 |
HOMEPAGE="http://www.freedesktop.org/wiki/Software/udisks" |
| 10 |
SRC_URI="http://udisks.freedesktop.org/releases/${P}.tar.bz2" |
| 11 |
|
| 12 |
LICENSE="GPL-2" |
| 13 |
SLOT="2" |
| 14 |
KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86" |
| 15 |
IUSE="debug crypt +gptfdisk +introspection systemd" |
| 16 |
|
| 17 |
COMMON_DEPEND=">=dev-libs/glib-2.32 |
| 18 |
>=sys-auth/polkit-0.106 |
| 19 |
>=dev-libs/libatasmart-0.19 |
| 20 |
>=sys-fs/udev-180[gudev,hwdb] |
| 21 |
virtual/acl |
| 22 |
introspection? ( >=dev-libs/gobject-introspection-1.30 ) |
| 23 |
systemd? ( >=sys-apps/systemd-44 )" |
| 24 |
# gptfdisk -> src/udiskslinuxpartition.c -> sgdisk (see also #412801#c1) |
| 25 |
# util-linux -> mount, umount, swapon, swapoff (see also #403073) |
| 26 |
RDEPEND="${COMMON_DEPEND} |
| 27 |
>=sys-apps/util-linux-2.20.1-r2 |
| 28 |
>=sys-block/parted-3 |
| 29 |
virtual/eject |
| 30 |
crypt? ( sys-fs/cryptsetup ) |
| 31 |
gptfdisk? ( >=sys-apps/gptfdisk-0.8 )" |
| 32 |
DEPEND="${COMMON_DEPEND} |
| 33 |
app-text/docbook-xsl-stylesheets |
| 34 |
dev-libs/libxslt |
| 35 |
>=dev-util/gdbus-codegen-2.32 |
| 36 |
dev-util/intltool |
| 37 |
>=sys-kernel/linux-headers-3.1 |
| 38 |
virtual/pkgconfig" |
| 39 |
|
| 40 |
DOCS="AUTHORS HACKING NEWS README" |
| 41 |
|
| 42 |
pkg_setup() { |
| 43 |
# Listing only major arch's here to avoid tracking kernel's defconfig |
| 44 |
if use amd64 || use arm || use ppc || use ppc64 || use x86; then |
| 45 |
CONFIG_CHECK="~!IDE" #319829 |
| 46 |
CONFIG_CHECK+=" ~TMPFS_POSIX_ACL" #412377 |
| 47 |
CONFIG_CHECK+=" ~USB_SUSPEND" #331065 |
| 48 |
CONFIG_CHECK+=" ~SWAP" # http://forums.gentoo.org/viewtopic-t-923640.html |
| 49 |
CONFIG_CHECK+=" ~NLS_UTF8" #425562 |
| 50 |
linux-info_pkg_setup |
| 51 |
fi |
| 52 |
} |
| 53 |
|
| 54 |
src_prepare() { |
| 55 |
epatch "${FILESDIR}"/${PN}-2.x-ntfs-3g.patch |
| 56 |
use systemd || { sed -i -e 's:libsystemd-login:&use_USE_systemd:' configure || die; } |
| 57 |
[[ $(gcc-version) < 4.6 ]] && epatch "${FILESDIR}"/${PN}-2.x-pragma.patch |
| 58 |
} |
| 59 |
|
| 60 |
src_configure() { |
| 61 |
econf \ |
| 62 |
--localstatedir="${EPREFIX}"/var \ |
| 63 |
--disable-static \ |
| 64 |
--disable-silent-rules \ |
| 65 |
$(use_enable debug) \ |
| 66 |
--disable-gtk-doc \ |
| 67 |
$(use_enable introspection) \ |
| 68 |
--with-html-dir="${EPREFIX}"/usr/share/doc/${PF}/html \ |
| 69 |
"$(systemd_with_unitdir)" |
| 70 |
} |
| 71 |
|
| 72 |
src_install() { |
| 73 |
default |
| 74 |
|
| 75 |
prune_libtool_files |
| 76 |
|
| 77 |
local htmldir=udisks2 |
| 78 |
if [[ -d ${ED}/usr/share/doc/${PF}/html/${htmldir} ]]; then |
| 79 |
dosym /usr/share/doc/${PF}/html/${htmldir} /usr/share/gtk-doc/html/${htmldir} |
| 80 |
fi |
| 81 |
|
| 82 |
rm -rf "${ED}"/etc/bash_completion.d |
| 83 |
dobashcomp tools/udisksctl-bash-completion.sh |
| 84 |
|
| 85 |
keepdir /var/lib/udisks2 #383091 |
| 86 |
} |
| 87 |
|
| 88 |
pkg_postinst() { |
| 89 |
mkdir -p "${EROOT}"/run #415987 |
| 90 |
|
| 91 |
# See pkg_postinst() of >=sys-apps/baselayout-2.1-r1. Keep in sync? |
| 92 |
if ! grep -qs "^tmpfs.*/run " "${EROOT}"/proc/mounts ; then |
| 93 |
echo |
| 94 |
ewarn "You should reboot the system now to get /run mounted with tmpfs!" |
| 95 |
fi |
| 96 |
} |