#!/bin/sh
set -e

name=openafs
ivversionappend=+invirt3

dir=$(cd "$(dirname "$0")"; pwd)

hack_package () {
    append_description <<EOF
 .
 This package was rebuilt for the Invirt project to allow
 encrypting communication with the ptserver, and to include
 PIC versions of the AFS libraries.
EOF

    QUILT_PATCHES=debian/patches quilt import "$dir/secure-pts"
    add_changelog 'Allow encrypting requests to the ptserver.'

    QUILT_PATCHES=debian/patches quilt import "$dir/pic-afs-libs"
    echo 'debian/tmp/usr/lib/libafsauthent_pic.a  usr/lib' >>debian/libopenafs-dev.install
    echo 'debian/tmp/usr/lib/libafsrpc_pic.a      usr/lib' >>debian/libopenafs-dev.install
    add_changelog 'Install PIC versions of libraries.'

    add_invirt_provides
    munge_sections
}

. ../common/invirtificator.sh
