#!/usr/bin/perl -w

use strict;
use Debian::Debhelper::Dh_Lib;

insert_after("dh_install", "dh_fortran_mod");
insert_after("dh_install", "dh_fortran_lib");

# cmake, pkgconf  use info from lib
insert_after("dh_fortran_lib", "dh_fortran_cmake");
insert_after("dh_fortran_lib", "dh_fortran_pkgconf");

my @packages = getpackages();
my $tmpdir = "debian/tmp";
if (@packages == 1) {
    $tmpdir = $packages[0];
}
# warning("DEBUG: running with tmpdir $tmpdir");

# dwz will exit 1, breaking on patchelf
remove_command('dh_dwz');
1;
