Skip to content
Permalink
Browse files

mdocml: update to 1.13.4.

Revamp to use configure.local.
  • Loading branch information...
leahneukirchen committed Jul 14, 2016
1 parent bd0b255 commit 7eb2b8c2783abfd0959a317fb2d505969a200c1c
Showing with 22 additions and 19 deletions.
  1. +22 −19 srcpkgs/mdocml/template
@@ -1,9 +1,9 @@
# Template file for 'mdocml'
pkgname=mdocml
version=1.13.3
revision=7
version=1.13.4
revision=1
build_style=configure
makedepends="sqlite-devel"
makedepends="sqlite-devel zlib-devel"
depends="less"
provides="man-0_1"
conf_files="/etc/man.conf"
@@ -12,7 +12,7 @@ maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="ISC"
homepage="http://mdocml.bsd.lv"
distfiles="${homepage}/snapshots/mdocml-$version.tar.gz"
checksum=23ccab4800d50bf4c327979af5d4aa1a6a2dc490789cb67c4c3ac1bd40b8cad8
checksum=0a55c1addb188071d6f784599303656b8465e98ec6b2f4f264e12fb96d79e0ef

alternatives="
man:man:/usr/bin/mandoc
@@ -23,33 +23,36 @@ alternatives="
man:apropos.1:/usr/share/man/man1/mandoc-apropos.1"

post_extract() {
sed -i 's,PREFIX=.*,PREFIX=/usr,g' configure
sed -i 's,${PREFIX}/man,${PREFIX}/share/man,g' configure
sed -i "s,/usr/local,${XBPS_CROSS_BASE}/usr,g" configure
sed -i 's/\[\[:<:\]\]%s\[\[:>:\]\]/\\\\<%s\\\\>/' mansearch.c

# use less(1)
sed -i 's,bin/more,bin/less,g' main.c *.1
sed -i 's,.Xr more,.Xr less,g' *.1
sed -i 's,"more","less",g' manpage.c
sed -i 's,"more,"less,g' manpage.c main.c
}
pre_build() {
sed -i "s,CFLAGS.* ,& ${CFLAGS} ,g" Makefile.local
pre_configure() {
cat >configure.local <<EOF
PREFIX=/usr
SBINDIR=/usr/bin
MANDIR=/usr/share/man
OSNAME="Void Linux"
BINM_SOELIM=mandoc-soelim
MANM_ROFF="mandoc_roff"
LDFLAGS="$LDFLAGS"
CFLAGS="$CFLAGS"
CC="$CC"
HAVE_REWB_BSD=0
EOF
}
post_install() {
# Rename mans for alternatives
for f in apropos man whatis; do
mv ${DESTDIR}/usr/share/man/man1/{$f,mandoc-$f}.1
done
# Use symlinks.
# Use alternatives.
rm -f ${DESTDIR}/usr/bin/{apropos,man,whatis}
rm -f ${DESTDIR}/usr/sbin/makewhatis
ln -sfr ${DESTDIR}/usr/bin/mandoc ${DESTDIR}/usr/bin/makewhatis
# man(1) configuration file
vconf ${FILESDIR}/man.conf
# remove devel stuff.
rm -rf ${DESTDIR}/usr/{include,lib}
# remove conflicting file
rm -f ${DESTDIR}/usr/share/man/man7/roff.7
# remove devel stuff
rm -rf ${DESTDIR}/usr/{include,lib,share/man/man3}
# Daily cron job to generate man db
vinstall ${FILESDIR}/makewhatis.cron.daily 755 etc/cron.daily makewhatis
}

0 comments on commit 7eb2b8c

Please sign in to comment.
You can’t perform that action at this time.