Skip to content

Commit 1f8b9b2

Browse files
author
qount25
committed
WIP: Timescaledb package with #build_info_for() for Debian and RedHat
1 parent 29b258b commit 1f8b9b2

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

packages/timescaledb.rb

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# frozen_string_literal: true
2+
3+
class Timescaledb < Pgpm::Package
4+
github "timescale/timescaledb"
5+
6+
def description
7+
"An open-source time-series SQL database optimized for fast ingest and " +
8+
"complex queries"
9+
end
10+
11+
def licence
12+
"Timescale License"
13+
end
14+
15+
def summary
16+
"TimescaleDB is an open-source database designed to make SQL " +
17+
"scalable for time-series data. It is engineered up from PostgreSQL " +
18+
"and packaged as a PostgreSQL extension, providing automatic " +
19+
"partitioning across time and space (partitioning key), as well as " +
20+
"full SQL support."
21+
end
22+
23+
def build_info_for(os)
24+
case os.downcase
25+
when "debian", "ubuntu"
26+
{
27+
dependencies: [],
28+
build_dependencies: ["openssl-dev", "cmake"],
29+
rules: "override_dh_auto_configure:\n" +
30+
" dh_auto_configure -- -DCMAKE_BUILD_TYPE=\"Release\""
31+
}
32+
when "rocky", "redhat", "fedora"
33+
{
34+
dependencies: [],
35+
build_dependencies: ["openssl-devel", "cmake"],
36+
build_steps: [
37+
"./bootstrap -DPG_CONFIG=$PG_CONFIG #{bootstrap_flags.map { |f| "-D#{f}" }.join(" ")}",
38+
"cmake --build build --parallel"
39+
],
40+
install_steps: [
41+
"DESTDIR=$PGPM_BUILDROOT cmake --build build --target install"
42+
]
43+
}
44+
}
45+
end
46+
end
47+
48+
protected
49+
50+
def bootstrap_flags
51+
[]
52+
end
53+
54+
end

0 commit comments

Comments
 (0)