| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/gnome-extra/nautilus-share/nautilus-share-0.7.3.ebuild,v 1.1 2012/05/20 11:54:23 maksbotan Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
|
| 7 |
inherit gnome2 eutils user
|
| 8 |
|
| 9 |
DESCRIPTION="A nautilus plugin to easily share folders over the SMB protocol"
|
| 10 |
HOMEPAGE="http://gentoo.ovibes.net/nautilus-share http://packages.debian.org/unstable/nautilus-share"
|
| 11 |
SRC_URI="mirror://debian/pool/main/n/${PN}/${PN}_${PV}.orig.tar.bz2
|
| 12 |
mirror://debian/pool/main/n/${PN}/${PN}_${PV}-1.debian.tar.gz"
|
| 13 |
|
| 14 |
IUSE=""
|
| 15 |
SLOT="0"
|
| 16 |
LICENSE="GPL-2"
|
| 17 |
KEYWORDS="~amd64 ~x86"
|
| 18 |
|
| 19 |
DEPEND="gnome-base/nautilus
|
| 20 |
dev-libs/glib"
|
| 21 |
RDEPEND="${DEPEND}
|
| 22 |
net-fs/samba"
|
| 23 |
|
| 24 |
DOCS="AUTHORS ChangeLog NEWS README TODO"
|
| 25 |
|
| 26 |
USERSHARES_DIR="/var/lib/samba/usershare"
|
| 27 |
USERSHARES_GROUP="samba"
|
| 28 |
|
| 29 |
src_prepare() {
|
| 30 |
epatch "${WORKDIR}"/debian/patches/15_user-acl.patch
|
| 31 |
}
|
| 32 |
|
| 33 |
src_install() {
|
| 34 |
gnome2_src_install
|
| 35 |
keepdir ${USERSHARES_DIR}
|
| 36 |
}
|
| 37 |
|
| 38 |
pkg_postinst() {
|
| 39 |
enewgroup ${USERSHARES_GROUP}
|
| 40 |
einfo "Fixing ownership and permissions on ${EROOT}${USERSHARES_DIR}..."
|
| 41 |
chown root:${USERSHARES_GROUP} "${EROOT}"${USERSHARES_DIR}
|
| 42 |
chmod 01770 "${EROOT}"${USERSHARES_DIR}
|
| 43 |
|
| 44 |
einfo "To get nautilus-share working, add the lines"
|
| 45 |
einfo
|
| 46 |
einfo " # Allow users in group \"${USERSHARES_GROUP}\" to share"
|
| 47 |
einfo " # directories with the \"net usershare\" commands"
|
| 48 |
einfo " usershare path = \"${EROOT}${USERSHARES_DIR}\""
|
| 49 |
einfo " # Set a maximum of 100 user-defined shares in total"
|
| 50 |
einfo " usershare max shares = 100"
|
| 51 |
einfo " # Allow users to permit guest access"
|
| 52 |
einfo " usershare allow guests = yes"
|
| 53 |
einfo " # Only allow users to share directories they own"
|
| 54 |
einfo " usershare owner only = yes"
|
| 55 |
einfo
|
| 56 |
einfo "to the end of the [global] section in /etc/samba/smb.conf."
|
| 57 |
einfo
|
| 58 |
einfo "Users who are to be allowed to use nautilus-share should be added"
|
| 59 |
einfo "to the \"${USERSHARES_GROUP}\" group:"
|
| 60 |
einfo
|
| 61 |
einfo "# gpasswd -a USER ${USERSHARES_GROUP}"
|
| 62 |
einfo
|
| 63 |
einfo "Users may need to log out and in again for the group assignment to"
|
| 64 |
einfo "take effect and to restart Nautilus."
|
| 65 |
einfo
|
| 66 |
einfo "For more information, see USERSHARE in net(8)."
|
| 67 |
}
|