Skip to content

Instantly share code, notes, and snippets.

@jaypeche
Created November 30, 2014 16:52
Show Gist options
  • Select an option

  • Save jaypeche/577e857435c1f5ea6c08 to your computer and use it in GitHub Desktop.

Select an option

Save jaypeche/577e857435c1f5ea6c08 to your computer and use it in GitHub Desktop.
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:
EAPI=4
inherit eutils linux-info multilib systemd
DESCRIPTION="The CCcam emulator for cardsharing"
HOMEPAGE="http://www.cccam.co/"
SRC_URI="http://dvb.oppserver.net/cams/cccam/${P}.zip"
LICENSE="CC-BY-3.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~mips ~ppc ~x86"
IUSE="-oscam -systemd"
RESTRICT="nomirror"
DEPEND=">=app-arch/unzip-5.52-r2"
RDEPEND="amd64? ( >=sys-devel/gcc-4.6.3[multilib]
>=sys-libs/glibc-2.16[multilib] )
oscam? ( media-tv/oscam )
systemd? ( sys-apps/gentoo-systemd-integration
>=sys-apps/systemd-204-r1 )"
CCCAM_CONF="/var/etc"
CCCAM_KEYS="/var/keys"
CCCAM_PREFIX="/usr/bin"
src_unpack() {
unpack ${A}
cd "${S}"
}
pkg_setup() {
if use systemd ; then
if ! linux_config_exists; then
eerror "Kernel configuration file doesn't exist"
elif ! linux_chkconfig_present GENTOO_LINUX_INIT_SYSTEMD; then
eerror "WARNING : GENTOO_LINUX_INIT_SYSTEMD not enabled in kernel"
fi
fi
}
src_install () {
einfo
if use amd64 && has_multilib_profile ; then
einfo "Install x86 binary (On amd64 multilib)"
dobin CCcam.x86 || die "dobin failed !"
dosym ${CCCAM_PREFIX}/CCcam.x86 ${CCCAM_PREFIX}/${PN}
fi
if use arm ; then
einfo "Install arm binary"
dobin CCcam.armeb || die "dobin failed !"
dosym ${CCCAM_PREFIX}/CCcam.armeb ${CCCAM_PREFIX}/${PN}
fi
if use mips ; then
einfo "Install mips binary"
dobin CCcam.mipsel || die "dobin failed !"
dosym ${CCCAM_PREFIX}/CCcam.mipsel ${CCCAM_PREFIX}/${PN}
fi
if use ppc ; then
einfo "Install ppc binary"
dobin CCcam.ppc || die "dobin failed !"
dosym ${CCCAM_PREFIX}/CCcam.ppc ${CCCAM_PREFIX}/${PN}
fi
if use x86 ; then
einfo "Install x86 binary"
dobin CCcam.x86 || die "dobin failed !"
dosym ${CCCAM_PREFIX}/CCcam.x86 ${CCCAM_PREFIX}/${PN}
fi
einfo "Copying configuration file"
insinto ${CCCAM_CONF}
doins CCcam.cfg || die "doins failed !"
einfo "Copying ChangeLog"
dodoc ChangeLog || die "dodoc failed !"
einfo "Creating folder for keys"
dodir ${CCCAM_KEYS} || die "dodir failed !"
if use systemd ; then
einfo "Install systemd unit"
systemd_dounit "${FILESDIR}/${PN}.service" || die "dounit failed !"
else
einfo "Install init runscript"
doinitd "${FILESDIR}/${PN}" || die "doinitd failed !"
fi
einfo
}
pkg_postinst() {
if [ ! -x "${CCCAM_PREFIX}/${PN}" ] ; then
eerror
eerror "The binary file could not be installed..."
eerror "Your Arch seems not to be supported !"
eerror
else
einfo
einfo "CCcam version ${PV} was successfully installed !"
einfo
fi
}
@jose445566

Copy link
Copy Markdown

saltar al contenido

Search…
Todos los gists
GitHub
Nueva esencia
@ jose445566
0
0@jaypechejaypeche / CCcam-2.3.0-r1.ebuild
Creado 4 years ago •

<script src="https://gist.github.com/jaypeche/577e857435c1f5ea6c08.js"></script>

Revisiones de código 1
CCcam-2.3.0-r1.ebuild

Copyright 1999-2014 Fundación Gentoo

Distribuido bajo los términos de la Licencia Pública General de GNU v2

$ Encabezado:

EAPI = 4

heredar eutils linux-info multilib systemd

DESCRIPTION = " El emulador de CCcam para compartir tarjetas "
HOMEPAGE = " http://www.cccam.co/ "

SRC_URI = " http://dvb.oppserver.net/cams/cccam/ $ {P} .zip "

LICENCIA = " CC-BY-3.0 "
SLOT = " 0 "
KEYWORDS = " ~ amd64 ~ arm ~ mips ~ ppc ~ x86 "
IUSE = " -oscam -sistema "

RESTRICT = " nomirror "

DEPEND = " > = app-arch / unzip-5.52-r2 "

RDEPEND = " amd64? (> = Sys-devel / gcc-4.6.3 [multilib]
> = sys-libs / glibc-2.16 [multilib])
oscam (media-tv / oscam)
systemd? (sys-apps / gentoo-systemd-integration
> = sys-apps / systemd-204-r1) "

CCCAM_CONF = " / var / etc "
CCCAM_KEYS = " / var / keys "
CCCAM_PREFIX = " / usr / bin "

src_unpack () {
desempaquetar $ {A}
cd " $ {S} "
}

pkg_setup () {
si usa systemd ; entonces
si ! linux_config_exists ; entonces
eerror "El archivo de configuración del kernel no existe "
elif ! linux_chkconfig_present GENTOO_LINUX_INIT_SYSTEMD ; entonces
eerror " ADVERTENCIA: GENTOO_LINUX_INIT_SYSTEMD no está habilitado en el kernel "
fi
fi
}

src_install () {
einfo
si usa amd64 && has_multilib_profile ; entonces
einfo " Instalar binario x86 (en amd64 multilib) "
dobin CCcam.x86 || morir " dobin falló! "
dosym $ {CCCAM_PREFIX} /CCcam.x86 $ {CCCAM_PREFIX} / $ {PN}
fi

si usar el brazo ;  entonces
	einfo " Instalar brazo binario "
	dobin CCcam.armeb || morir " dobin falló! "
	dosym $ {CCCAM_PREFIX} /CCcam.armeb $ {CCCAM_PREFIX} / $ {PN}

fi

si usa mips ;  entonces
	einfo " Install mips binary "
	dobin CCcam.mipsel || morir " dobin falló! "
	dosym $ {CCCAM_PREFIX} /CCcam.mipsel $ {CCCAM_PREFIX} / $ {PN}
fi

si usa ppc ;  entonces
	einfo " Instalar ppc binario "
	dobin CCcam.ppc || morir " dobin falló! "
	dosym $ {CCCAM_PREFIX} /CCcam.ppc $ {CCCAM_PREFIX} / $ {PN}
fi

si usa x86 ;  entonces
	einfo " Instalar binario x86 "
	dobin CCcam.x86 || morir " dobin falló! "
	dosym $ {CCCAM_PREFIX} /CCcam.x86 $ {CCCAM_PREFIX} / $ {PN}
fi

einfo " Copiando archivo de configuración "
    insinto $ {CCCAM_CONF}
    hace CCcam.cfg || muere " doins fallido! "

einfo " Copiando ChangeLog "
dodoc ChangeLog || morir " Dodoc fallido! "

einfo " Creando carpeta para llaves "
dodir $ {CCCAM_KEYS}  || morir " Dodir falló! "

si usa systemd ;  entonces
	einfo " Instalar la unidad systemd "
 	systemd_dounit " $ {FILESDIR} / $ {PN} .service "  || morir " no se pudo! "
más
	einfo " Install init runscript "
	doinitd " $ {FILESDIR} / $ {PN} "  || morir " doinitd falló! "
fi
einfo

}

pkg_postinst () {
si [ ! -x " $ {CCCAM_PREFIX} / $ {PN} " ] ; entonces
eerror
eerror " No se pudo instalar el archivo binario ... "
eerror " ¡Parece que tu arco no es compatible! "
eerror
más
einfo
einfo "¡La versión CCcam $ {PV} se instaló correctamente! "
einfo
fi
}

@ jose445566

Leave a comment
Adjunte archivos arrastrando y soltando, seleccionándolos o pegándolos desde el portapapeles.

El estilo con Markdown es compatible
© 2018 GitHub , Inc.
Condiciones
Intimidad
Seguridad
Estado
Ayuda
Contacta con GitHub
Precios
API
Formación
Blog
Acerca de
Presiona h para abrir una hovercard con más detalles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment