From a91e0e58f5849efa472bffc113f1a48db39c1c5d Mon Sep 17 00:00:00 2001 From: Toyam Cox Date: Fri, 24 Feb 2017 15:44:20 -0500 Subject: [PATCH] spim: clean template --- srcpkgs/spim/template | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/srcpkgs/spim/template b/srcpkgs/spim/template index f4eff051450..8bfebac0c15 100644 --- a/srcpkgs/spim/template +++ b/srcpkgs/spim/template @@ -1,8 +1,11 @@ # Template file for spim - -pkgname="spim" -version="8.0" +pkgname=spim +version=8.0 revision=1 +build_wrksrc=spim +build_style=configure +configure_script="./Configure" +make_install_target="install install-man" homepage="http://spimsimulator.sourceforge.net/" license="BSD" distfiles="http://pages.cs.wisc.edu/~larus/SPIM/spim-${version}.tar.gz" @@ -10,23 +13,20 @@ checksum="6f205776cb9fa112729507008843b289012190ed3131cbd426c610a58387ee4b" maintainer="Toyam Cox " hostmakedepends="flex" short_desc="Self-contained simulator/debugger that runs MIPS32 programs" -do_configure() { - cd spim + +pre_configure() { sed '/Copyright (c) 1990-2010, James R. Larus./,+26!d' README > LICENSE sed -i Makefile \ - -e 's:EXCEPTION_DIR = /usr/local/lib/spim:EXCEPTION_DIR = /usr/share/spim:' \ - -e 's:CFLAGS =:CFLAGS +=:' \ - -e 's:LDFLAGS =:LDFLAGS +=:' \ - -e 's:CC = gcc:CC ?= gcc:' - CC="$CC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" ./Configure + -e 's:CFLAGS =:CFLAGS +=:' \ + -e 's:LDFLAGS =:LDFLAGS +=:' \ + -e 's:CC = gcc:CC ?= gcc:' \ + -e "s:BIN_DIR = .*:BIN_DIR = ${DESTDIR}/usr/bin/:" \ + -e "s:EXCEPTION_DIR = .*:EXCEPTION_DIR = ${DESTDIR}/usr/share/spim/:" \ + -e "s:MAN_DIR = .*:MAN_DIR = ${DESTDIR}/usr/share/man/man1/:" \ + -e "s:spim.man:spim.1:" + mv ../Documentation/{spim.man,spim.1} } -do_install() { - vbin spim/spim - vman Documentation/spim.man spim.1 - vlicense spim/LICENSE LICENSE.BSD - vinstall CPU/exceptions.s 755 /usr/share/spim/ -} -do_build() { - cd spim - make + +post_install() { + vlicense LICENSE }