Skip to content

Commit 982fea5

Browse files
committedOct 2, 2023
debian packaging: update to latest oracle client
1 parent a0c3d67 commit 982fea5

File tree

3 files changed

+39
-9
lines changed

3 files changed

+39
-9
lines changed
 

‎INSTALL.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Building QGIS from source - step by step
1919
* [3.8.1. Compiling with 3D on old Debian based distributions](#381-compiling-with-3d-on-old-debian-based-distributions)
2020
* [3.9. Building different branches](#39-building-different-branches)
2121
* [3.10. Building Debian packages](#310-building-debian-packages)
22+
* [3.10.1. Building packages with oracle support](#3101-building-packages-with-oracle-support)
2223
* [3.11. On Fedora Linux](#311-on-fedora-linux)
2324
* [3.11.1. Install build dependencies](#3111-install-build-dependencies)
2425
* [3.11.2. Suggested system tweaks](#3112-suggested-system-tweaks)
@@ -405,20 +406,27 @@ Instead of creating a personal installation as in the previous step you can
405406
also create debian package. This is done from the QGIS root directory, where
406407
you'll find a debian directory.
407408

408-
First you need to install the [build dependencies](#33-install-build-dependencies)
409-
and setup a changelog entry for your distribution. For example for Debian Bookworm:
409+
First setup a changelog entry for your distribution. For example for Debian Bookworm:
410410

411411
```bash
412412
dch -l ~bookworm --force-distribution --distribution bookworm "bookworm build"
413413
```
414414

415+
You also need to install the [build dependencies](#33-install-build-dependencies).
416+
Alternatively use:
417+
418+
```bash
419+
debian/rules templates
420+
sudo mk-build-deps -i
421+
```
422+
415423
The QGIS packages will be created with:
416424

417425
```bash
418426
dpkg-buildpackage -us -uc -b
419427
```
420428

421-
**Note:** Install `devscripts` to get `dch`.
429+
**Note:** Install `devscripts` to get `dch` and `mk-build-deps`.
422430

423431
**Note:** If you have `libqgis1-dev` installed, you need to remove it first
424432
using `dpkg -r libqgis1-dev`. Otherwise `dpkg-buildpackage` will complain about a
@@ -436,6 +444,28 @@ Install them using `dpkg`. E.g.:
436444
sudo debi
437445
```
438446

447+
### 3.10.1. Building packages with Oracle support
448+
449+
To build packages with Oracle support you need the Oracle libraries (currently
450+
21.11) as additional build dependencies:
451+
452+
```bash
453+
curl -JLO https://download.oracle.com/otn_software/linux/instantclient/2111000/oracle-instantclient-devel-21.11.0.0.0-1.el8.x86_64.rpm
454+
curl -JLO https://download.oracle.com/otn_software/linux/instantclient/2111000/oracle-instantclient-basiclite-21.11.0.0.0-1.el8.x86_64.rpm
455+
sudo apt install alien
456+
fakeroot alien oracle-instantclient-devel-21.11.0.0.0-1.el8.x86_64.rpm oracle-instantclient-basiclite-21.11.0.0.0-1.el8.x86_64.rpm
457+
sudo dpkg -i oracle-instantclient-devel_21.11.0.0.0-2_amd64.deb oracle-instantclient-basiclite_21.11.0.0.0-2_amd64.deb
458+
```
459+
460+
(if the client version changes it's necessary to adapt `ORACLE_INCLUDEDIR` and `ORACLE_LIBDIR` accordingly)
461+
462+
The packaging files enable Oracle support if the distribution contains "-oracle":
463+
464+
```bash
465+
dch -l ~sid~oracle --force-distribution --distribution sid-oracle "sid build with oracle"
466+
dpkg-buildpackage -us -uc -b
467+
```
468+
439469
## 3.11. On Fedora Linux
440470

441471
We assume that you have the source code of QGIS ready and created a

‎debian/control.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ Build-Depends:
4040
ninja-build,
4141
ocl-icd-opencl-dev,
4242
opencl-headers,
43-
#oracle# oracle-instantclient12.1-basiclite,
44-
#oracle# oracle-instantclient12.1-devel,
43+
#oracle# oracle-instantclient-basiclite,
44+
#oracle# oracle-instantclient-devel,
4545
pkg-config,
4646
pyqt5-dev-tools,
4747
pyqt5-dev,

‎debian/rules

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,12 @@ endif
136136

137137
ifneq (,$(WITH_ORACLE))
138138
ifeq ($(DEB_BUILD_ARCH),amd64)
139-
ORACLE_INCLUDEDIR=/usr/include/oracle/18.5/client64/
140-
ORACLE_LIBDIR=/usr/lib/oracle/18.5/client64/lib/
139+
ORACLE_INCLUDEDIR=/usr/include/oracle/21/client64/
140+
ORACLE_LIBDIR=/usr/lib/oracle/21/client64/lib/
141141
endif
142142
ifeq ($(DEB_BUILD_ARCH),i386)
143-
ORACLE_INCLUDEDIR=/usr/include/oracle/18.5/client/
144-
ORACLE_LIBDIR=/usr/lib/oracle/18.5/client/lib/
143+
ORACLE_INCLUDEDIR=/usr/include/oracle/21/client/
144+
ORACLE_LIBDIR=/usr/lib/oracle/21/client/lib/
145145
endif
146146
CMAKE_OPTS += \
147147
-DWITH_ORACLE=TRUE \

0 commit comments

Comments
 (0)
Please sign in to comment.