linamh/app-emulation/opencbm/opencbm-0.4.3_rc2.ebuild

68 lines
1.9 KiB
Bash
Raw Normal View History

2016-08-29 15:34:45 +02:00
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
2016-08-29 15:34:45 +02:00
EAPI="5"
2016-08-29 15:34:45 +02:00
inherit eutils toolchain-funcs linux-mod versionator udev
PV_MAJOR=$(get_major_version)
PV_MINOR=$(get_version_component_range 2)
DESCRIPTION="OpenCBM is a package to control and use serial devices as used by most Commodore (CBM) 8-bit mach"
HOMEPAGE="http://opencbm.trikaliotis.net/"
2016-08-29 15:34:45 +02:00
SRC_URI="http://www.fbriere.net/debian/dists/unstable/opencbm/src/opencbm_${PV/_/\~}.orig.tar.gz
https://launchpad.net/~mdeslaur/+archive/ppa/+files/opencbm_${PV/_/\~}.orig.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
IUSE="doc"
DEPEND="virtual/linux-sources
dev-embedded/cc65
app-text/linuxdoc-tools"
S="${WORKDIR}"/${PN}-${PV/_/}
BUILD_PARAMS="KDIR=$KERNEL_DIR"
MODULE_NAMES="cbm(misc:${S}/sys/linux:${S}/sys/linux)"
BUILD_TARGETS="all"
src_prepare() {
# convert linefeed
edos2unix `find . -name '*' -type f`
# 6502 sources ar always up to date
touch `find . -name '*.?65' -type f`
# add debian patches no demo & doc & no kernel
EPATCH_SOURCE="${FILESDIR}/${PV}" EPATCH_SUFFIX="diff" \
EPATCH_FORCE="yes" epatch
# sed correct path
sed -e 's,^PREFIX.*,PREFIX = /usr,' \
-e 's,/man/man1,/share/man/man1,g' \
-e 's,/info,/share/info,g' -i ${S}/LINUX/config.make
# copy module makefile that don't intefer with gentoo kernel build system
cp ${FILESDIR}/Makefile ${S}/sys/linux/Makefile
}
src_compile() {
emake -f LINUX/Makefile CC="$(tc-getCC)" AR="$(tc-getAR)" showvars || die "showvars fail"
emake -f LINUX/Makefile CC="$(tc-getCC)" AR="$(tc-getAR)" || die "make fail"
linux-mod_src_compile
}
src_install() {
emake -f LINUX/Makefile PREFIX="${D}/usr" install
linux-mod_src_install
generate_modulesd
}
pkg_postinst() {
linux-mod_pkg_postinst
}
pkg_postrm() {
linux-mod_pkg_postrm
}