python-texttable: update to 1.3.1
[void-packages.git] / srcpkgs / msrc_base / template
blob6a542ac8dc7fda4d77bff3440c35597691144ef0
1 # Template file for 'msrc_base'
2 pkgname=msrc_base
3 version=2.44
4 revision=3
5 hostmakedepends="m4"
6 depends="m4 make"
7 short_desc="The pundits tool-chain from the NPC Guild (xapply etc.)"
8 maintainer="Christian Neukirchen <chneukirchen@gmail.com>"
9 license="BSD"
10 homepage="http://www.databits.net/~ksb/"
11 # Original download is gone
12 #distfiles="http://www.npcguild.org/~ksb/rpms/SOURCES/${pkgname}-${version}.tgz"
13 distfiles="http://distfiles.voidlinux.de/${pkgname}-${version}/${pkgname}-${version}.tgz"
14 checksum=7a0df7a302211539822a77bfde63c56f3afd88c093d278f80c3123b384510f55
15 nocross=yes
17 post_extract() {
18         sed -i s/ksh/bash/g Makefile
21 do_install() {
22         # This build system is pretty tangled: configure, build and
23         # install happens at the same time, so we just use  do_install.
25         # We use "make -e" extensively because passing things with
26         # spaces through mmsrc is a mess.
27         export SHELL=/bin/sh
28         export TOP=/usr
29         export DESTDIR=${DESTDIR/\/\///}
30         export PATH="$DESTDIR/usr/bin:$PATH"
31         export MKCMD="-I .:$DESTDIR/usr/lib/mkcmd/type:$DESTDIR/usr/lib/mkcmd"
32         export EXPLODE="-I .:$DESTDIR/usr/lib/explode"
33         export HOSTTYPE=LINUX
34         export HOSTOS=40100  # to be interpreted as 4.1.x
35         export SBIN=${DESTDIR}${TOP}/bin
37         # Inject XBPS's CFLAGS:
38         export DEBUG="$CFLAGS $LDFLAGS"
39         export LDFLAGS="$CFLAGS $LDFLAGS"
40         unset CFLAGS
42         make -C local/sbin/mmsrc -e clean boot
43         vbin local/sbin/mmsrc/mmsrc
44         make -C local/sbin/mmsrc -e clean
46         vmkdir usr/lib/explode
47         vmkdir usr/lib/hxmd
48         vmkdir usr/lib/mkcmd/type
50         make auto.cf
52         for _dir in \
53                 lib/hxmd lib/mkcmd lib/explode \
54                 bin/mkcmd bin/explode bin/ptbw bin/xclate bin/xapply bin/wrapw \
55                 sbin/msrc sbin/mmsrc sbin/hxmd
56         do (
57                 cd $wrksrc/local/$_dir
58                 mkdir -p $wrksrc/tmp/$_dir
59                 mmsrc \
60                         -y INTO=$wrksrc/tmp/$_dir \
61                         -C $wrksrc/auto.cf \
62                         -DHOST=localhost -DHOSTTYPE=$HOSTTYPE -DHOSTOS=$HOSTOS \
63                         -- make ${makejobs} -e boot
64         ) done
65         for _man in local/*/*/*.man; do
66                 case "$_man" in
67                         *makeme*|*dmz*|*manpage.cgi*) continue
68                 esac
69                 vman $_man ${_man%.man}.$(awk '/^.TH/{print $3}' $_man)
70         done
71         sed -i "s,$DESTDIR,,g" $DESTDIR/usr/lib/hxmd/auto.cf
73         vlicense LICENSE
74         sed -n '/Copyright/,/@(#)/p' local/lib/mkcmd/util_time.mc >LICENSE.Purdue
75         vlicense LICENSE.Purdue
78 msrc_base-devel_package() {
79         depends="${sourcepkg}>=${version}_${revision}"
80         short_desc+=" -- development files (mkcmd/explode)"
81         pkg_install() {
82                 vmove usr/bin/mkcmd
83                 vmove usr/bin/explode
84                 vmove usr/share/man/man1/explode.1
85                 vmove usr/share/man/man1/mkcmd.1
86                 vmove usr/share/man/man5/explode.5
87                 vmove usr/share/man/man5/mkcmd.5
88                 vmove usr/lib/mkcmd
89                 vmove usr/lib/explode
90         }