summaryrefslogtreecommitdiff
path: root/perllib/Debian/Debhelper/Sequence/kf5.pm
blob: 566d9776ad15a30e29f80e8321788e7b0ee40add (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
    package Debian::Debhelper::Sequence::kf5;
    use Debian::Debhelper::Dh_Version;
    use Debian::Debhelper::Dh_Lib qw(error);

    sub ensure_debhelper_version {
        my @v = split(/\./, $Debian::Debhelper::Dh_Version::version);
        if ($v[0] > $_[0]) {
            return 1;
        }
        elsif ($v[0] == $_[0]) {
            if ($v[1] > $_[1]) {
                return 1;
            }
            elsif ($v[1] == $_[1]) {
                return $1 >= $_[2] if ($v[2] =~ /^(\d+)/);
            }
        }
        return 0;
    }
    unless (ensure_debhelper_version(7, 3, 16)) {
        error "debhelper addon 'kf5' requires debhelper 7.3.16 or later";
    }

    1;
}

# Build with kf5 buildsystem by default
add_command_options("dh_auto_configure", "--buildsystem=kf5");
add_command_options("dh_auto_build", "--buildsystem=kf5");
add_command_options("dh_auto_test", "--buildsystem=kf5");
add_command_options("dh_auto_install", "--buildsystem=kf5");
add_command_options("dh_auto_clean", "--buildsystem=kf5");

# Omit libkdeinit5_* from dh_makeshlibs by default
add_command_options("dh_makeshlibs", "-Xusr/lib/libkdeinit5_*");

# Exclude kf5 documentation from dh_compress by default
add_command_options("dh_compress",
    qw(-X.dcl -X.docbook -X-license -X.tag -X.sty -X.el));

insert_after("dh_install", "dh_movelibkdeinit");

1;