#!/usr/bin/perl -w

=head1 NAME

dh_lv2config - run lv2config to build the LV2 #include directory tree

=cut

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

=head1 SYNOPSIS

B<dh_lv2config> [I<debhelper options>]

=head1 DESCRIPTION

B<dh_lv2config> is a debhelper program which will run lv2config to build
an include directory tree for all shipped LV2 extensions.

=head1 EXAMPLES

B<dh_lv2config> is usually called indirectly via the dh command.

        %:
               dh $@ --with lv2config

It could also be called after the B<dh_install> command explicitly,
as in the following example:

        binary-indep: install
              dh_testdir
              dh_testroot
              dh_installchangelogs
              dh_installdocs
              dh_installexamples
              dh_install
              dh_lv2config

=cut

init();

foreach my $package (@{$dh{DOPACKAGES}}) {
    my $tmp=tmpdir($package);
    my @lv2config_cmd = ('lv2config', '-d', "$tmp", '-b', "$tmp", '/usr/include/lv2', "$tmp" . '/usr/lib/lv2');
    doit(@lv2config_cmd);
}

=head1 SEE ALSO

L<debhelper(7)>, L<lv2config(1)>

=head1 AUTHOR

Alessio Treglia <alessio@debian.org>

=cut
