Debian Codegraph @

perllib/Debian/Debhelper/Sequence/kf5.pm

raw
1 {
2 package Debian::Debhelper::Sequence::kf5;
3 use Debian::Debhelper::Dh_Version;
4 use Debian::Debhelper::Dh_Lib qw(error);
5
6 sub ensure_debhelper_version {
7 my @v = split(/\./, $Debian::Debhelper::Dh_Version::version);
8 if ($v[0] > $_[0]) {
9 return 1;
10 }
11 elsif ($v[0] == $_[0]) {
12 if ($v[1] > $_[1]) {
13 return 1;
14 }
15 elsif ($v[1] == $_[1]) {
16 return $1 >= $_[2] if ($v[2] =~ /^(\d+)/);
17 }
18 }
19 return 0;
20 }
21 unless (ensure_debhelper_version(7, 3, 16)) {
22 error "debhelper addon 'kf5' requires debhelper 7.3.16 or later";
23 }
24
25 1;
26 }
27
28 # Build with kf5 buildsystem by default
29 add_command_options("dh_auto_configure", "--buildsystem=kf5");
30 add_command_options("dh_auto_build", "--buildsystem=kf5");
31 add_command_options("dh_auto_test", "--buildsystem=kf5");
32 add_command_options("dh_auto_install", "--buildsystem=kf5");
33 add_command_options("dh_auto_clean", "--buildsystem=kf5");
34
35 # Omit libkdeinit5_* from dh_makeshlibs by default
36 add_command_options("dh_makeshlibs", "-Xusr/lib/libkdeinit5_*");
37
38 # Exclude kf5 documentation from dh_compress by default
39 add_command_options("dh_compress",
40 qw(-X.dcl -X.docbook -X-license -X.tag -X.sty -X.el));
41
42 insert_after("dh_install", "dh_movelibkdeinit");
43
44 1;