#!/bin/sh

name="vmanpg"
title="vmanpg"
package="vmanpg"
version="1.1"
build="1"
noarch="n"
build_info="Standard build."

info="Svgalib pager for man pages."
desc="vmanpg is an svgalib-based pager designed for viewing man pages,
which shows them in much the same way as 'xman'. It uses the mono
640x480 mode, and should work on all VGA cards. It supports only
a subset of the keys/commands supported by 'less', but all the most
commonly-used ones are available."
category="viewer/man"
environment="console/svgalib"
contact="$name@packages.packware.gnu.pl"
vendor="Packware Project"
vendor_id="pw"

requires=""
obsoletes=""
conflicts=""

docs_source="ChangeLog,COPYING,README*"
docs_cwd=""

strip_bin="y"
reset_own="y"
reset_dir="y"
reset_fil="y"
delete_cat="y"

. /usr/src/tgz/lib/builder.defs

add_source http://www.svgalib.org/rus/$name/$name-$version.tar.gz

# This fixes Makefile 'cause it installs executable as root.root (this is
# impossible here).
apply_patch vmanpg-makefile.pw.patch

# Set SUID on usr/bin/vmanpg to have permissions to use svgalib.
change_mod main usr/bin/vmanpg 4755

make_option PREFIX=/usr

# Constant options for make install.
install_option PREFIX=$pkg_main/usr

# Before compiling write the info file.
parent_package="$package"
write_info main

cd $src1

# Run make with options as given by function make_option.
do_make
# Run make install with options as given by function install_option.
do_install

rm -f $pkg_main/usr/man/man1/vman.1
gzip -9 $pkg_main/usr/man/man1/vmanpg.1
ln -s vmanpg.1.gz $pkg_main/usr/man/man1/vman.1.gz

make_docs

# Create package.
make_package main

# Delete temporary directories.
clean_up

# ChangeLog
#
# 2002/06/10 Jaroslaw Swierczynski <swiergot@intersec.pl>
# - Initial release.
#
