void-packages/srcpkgs/msrc_base/template
2015-09-04 12:13:21 +02:00

88 lines
2.4 KiB
Bash

# Template file for 'msrc_base'
pkgname=msrc_base
version=2.44
revision=2
hostmakedepends="m4"
depends="m4 make"
short_desc="The pundits tool-chain from the NPC Guild (xapply etc.)"
maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
license="BSD"
homepage="http://www.databits.net/~ksb/"
distfiles="http://www.npcguild.org/~ksb/rpms/SOURCES/${pkgname}-${version}.tgz"
checksum=7a0df7a302211539822a77bfde63c56f3afd88c093d278f80c3123b384510f55
nocross=yes
post_extract() {
sed -i s/ksh/bash/g Makefile
}
do_install() {
# This build system is pretty tangled: configure, build and
# install happens at the same time, so we just use do_install.
# We use "make -e" extensively because passing things with
# spaces through mmsrc is a mess.
export SHELL=/bin/sh
export TOP=/usr
export DESTDIR=${DESTDIR/\/\///}
export PATH="$DESTDIR/usr/bin:$PATH"
export MKCMD="-I .:$DESTDIR/usr/lib/mkcmd/type:$DESTDIR/usr/lib/mkcmd"
export EXPLODE="-I .:$DESTDIR/usr/lib/explode"
export HOSTTYPE=LINUX
export HOSTOS=40100 # to be interpreted as 4.1.x
export SBIN=${DESTDIR}${TOP}/bin
# Inject XBPS's CFLAGS:
export DEBUG="$CFLAGS"
unset CFLAGS
make -C local/sbin/mmsrc -e clean boot
vbin local/sbin/mmsrc/mmsrc
make -C local/sbin/mmsrc -e clean
vmkdir usr/lib/explode
vmkdir usr/lib/hxmd
vmkdir usr/lib/mkcmd/type
make auto.cf
for _dir in \
lib/hxmd lib/mkcmd lib/explode \
bin/mkcmd bin/explode bin/ptbw bin/xclate bin/xapply bin/wrapw \
sbin/msrc sbin/mmsrc sbin/hxmd
do (
cd $wrksrc/local/$_dir
mkdir -p $wrksrc/tmp/$_dir
mmsrc \
-y INTO=$wrksrc/tmp/$_dir \
-C $wrksrc/auto.cf \
-DHOST=localhost -DHOSTTYPE=$HOSTTYPE -DHOSTOS=$HOSTOS \
-- make ${makejobs} -e boot
) done
for _man in local/*/*/*.man; do
case "$_man" in
*makeme*|*dmz*|*manpage.cgi*) continue
esac
vman $_man ${_man%.man}.$(awk '/^.TH/{print $3}' $_man)
done
sed -i "s,$DESTDIR,,g" $DESTDIR/usr/lib/hxmd/auto.cf
vlicense LICENSE
sed -n '/Copyright/,/@(#)/p' local/lib/mkcmd/util_time.mc >LICENSE.Purdue
vlicense LICENSE.Purdue
}
msrc_base-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" -- development files (mkcmd/explode)"
pkg_install() {
vmove usr/bin/mkcmd
vmove usr/bin/explode
vmove usr/share/man/man1/explode.1
vmove usr/share/man/man1/mkcmd.1
vmove usr/share/man/man5/explode.5
vmove usr/share/man/man5/mkcmd.5
vmove usr/lib/mkcmd
vmove usr/lib/explode
}
}