File tree Expand file tree Collapse file tree 4 files changed +41
-32
lines changed Expand file tree Collapse file tree 4 files changed +41
-32
lines changed Original file line number Diff line number Diff line change @@ -18,16 +18,25 @@ override_dh_install:
18
18
export PGPM_INSTALL_ROOT=" $( DEB_BUILDDIR) /debian/<%= deb_pkg_name(pkg_type) %>" ; \
19
19
./prepare_artifacts.sh
20
20
21
- <% = self.package.build_info[:rules] %>
21
+ <% if self.package.configure_steps.size > 0 %>
22
+ override_dh_auto_configure :
23
+ < %= self.package.configure_steps.join(" \n\t" ) %>
24
+ <% end %>
25
+
26
+ <% if self.package.build_steps.size > 0 %>
27
+ override_dh_build :
28
+ < %= self.package.build_steps.join(" \n\t" ) %>
29
+ <% end %>
30
+
31
+ <% if self.package.install_steps.size > 0 %>
32
+ override_dh_install :
33
+ < %= self.package.install_steps.join(" \n\t" ) %>
34
+ <% end %>
22
35
23
36
<% else %>
24
37
% :
25
38
dh $@
26
39
27
- build :
28
- # Custom build commands
29
- echo " --> BUILD"
30
-
31
40
install :
32
41
echo " --> INSTALL"
33
42
chmod +x " $( DEB_BUILDDIR) /install_default_control.sh"
Original file line number Diff line number Diff line change @@ -7,15 +7,6 @@ def configure_steps
7
7
[ ]
8
8
end
9
9
10
- def build_info
11
- case Pgpm ::OS . in_scope . class . name
12
- when "debian" , "ubuntu"
13
- { rules : "" }
14
- when "rocky+epel-9" , "redhat" , "fedora"
15
- { build_steps : [ ] , install_steps : [ ] }
16
- end
17
- end
18
-
19
10
def source_url_directory_name
20
11
nil
21
12
end
Original file line number Diff line number Diff line change 3
3
module Pgpm
4
4
class Package
5
5
module Make
6
- def build_steps
7
- return [ Pgpm ::Commands ::Make . new ( "PG_CONFIG=$PG_CONFIG" ) ] if makefile_present?
8
6
7
+ def build_steps
8
+ case Pgpm ::OS . in_scope . class . name
9
+ when "debian" , "ubuntu"
10
+ return [ ]
11
+ when "rocky+epel-9" , "redhat" , "fedora"
12
+ return [ Pgpm ::Commands ::Make . new ( "PG_CONFIG=$PG_CONFIG" ) ] if makefile_present?
13
+ end
9
14
super
10
15
end
11
16
12
17
def install_steps
13
- return [ Pgpm ::Commands ::Make . new ( "install" , "DESTDIR=$PGPM_BUILDROOT" , "PG_CONFIG=$PG_CONFIG" ) ] if makefile_present?
14
-
18
+ case Pgpm ::OS . in_scope . class . name
19
+ when "debian" , "ubuntu"
20
+ return [ ]
21
+ when "rocky+epel-9" , "redhat" , "fedora"
22
+ return [ Pgpm ::Commands ::Make . new ( "install" , "DESTDIR=$PGPM_BUILDROOT" , "PG_CONFIG=$PG_CONFIG" ) ] if makefile_present?
23
+ end
15
24
super
16
25
end
17
26
18
27
def makefile_present?
19
28
!Dir . glob ( %w[ Makefile GNUmakefile makefile ] , base : source . to_s ) . empty?
20
29
end
30
+
21
31
end
32
+
22
33
end
23
34
end
Original file line number Diff line number Diff line change @@ -38,23 +38,21 @@ def build_dependencies
38
38
super + deps
39
39
end
40
40
41
- def build_info
41
+ def configure_steps
42
42
case Pgpm ::OS . in_scope . class . name
43
43
when "debian" , "ubuntu"
44
- {
45
- rules : "override_dh_auto_configure:\n " +
46
- "\t dh_auto_configure -- -DCMAKE_BUILD_TYPE=\" Release\" "
47
- }
44
+ [ "dh_auto_configure -- -DCMAKE_BUILD_TYPE=\" Release\" " ]
48
45
when "rocky+epel-9" , "redhat" , "fedora"
49
- {
50
- build_steps : [
51
- "./bootstrap -DPG_CONFIG=$PG_CONFIG #{ bootstrap_flags . map { |f | "-D#{ f } " } . join ( " " ) } " ,
52
- "cmake --build build --parallel"
53
- ] ,
54
- install_steps : [
55
- "DESTDIR=$PGPM_BUILDROOT cmake --build build --target install"
56
- ]
57
- }
46
+ [ ]
47
+ end
48
+ end
49
+
50
+ def install_steps
51
+ case Pgpm ::OS . in_scope . class . name
52
+ when "debian" , "ubuntu"
53
+ [ ]
54
+ when "rocky+epel-9" , "redhat" , "fedora"
55
+ [ "DESTDIR=$PGPM_BUILDROOT cmake --build build --target install" ]
58
56
end
59
57
end
60
58
You can’t perform that action at this time.
0 commit comments