File tree Expand file tree Collapse file tree 3 files changed +29
-31
lines changed Expand file tree Collapse file tree 3 files changed +29
-31
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,16 @@ def arch
53
53
end
54
54
end
55
55
56
+ def cmds_if_not_empty ( cmds , else_echo )
57
+ if cmds . nil? || cmds . empty?
58
+ return "\t echo \" #{ else_echo } \" "
59
+ else
60
+ cmds . map! { |c | c . to_s }
61
+ cmds . map! { |c | c . gsub ( "$" , "$$" ) }
62
+ return cmds . join ( "\t " )
63
+ end
64
+ end
65
+
56
66
end
57
67
end
58
68
end
Original file line number Diff line number Diff line change @@ -9,44 +9,32 @@ export PGPM_INSTALL_ROOT = "$(CURDIR)/debian/<%= deb_pkg_name(pkg_type) %>"
9
9
10
10
<% if pkg_type == :versioned % >
11
11
% :
12
- echo " --> % rules target"
12
+ dh $@
13
+
14
+ override_dh_auto_configure :
15
+ echo " --> configuring"
16
+ < %= cmds_if_not_empty self.package.configure_steps, ' ...nothing to configure' %>
13
17
14
- build :
15
- echo " --> build target "
16
- < %= self.package.build_steps.join( " \n\t " ).gsub( ' $ ' , ' $$ ' ) %>
18
+ override_dh_auto_build :
19
+ echo " --> building "
20
+ < %= cmds_if_not_empty self.package.build_steps, ' ...nothing to build ' %>
17
21
18
- install : build
19
- mkdir -p $$ PGPM_INSTALL_ROOT
20
- echo " --> install target "
21
- < %= self.package.install_steps.join( " \n\t " ).gsub( ' $ ' , ' $$ ' ) %>
22
+ override_dh_auto_install :
23
+ echo " --> installing "
24
+ dh_auto_install
25
+ < %= cmds_if_not_empty self.package.install_steps, ' ...no custom install steps ' %>
22
26
chmod +x " $$ DEB_BUILDDIR/prepare_artifacts.sh"
23
27
find $$ PGPM_INSTALL_ROOT -type f | sort - | sed ' s|^$$PGPM_INSTALL_ROOT||' > .pgpm_before | sort
24
28
./prepare_artifacts.sh
25
29
26
- build-arch :
27
- echo " --> build-arch"
28
-
29
- build-indep :
30
- echo " --> build-indep"
31
-
32
- binary : install
33
- echo " --> binary"
34
-
35
- binary-arch :
36
- echo " --> binary-arch"
37
-
38
- binary-indep :
39
- echo " --> binary-indep"
40
-
41
- clean :
42
- echo " --> clean"
43
-
44
30
<% else %>
45
31
% :
46
32
dh $@
47
33
48
- install :
34
+ override_dh_auto_install :
35
+ dh_auto_install
49
36
echo " --> INSTALL"
50
37
chmod +x " $$ DEB_BUILDDIR/install_default_control.sh"
51
38
./install_default_control.sh
39
+
52
40
<% end %>
Original file line number Diff line number Diff line change @@ -42,17 +42,17 @@ def configure_steps
42
42
case Pgpm ::OS . in_scope . class . name
43
43
when "debian" , "ubuntu"
44
44
[ "dh_auto_configure -- -DCMAKE_BUILD_TYPE=\" Release\" " ]
45
- when "rocky+epel-9" , "redhat" , "fedora"
46
- [ ]
45
+ else
46
+ super
47
47
end
48
48
end
49
49
50
50
def install_steps
51
51
case Pgpm ::OS . in_scope . class . name
52
- when "debian" , "ubuntu"
53
- [ ]
54
52
when "rocky+epel-9" , "redhat" , "fedora"
55
53
[ "DESTDIR=$PGPM_INSTALL_ROOT cmake --build build --target install" ]
54
+ else
55
+ super
56
56
end
57
57
end
58
58
You can’t perform that action at this time.
0 commit comments