#!/bin/sh # This is an executable script so that # 1) we can dynamically determine the installation path (which contains the arch triplet) # 2) we don't have to keep track of whether the perl-base modules are arch-all (usr/share) # or arch-only (usr/lib). Wildcards in dh_install are not quite enough for this. # This is normally inherited from debian/rules # but just in case somebody calls us directly archtriplet=${archtriplet:-$(dpkg-architecture -qDEB_HOST_MULTIARCH)} cat </dev/null lib=$(ls -d usr/lib/*/perl/*/$f) 2>/dev/null if [ -z "$lib$share" ]; then echo "No match for $f" 1>&2 exit 1 fi if [ -n "$lib" ] && [ -n "$share" ]; then echo "Several matches for $f" 1>&2 exit 1 fi echo "$lib$share" usr/lib/$archtriplet/perl-base/$(dirname $f) done <