diff options
Diffstat (limited to 'net-misc/ltsp-server/ltsp-server-5.4.5.ebuild')
-rw-r--r-- | net-misc/ltsp-server/ltsp-server-5.4.5.ebuild | 169 |
1 files changed, 169 insertions, 0 deletions
diff --git a/net-misc/ltsp-server/ltsp-server-5.4.5.ebuild b/net-misc/ltsp-server/ltsp-server-5.4.5.ebuild new file mode 100644 index 0000000..b22af0c --- /dev/null +++ b/net-misc/ltsp-server/ltsp-server-5.4.5.ebuild @@ -0,0 +1,169 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="4" + +inherit autotools eutils + +DESCRIPTION="LTSP server" +HOMEPAGE="http://www.ltsp.org/" +SRC_URI="https://launchpad.net/ltsp/ltsp-trunk/${PV}/+download/ltsp-${PV}.tar.xz" +LICENSE="GPL-2" +SLOT="0" +RESTRICT="mirror" +KEYWORDS="~amd64 ~x86" +IUSE="doc dhcp examples nbd nfs nls +pulseaudio +X" +REQUIRED_USE="|| ( nbd nfs )" +# lsb-release - required in the help2man man page generation +DEPEND="sys-apps/lsb-release + nls? ( sys-devel/gettext )" +# xdm - we currently have to rely on /usr/lib/X11/xdm/Xsession +# iproute2 - ltsp-update-sshkeys requires ip +RDEPEND="net-misc/openssh + virtual/tftp + dhcp? ( || ( net-dns/dnsmasq net-misc/dhcp ) ) + nfs? ( + >net-fs/nfs-utils-1.1.5 + ) + nbd? ( + >=sys-apps/kicktoo-0.4.4-r2 + sys-apps/xinetd + >=sys-block/nbd-2.9.18 + sys-fs/squashfs-tools + ) + pulseaudio? ( + media-sound/pulseaudio + ) + X? ( + x11-apps/xdm + x11-base/xorg-server + ) + sys-fs/ltspfs + || ( >=sys-apps/kicktoo-0.4.4-r2 >sys-apps/quickstart-0.6 ) + sys-apps/iproute2 + >=app-portage/layman-1.3 + sys-boot/syslinux + net-misc/ldminfod" +S=${WORKDIR}/ltsp + + +src_prepare() { + pushd server/man + eautoreconf + popd + + # remove ALTLinux translations, we don't need them + use nls && rm -rf server/ALTLinux/configs/po +} + +src_configure() { + pushd server/man + ./configure --prefix="${D}/usr" || die "Could not configure manpages" + popd +} + +src_install() { + ltspshare="/usr/share/ltsp" + ltspconf="/etc/ltsp" + + # executables + dobin client/localapps/ltsp-localapps + dosbin server/ltsp-config + dosbin server/ltsp-info + dosbin server/ltsp-build-client + dosbin server/ltsp-update-kernels + dosbin server/ltsp-update-sshkeys + dosbin server/ltsp-chroot + + # plugins and libraries + insinto ${ltspshare} + newins common/ltsp-common-functions ltsp-server-common-functions + doins server/share/ltsp/ltsp-server-functions + doins server/Gentoo/share/ltsp/* + + insinto ${ltspshare}/plugins/ltsp-build-client/common + doins -r server/share/ltsp/plugins/ltsp-build-client/common/* + + insinto ${ltspshare}/plugins/ltsp-build-client/Gentoo + doins -r server/share/ltsp/plugins/ltsp-build-client/Gentoo/* + + # configuration + insinto ${ltspconf} + doins server/configs/ltsp-update-image.excludes + doins server/configs/ltsp-server.conf + doins server/Gentoo/configs/ltsp-build-client.conf + + insinto ${ltspconf}/profiles + doins server/Gentoo/configs/profiles/* + dosym quickstart-5.3.profile ${ltspconf}/profiles/quickstart.profile + dosym kicktoo-5.3.profile ${ltspconf}/profiles/kicktoo.profile + + # examples for ltsp-config + docinto examples + dodoc server/doc/examples/ltsp-server-dnsmasq.conf + dodoc server/configs/lts.conf + dodoc server/configs/dhcpd.conf + dosym ${P} /usr/share/doc/ltsp-server + docinto "" + + # man pages + doman client/localapps/doc/ltsp-localapps.1 + + pushd server/man + emake install || die "Could not make manpages" + popd + + + if use nbd; then + dosbin server/ltsp-update-image + dosbin server/ltsp-swapfile-delete + dosbin server/nbdswapd + + insinto /etc/xinetd.d + doins server/Gentoo/configs/xinetd.d/* + + insinto ${ltspconf} + doins server/configs/nbdswapd.conf + doins server/configs/nbd-server.allow + fi + + if use nls; then + pushd po + emake DESTDIR="${D}" install || die "Could not make po files" + popd + fi + + if use doc; then + dodoc common/doc/CodingStyle + dodoc server/doc/plugins + fi + + if use examples; then + dodoc -r client/localapps/doc/examples + fi +} + +pkg_postinst(){ + einfo "You can choose to install a 5.2 or a 5.3+ client by pointing" + einfo "to it's appropriate build profile in /etc/ltsp/profiles." + einfo "The default is set to a stable 5.3+ client." + + if use nbd; then + einfo + einfo "An NBD bootable client can be built by setting" + einfo "INITRAMFS_BUILDER=\"dracut\"." + fi + + if use nfs; then + einfo + einfo "An NFS bootable client can be built by setting" + einfo "INITRAMFS_BUILDER=\"genkernel\" or omitting this option." + fi + + if use X; then + einfo + einfo "Don't forget to install a window manager," + einfo "you can't log in with X onto your server without one." + fi +} |