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:
1818 export PGPM_INSTALL_ROOT=" $( DEB_BUILDDIR) /debian/<%= deb_pkg_name(pkg_type) %>" ; \
1919 ./prepare_artifacts.sh
2020
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 %>
2235
2336<% else %>
2437% :
2538 dh $@
2639
27- build :
28- # Custom build commands
29- echo " --> BUILD"
30-
3140install :
3241 echo " --> INSTALL"
3342 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
77 [ ]
88 end
99
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-
1910 def source_url_directory_name
2011 nil
2112 end
Original file line number Diff line number Diff line change 33module Pgpm
44 class Package
55 module Make
6- def build_steps
7- return [ Pgpm ::Commands ::Make . new ( "PG_CONFIG=$PG_CONFIG" ) ] if makefile_present?
86
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
914 super
1015 end
1116
1217 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
1524 super
1625 end
1726
1827 def makefile_present?
1928 !Dir . glob ( %w[ Makefile GNUmakefile makefile ] , base : source . to_s ) . empty?
2029 end
30+
2131 end
32+
2233 end
2334end
Original file line number Diff line number Diff line change @@ -38,23 +38,21 @@ def build_dependencies
3838 super + deps
3939 end
4040
41- def build_info
41+ def configure_steps
4242 case Pgpm ::OS . in_scope . class . name
4343 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\" " ]
4845 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" ]
5856 end
5957 end
6058
You can’t perform that action at this time.
0 commit comments