diff options
author | Tiziano Müller <dev-zero@gentoo.org> | 2006-07-25 22:13:41 +0000 |
---|---|---|
committer | Tiziano Müller <dev-zero@gentoo.org> | 2006-07-25 22:13:41 +0000 |
commit | 7df5020d9c54c3a08326e1eb407f60bbe336ea29 (patch) | |
tree | fe3d08ea8b044d9de5e4ef462dc0a444b3fe64c2 /sys-devel/scratchbox/scratchbox-0.9.8.8.ebuild | |
parent | games-puzzle/pythonsudoku: Version bump to v0.12.1, uneeded patches removed (diff) | |
download | sunrise-7df5020d9c54c3a08326e1eb407f60bbe336ea29.tar.gz sunrise-7df5020d9c54c3a08326e1eb407f60bbe336ea29.tar.bz2 sunrise-7df5020d9c54c3a08326e1eb407f60bbe336ea29.zip |
sys-devel/scratchbox: Version bump to v0.9.8.8
svn path=/sunrise/; revision=706
Diffstat (limited to 'sys-devel/scratchbox/scratchbox-0.9.8.8.ebuild')
-rw-r--r-- | sys-devel/scratchbox/scratchbox-0.9.8.8.ebuild | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/sys-devel/scratchbox/scratchbox-0.9.8.8.ebuild b/sys-devel/scratchbox/scratchbox-0.9.8.8.ebuild new file mode 100644 index 000000000..13371d874 --- /dev/null +++ b/sys-devel/scratchbox/scratchbox-0.9.8.8.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils + +MAJOR_VERSION=${PV%\.[0-9]} + +SBOX_GROUP="sbox" +RESTRICT="strip" + +DESCRIPTION="Scratchbox is a cross-compilation toolkit designed to make embedded Linux application development easier." +HOMEPAGE="http://www.scratchbox.org/" +SRC_URI="http://scratchbox.org/download/files/sbox-releases/${MAJOR_VERSION}/tarball/scratchbox-core-${PV}.tar.gz + http://scratchbox.org/download/files/sbox-releases/${MAJOR_VERSION}/tarball/scratchbox-libs-${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +TARGET_DIR="/opt/scratchbox" + +S=${WORKDIR}/scratchbox + +src_install() { + cd "${S}" + dodir ${TARGET_DIR} + # doins doesn't work with symlinks, getting "file not found" with doins + cp -pRP ./* "${D}/${TARGET_DIR}" + dosym opt/scratchbox scratchbox + + # scratchbox service loader + newinitd "${FILESDIR}/scratchbox.rc" scratchbox || die "newinitd failed" + + # group already created + echo ${SBOX_GROUP} > "${D}/${TARGET_DIR}/.run_me_first_done" +} + +pkg_preinst() { + einfo "Creating group sbox" + enewgroup "${SBOX_GROUP}" || die "adding group '${SBOX_GROUP}' failed" +} + +pkg_postinst() { + elog + elog "You need to run:" + elog "\"emerge --config =${CATEGORY}/${PF}\"" + elog "to set permissions right and setup scratchbox and users" + elog + elog "For further documentation about how to setup" + elog "scratchbox for your development needs have a look at" + elog "http://scratchbox.org/documentation/user/scratchbox-${MAJOR_VERSION}/" + elog + elog "Also note that when you reboot you should run:" + elog "/etc/init.d/scratchbox start" + elog "before trying to run scratchbox." + elog "You can also add it to the default runlevel:" + elog "rc-update add scratchbox default" + elog + elog "Type /opt/scratchbox/login to start scratchbox." + elog +} + +pkg_postrm() { + elog + elog "To remove all traces of scratchbox you will need to remove the file" + elog "/etc/init.d/scratchbox. Don't forget to delete the sbox group." + elog +} + +pkg_config() { + if [ `id -u` != "0" ]; then + ewarn "Must be root to run this" + die "not root" + fi + + einfo "Do you want to configure scratchbox? [Yes/No]" + einfo "Note: This will set permissions and copy files from the system into the scratchbox" + read choice + echo + case "$choice" in + y*|Y*|"") + "${TARGET_DIR}/sbin/sbox_configure" "no" ${SBOX_GROUP} || die "sbox_configure failed" + ;; + *) + ;; + esac + + mkdir -p "${TARGET_DIR}/scratchbox/users" + + while true; do + einfo "Existing users:" + einfo $(ls "${TARGET_DIR}/users") + echo + + einfo "Create new user (leaf empty to skip): " + read newuser + case "$newuser" in + "") + break; + ;; + *) + einfo "Note: users have to be in the '${SBOX_GROUP}' to be able to login into the scratchbox" + "${TARGET_DIR}/sbin/sbox_adduser" ${newuser} || die "sbox_adduser failed" + ;; + esac + done + + einfo "Configuration finished. Make sure you run '/etc/init.d/scratchbox start' before logging in." +} |