postgresql12-12.0.recipe revision 842a697e
1SUMMARY="A powerful object-relational database system"
2DESCRIPTION="PostgreSQL is a powerful, open source object-relational database \
3system that uses and extends the SQL language combined with many features \
4that safely store and scale the most complicated data workloads. The origins \
5of PostgreSQL date back to 1986 as part of the POSTGRES project at the \
6University of California at Berkeley and has more than 30 years of active \
7development on the core platform.
8
9PostgreSQL has earned a strong reputation for its proven architecture, \
10reliability, data integrity, robust feature set, extensibility, and the \
11dedication of the open source community behind the software to consistently \
12deliver performant and innovative solutions. PostgreSQL runs on all major \
13operating systems, has been ACID-compliant since 2001, and has powerful \
14add-ons such as the popular PostGIS geospatial database extender. It is no \
15surprise that PostgreSQL has become the open source relational database of \
16choice for many people and organisations.
17
18Getting started with using PostgreSQL has never been easier - pick a project \
19you want to build, and let PostgreSQL safely and robustly store your data."
20HOMEPAGE="https://www.postgresql.org/"
21COPYRIGHT="1996-2019 PostgreSQL Global Development Group"
22LICENSE="PostgreSQL"
23REVISION="1"
24SOURCE_URI="http://ftp.postgresql.org/pub/source/v$portVersion/postgresql-$portVersion.tar.bz2"
25CHECKSUM_SHA256="cda2397215f758b793f741c86be05468257b0e6bcb1a6113882ab5d0df0855c6"
26SOURCE_DIR="postgresql-$portVersion"
27PATCHES="postgresql12-$portVersion.patchset"
28
29ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
30SECONDARY_ARCHITECTURES="x86"
31
32portVersionCompat="$portVersion compat >= ${portVersion%.*}"
33
34PROVIDES="
35	postgresql12$secondaryArchSuffix = $portVersionCompat
36	cmd:psql$secondaryArchSuffix = $portVersionCompat
37	lib:libecpg$secondaryArchSuffix = $portVersionCompat
38	lib:libecpg_compat$secondaryArchSuffix = $portVersionCompat
39	lib:libpgtypes$secondaryArchSuffix = $portVersionCompat
40	lib:libpq$secondaryArchSuffix = $portVersionCompat
41	"
42REQUIRES="
43	haiku$secondaryArchSuffix
44	lib:libcrypto$secondaryArchSuffix
45	lib:libicudata$secondaryArchSuffix
46	lib:libicui18n$secondaryArchSuffix
47	lib:libicuuc$secondaryArchSuffix
48	lib:libldap_r_2.4$secondaryArchSuffix
49	lib:libpam$secondaryArchSuffix
50	lib:libreadline$secondaryArchSuffix
51	lib:libssl$secondaryArchSuffix
52	lib:libxml2$secondaryArchSuffix
53	lib:libxslt$secondaryArchSuffix
54	lib:libz$secondaryArchSuffix
55	"
56
57PROVIDES_server="
58	postgresql12${secondaryArchSuffix}_server = $portVersionCompat
59	cmd:clusterdb$secondaryArchSuffix = $portVersionCompat
60	cmd:createdb$secondaryArchSuffix = $portVersionCompat
61	cmd:createlang$secondaryArchSuffix = $portVersionCompat
62	cmd:createuser$secondaryArchSuffix = $portVersionCompat
63	cmd:dropdb$secondaryArchSuffix = $portVersionCompat
64	cmd:droplang$secondaryArchSuffix = $portVersionCompat
65	cmd:dropuser$secondaryArchSuffix = $portVersionCompat
66	cmd:ecpg$secondaryArchSuffix = $portVersionCompat
67	cmd:initdb$secondaryArchSuffix = $portVersionCompat
68	cmd:pg_archivecleanup$secondaryArchSuffix = $portVersionCompat
69	cmd:pg_basebackup$secondaryArchSuffix = $portVersionCompat
70	cmd:pg_checksums$secondaryArchSuffix = $portVersionCompat
71	cmd:pg_config$secondaryArchSuffix = $portVersionCompat
72	cmd:pg_controldata$secondaryArchSuffix = $portVersionCompat
73	cmd:pg_ctl$secondaryArchSuffix = $portVersionCompat
74	cmd:pg_dump$secondaryArchSuffix = $portVersionCompat
75	cmd:pg_dumpall$secondaryArchSuffix = $portVersionCompat
76	cmd:pg_isready$secondaryArchSuffix = $portVersionCompat
77	cmd:pg_receivewal$secondaryArchSuffix = $portVersionCompat
78	cmd:pg_receivexlog$secondaryArchSuffix = $portVersionCompat
79	cmd:pg_recvlogical$secondaryArchSuffix = $portVersionCompat
80	cmd:pg_resetwal$secondaryArchSuffix = $portVersionCompat
81	cmd:pg_resetxlog$secondaryArchSuffix = $portVersionCompat
82	cmd:pg_restore$secondaryArchSuffix = $portVersionCompat
83	cmd:pg_rewind$secondaryArchSuffix = $portVersionCompat
84	cmd:pg_test_fsync$secondaryArchSuffix = $portVersionCompat
85	cmd:pg_test_timing$secondaryArchSuffix = $portVersionCompat
86	cmd:pg_upgrade$secondaryArchSuffix = $portVersionCompat
87	cmd:pg_verify_checksums$secondaryArchSuffix = $portVersionCompat
88	cmd:pg_waldump$secondaryArchSuffix = $portVersionCompat
89	cmd:pg_xlogdump$secondaryArchSuffix = $portVersionCompat
90	cmd:pgbench$secondaryArchSuffix = $portVersionCompat
91	cmd:postgres$secondaryArchSuffix = $portVersionCompat
92	cmd:postmaster$secondaryArchSuffix = $portVersionCompat
93	cmd:reindexdb$secondaryArchSuffix = $portVersionCompat
94	cmd:vacuumdb$secondaryArchSuffix = $portVersionCompat
95	"
96REQUIRES_server="
97	haiku$secondaryArchSuffix
98	postgresql2${secondaryArchSuffix} == $portVersion base
99	lib:libcrypto$secondaryArchSuffix
100	lib:libicudata$secondaryArchSuffix
101	lib:libicui18n$secondaryArchSuffix
102	lib:libicuuc$secondaryArchSuffix
103	lib:libldap_r_2.4$secondaryArchSuffix
104	lib:libpam$secondaryArchSuffix
105	lib:libpq$secondaryArchSuffix
106	lib:libreadline$secondaryArchSuffix
107	lib:libssl$secondaryArchSuffix
108	lib:libxml2$secondaryArchSuffix
109	lib:libxslt$secondaryArchSuffix
110	lib:libz$secondaryArchSuffix
111	"
112
113PROVIDES_devel="
114	postgresql12${secondaryArchSuffix}_devel = $portVersion
115	devel:libpgport$secondaryArchSuffix = $portVersion
116	devel:libpgcommon$secondaryArchSuffix = $portVersion
117	devel:libpgcommon_shlib$secondaryArchSuffix = $portVersion
118	devel:libecpg$secondaryArchSuffix = $portVersion
119	devel:libpgport_shlib$secondaryArchSuffix = $portVersion
120	devel:libpgfeutils$secondaryArchSuffix = $portVersion
121	devel:libpgtypes$secondaryArchSuffix = $portVersion
122	devel:libpq$secondaryArchSuffix = $portVersion
123	devel:libecpg_compat$secondaryArchSuffix = $portVersion
124	"
125REQUIRES_devel="
126	postgresql12${secondaryArchSuffix} == $portVersion base
127	"
128
129CONFLICTS_server="
130	postgresql
131	postgresql$secondaryArchSuffix
132	"
133
134BUILD_REQUIRES="
135	devel:libcrypto$secondaryArchSuffix
136	devel:libicudata$secondaryArchSuffix
137	devel:libicui18n$secondaryArchSuffix
138	devel:libicuuc$secondaryArchSuffix
139	devel:libldap$secondaryArchSuffix
140	devel:libpam$secondaryArchSuffix
141	devel:libreadline$secondaryArchSuffix
142	devel:libssl$secondaryArchSuffix
143	devel:libxml2$secondaryArchSuffix
144	devel:libxslt$secondaryArchSuffix
145	devel:libz$secondaryArchSuffix
146	"
147BUILD_PREREQUIRES="
148	haiku${secondaryArchSuffix}_devel
149	cmd:aclocal
150	cmd:autoconf
151	cmd:automake
152	cmd:autoheader
153	cmd:awk
154	cmd:bison
155	cmd:flex
156	cmd:gcc$secondaryArchSuffix
157	cmd:ld$secondaryArchSuffix
158	cmd:libtoolize$secondaryArchSuffix
159	cmd:make
160	cmd:m4
161	cmd:pkg_config$secondaryArchSuffix
162	cmd:touch
163	"
164
165BUILD()
166{
167	libtoolize --force --copy --install
168	autoreconf -i
169
170	touch src/template/haiku # AFAIK it should be empty
171	touch config/missing # shouldn't be required
172
173	CFLAGS=-D_BSD_SOURCE runConfigure ./configure \
174		--with-icu \
175		--with-ldap \
176		--with-libxml \
177		--with-libxslt \
178		--with-openssl \
179		--with-pam \
180		--with-template=haiku
181	make $jobArgs
182}
183
184INSTALL()
185{
186	make install
187
188	prepareInstalledDevelLibs libpgport \
189		libpgcommon \
190		libpgcommon_shlib \
191		libpgport_shlib \
192		libecpg \
193		libpgtypes \
194		libpq \
195		libecpg_compat \
196		libpgfeutils
197	fixPkgconfig
198
199	mkdir -p $developLibDir/postgresql/pgxs
200	mv $libDir/postgresql/pgxs $developLibDir/postgresql/
201
202	# we want to keep the psql command in the base package
203	mv $binDir/psql psql_tmp
204
205	# all other commands go in the server package
206	packageEntries server \
207		$binDir \
208		$dataDir/postgresql \
209		$libDir/postgresql
210
211	mkdir -p $binDir
212	mv psql_tmp $binDir/psql
213
214	packageEntries devel \
215		$developDir
216}
217
218TEST()
219{
220	LIBRARY_PATH="$sourceDir/tmp_install/packages/postgresql-$portVersion-$REVISION/.self/lib${LIBRARY_PATH:+:$LIBRARY_PATH}"
221	make check
222}
223