Skip to content

Commit de021bd

Browse files
authored
DOC-9315-C03 -- Improve example APT file (#632)
https://issues.couchbase.com/browse/DOC-9315 Post-Connect-GTM change tracking ticket
1 parent b32a7e3 commit de021bd

File tree

1 file changed

+81
-60
lines changed

1 file changed

+81
-60
lines changed

modules/c/pages/gs-install.adoc

Lines changed: 81 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ include::{root-partials}block-abstract.adoc[]
1717
:param-page: {page-relative-src-path}
1818
include::{root-partials}_get-started-topic-group.adoc[]
1919

20+
ifndef::bash-header[:bash-header: pass:q,a[source, bash, subs="attributes+", "macros+"]]
2021

2122
ifeval::["{prerelease}"=="BETA"]
2223
:is-beta:
2324
endif::[]
2425
// :this-release: {version-full}
2526

2627

27-
:install-closure: pass:q,a[At this point you are ready to start building the xref:gs-build.adoc[Getting Started] app], or doing your own thing with _Couchbase Lite for C_]
28+
:install-closure: pass:q,a[At this point you are ready to start building the xref:gs-build.adoc[Getting Started] app, or doing your own thing with _Couchbase Lite for C_]
2829

2930
:download-path: {url-downloads-mobile}
3031
:beta-url: https://packages.couchbase.com/releases/couchbase-lite-c/{version-full}/
@@ -43,9 +44,12 @@ endif::[]
4344
:release-dirs: pass:q,a[`{release-dir}` or `{release-dir-ee}`]
4445

4546

46-
== Introduction
4747

48+
49+
[#lbl-get-binaries]
50+
== Download
4851
_Couchbase Lite for C {version-full}_ is available for all supported platforms -- see: <<lbl-beta-platforms>>.
52+
4953
You can obtain the downloads here:
5054

5155
* _Android_, _iOS_ and _Windows_ -- {downloads-mobile--xref}.
@@ -67,10 +71,17 @@ The binary release download comprises a root directory ({release-dirs}), which c
6771
6872
:barsep: pass:q,a[ {nbsp}|{nbsp} ]
6973

70-
== Linux
71-
<<lbl-apt>> {barsep}
72-
<<lbl-deb>> {barsep}
73-
<<lbl-man>>
74+
For install instructions, see: +
75+
<<lbl-android>> {barsep}
76+
<<lbl-apt, Install for Linux (APT)>> {barsep}
77+
<<lbl-debt, Install for Linux (.deb)>> {barsep}
78+
<<lbl-macos>> {barsep}
79+
<<lbl-ios>> {barsep}
80+
<<lbl-windows>>
81+
82+
83+
[#lbl-linux]
84+
== Install for Linux
7485

7586
[#lbl-apt]
7687
=== Using APT
@@ -89,7 +100,7 @@ Just download the meta package that _apt_ requires to automatically get and inst
89100
curl::
90101
+
91102
--
92-
[source, linux, subs="attributes+"]
103+
[{bash-header}]
93104
----
94105
curl -O {url-apt-pkg}
95106
----
@@ -98,7 +109,7 @@ curl -O {url-apt-pkg}
98109
wget::
99110
+
100111
--
101-
[source, linux, subs="attributes+"]
112+
[{bash-header}]
102113
----
103114
wget {url-apt-pkg}
104115
----
@@ -113,7 +124,7 @@ wget {url-apt-pkg}
113124
apt::
114125
+
115126
--
116-
[source, linux, subs="attributes+"]
127+
[{bash-header}]
117128
----
118129
sudo apt install ./{url-apt-pkg-file}
119130
----
@@ -122,7 +133,7 @@ sudo apt install ./{url-apt-pkg-file}
122133
dpkg::
123134
+
124135
--
125-
[source, linux, subs="attributes+"]
136+
[{bash-header}]
126137
----
127138
sudo dpkg -i ./{url-apt-pkg-file}
128139
----
@@ -135,22 +146,29 @@ NOTE: This step is required only for the BETA release
135146
+
136147
Locate and edit the downloaded file `/etc/apt/sources.list.d/couchbase.list`
137148
+
149+
.Sample file contents
150+
====
151+
Here is an example of the `/etc/apt/sources.list.d/couchbase.list` file. The contents may differ slightly depending upon your Linux distro.
152+
153+
154+
[{bash-header}]
138155
----
139-
deb [ arch=amd64 ] http://packages.couchbase.com/releases/couchbase-server/enterprise/deb/ %DCODE_SERVER% %DCODE_SERVER%/main
140-
deb [ arch=amd64 ] http://packages.couchbase.com/releases/couchbase-server/community/deb/ %DCODE_SERVER% %DCODE_SERVER%/main
141-
deb http://packages.couchbase.com/releases/couchbase-lite-repo/enterprise/deb/ %DCODE_SERVER% %DCODE_SERVER%/main
142-
deb http://packages.couchbase.com/releases/couchbase-lite-repo/community/deb/ %DCODE_SERVER% %DCODE_SERVER%/main
143-
# deb [ arch=amd64 ] http://beta-packages.couchbase.com/releases/couchbase-server/enterprise/deb/ %DCODE_SERVER% %DCODE_SERVER%/main
144-
# deb [ arch=amd64 ] http://beta-packages.couchbase.com/releases/couchbase-server/community/deb/ %DCODE_SERVER% %DCODE_SERVER%/main
145-
// <.>
146-
# deb http://beta-packages.couchbase.com/releases/couchbase-lite-repo/enterprise/deb/ %DCODE_SERVER% %DCODE_SERVER%/main
147-
# deb http://beta-packages.couchbase.com/releases/couchbase-lite-repo/community/deb/ %DCODE_SERVER% %DCODE_SERVER%/main
156+
deb [ arch=amd64 ] http://packages.couchbase.com/releases/couchbase-server/enterprise/deb/ focal focal/main
157+
deb [ arch=amd64 ] http://packages.couchbase.com/releases/couchbase-server/community/deb/ focal focal/main
158+
deb http://packages.couchbase.com/releases/couchbase-lite-repo/enterprise/deb/ focal focal/main
159+
deb http://packages.couchbase.com/releases/couchbase-lite-repo/community/deb/ focal focal/main
160+
# deb [ arch=amd64 ] http://beta-packages.couchbase.com/releases/couchbase-server/enterprise/deb/ focal focal/main
161+
# deb [ arch=amd64 ] http://beta-packages.couchbase.com/releases/couchbase-server/community/deb/ focal focal/main
162+
<.>
163+
# deb http://beta-packages.couchbase.com/releases/couchbase-lite-repo/enterprise/deb/ focal focal/main
164+
# deb http://beta-packages.couchbase.com/releases/couchbase-lite-repo/community/deb/ focal focal/main
148165
----
149-
<.> Uncomment the two beta-package lines (those containing `couchbase-lite` in the URL)
166+
<.> Uncomment the two _beta-packages_ lines containing `couchbase-lite` in the URL.
167+
====
150168

151169
. Update the local package database
152170
+
153-
[source, linux, subs="attributes+,macros+"]
171+
[{bash-header}]
154172
----
155173
sudo apt update
156174
----
@@ -163,12 +181,12 @@ Enterprise::
163181
+
164182
--
165183
.Runtime Only
166-
[source, linux, subs="attributes+,macros+"]
184+
[{bash-header}]
167185
----
168186
sudo apt install libcblite
169187
----
170188
.Development
171-
[source, linux, subs="attributes+,macros+"]
189+
[{bash-header}]
172190
----
173191
sudo apt install libcblite-dev
174192
----
@@ -178,12 +196,12 @@ Community::
178196
+
179197
--
180198
.Runtime Only
181-
[source, linux, subs="attributes+,macros+"]
199+
[{bash-header}]
182200
----
183201
sudo apt install libcblite-community
184202
----
185203
.Development
186-
[source, linux, subs="attributes+,macros+"]
204+
[{bash-header}]
187205
----
188206
sudo apt install libcblite-dev-community
189207
----
@@ -205,7 +223,7 @@ Use your package manager to install from a local `.deb` file.
205223

206224
** For community version:
207225
+
208-
[source, bash, subs="attributes+, macros+"]
226+
[{bash-header}]
209227
----
210228

211229
sudo apt install ./{release-dir}
@@ -216,7 +234,7 @@ sudo apt install ./{release-dir-dev}
216234
217235
** For enterprise version:
218236
+
219-
[source, bash, subs="normal"]
237+
[{bash-header}]
220238
----
221239
sudo apt install ./{release-dir-ee}
222240

@@ -229,46 +247,46 @@ You just need to pass the `-lcblite` command-line flag to the compiler when you
229247
230248
{install-closure}
231249
232-
[#lbl-man]
233-
=== Manually
250+
// [#lbl-man]
251+
// === Manually
234252
235-
ifdef::is-beta[NOTE: These manual steps will not be needed beyond this BETA stage]
253+
// ifdef::is-beta[NOTE: These manual steps will not be needed beyond this BETA stage]
236254
237-
[#lbl-linux-steps]
238-
. Install dependencies
239-
+
240-
Users of `.zip` downloads will need to use their package manager to install the following dependencies: `libatomic1`, `libicu` footnote:[Use whichever version ships with your linux distro] and `zlib1g`.
241-
+
242-
For example to install for ARM32 on ARM64, you might do:
243-
+
244-
[source, bash, subs="normal"]
245-
----
246-
sudo dpkg --add-architecture armhf
247-
sudo apt install -y libatomic1:armhf libicu57:armhf zlib1g:armhf // <.>
248-
----
249-
<.> This example uses Debian{nbsp}9 libicu version; you should use the appropriate version for your distro.
250-
251-
. *Download* and *Unpack* the binary release -- see: {downloads-mobile--xref}
255+
// [#lbl-linux-steps]
256+
// . Install dependencies
257+
// +
258+
// Users of `.zip` downloads will need to use their package manager to install the following dependencies: `libatomic1`, `libicu` footnote:[Use whichever version ships with your linux distro] and `zlib1g`.
259+
// +
260+
// For example to install for ARM32 on ARM64, you might do:
261+
// +
262+
// [{bash-header}]
263+
// ----
264+
// sudo dpkg --add-architecture armhf
265+
// sudo apt install -y libatomic1:armhf libicu57:armhf zlib1g:armhf // <.>
266+
// ----
267+
// <.> This example uses Debian{nbsp}9 libicu version; you should use the appropriate version for your distro.
252268
253-
. Copy {release-dirs} to an appropriate location, for example `/usr/`
269+
// . *Download* and *Unpack* the binary release -- see: {downloads-mobile--xref}
254270
255-
. Confirm that `LD_LIBRARY_PATH` contains the path to either
256-
{release-dirs-lib}
271+
// . Copy {release-dirs} to an appropriate location, for example `/usr/`
257272
258-
. Add the appropriate {release-dirs-lib} path to your
259-
compiler library search path (`-L`)
273+
// . Confirm that `LD_LIBRARY_PATH` contains the path to either
274+
// {release-dirs-lib}
260275
261-
. Add the appropriate {release-dirs-include} path to your compiler's include path (`-I`)
276+
// . Add the appropriate {release-dirs-lib} path to your
277+
// compiler library search path (`-L`)
262278
263-
. Link with the binaries library using `-lcblite`
279+
// . Add the appropriate {release-dirs-include} path to your compiler's include path (`-I`)
264280
265-
{install-closure}
281+
// . Link with the binaries library using `-lcblite`
266282
267-
If you are familiar with _CMake_, then you can use this as a method of creating cross-platform projects; including Couchbase Lite itself.
268-
As a convenience, the release package includes a _CMake_ file in `lib/cmake/CouchbaseLite`
283+
// {install-closure}
269284
285+
// If you are familiar with _CMake_, then you can use this as a method of creating cross-platform projects; including Couchbase Lite itself.
286+
// As a convenience, the release package includes a _CMake_ file in `lib/cmake/CouchbaseLite`
270287
271-
== Windows
288+
[#lbl-windows]
289+
== Install for Windows
272290
To install the Couchbase for C libraries on Windows from a downloaded release binary:
273291
274292
[#lbl-windows-steps]
@@ -289,8 +307,9 @@ Couchbase Lite for C does not have any preferred installation path for the `.dll
289307
It is up to you to determine where best to place it so it is available during execution, though copying to a location on the system path is not recommended on Windows
290308
291309
292-
== Mac OS
293-
To install the Couchbase for C libraries on Mac OS X from a downloaded release package:
310+
[#lbl-macos]
311+
== Install for macOS
312+
To install the Couchbase for C libraries on macOS from a downloaded release package:
294313
295314
CAUTION: Direct access from Swift to Couchbase Lite for C is not possible in this *3.0.0 (beta)* release.
296315
This will be available in the next release.
@@ -308,7 +327,8 @@ This will be available in the next release.
308327
309328
{install-closure}
310329
311-
== iOS
330+
[#lbl-ios]
331+
== Install for iOS
312332
CAUTION: Direct access from Swift to Couchbase Lite for C is not possible in this *3.0.0 (beta)* release.
313333
This will be available in the next release.
314334
@@ -327,7 +347,8 @@ If you encounter a build error -- Include of non-modular header inside framework
327347
`allow non-modular includes in framework module` to `Yes`.
328348
329349
330-
== Android
350+
[#lbl-android]
351+
== Install for Android
331352
This install assumes use of the _Android Studio_ IDE.
332353
In addition to the Couchbase Lite for C download you also require the following tool chain dependencies, all installable from within _Android Studio_ if necessary:
333354

0 commit comments

Comments
 (0)