From 3bceaffb20c0b90dedf6f329d5ee774d42f09c17 Mon Sep 17 00:00:00 2001 From: Dan Lorenc Date: Fri, 13 Sep 2024 15:20:28 -0500 Subject: [PATCH] Add unixodbc package and tests. Signed-off-by: Dan Lorenc --- unixodbc.yaml | 52 +++++++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/unixodbc.yaml b/unixodbc.yaml index 1346a261790..c0c2ed1878f 100644 --- a/unixodbc.yaml +++ b/unixodbc.yaml @@ -1,15 +1,11 @@ +# Generated from https://git.alpinelinux.org/aports/plain/main/unixodbc/APKBUILD package: name: unixodbc version: 2.3.12 - epoch: 3 + epoch: 0 description: ODBC is an open specification to access Data Sources copyright: - license: LGPL-2.0-or-later - # Require a config, basically /etc/odbc.ini and /etc/odbcinst.ini - # By default they are empty - dependencies: - runtime: - - ${{package.name}}-config environment: contents: @@ -19,22 +15,22 @@ environment: - build-base - busybox - ca-certificates-bundle + - libtool + - m4 + - pkgconf-dev - readline-dev pipeline: - - uses: fetch + - uses: git-checkout with: - expected-sha256: f210501445ce21bf607ba51ef8c125e10e22dffdffec377646462df5f01915ec - uri: https://www.unixodbc.org/unixODBC-${{package.version}}.tar.gz + repository: https://github.com/lurcher/unixODBC + tag: ${{package.version}} + expected-commit: c335dbf3fa25b524e935e98cf26b96a2e13f5c81 - uses: autoconf/configure with: opts: | - --prefix=/usr \ - --sysconfdir=/etc \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --disable-nls \ + -disable-nls \ --enable-gui=no \ --enable-static @@ -44,20 +40,7 @@ pipeline: - uses: strip - # Remove files that come from the -config package. - - runs: | - rm ${{targets.destdir}}/etc/odbc.ini - rm ${{targets.destdir}}/etc/odbcinst.ini - subpackages: - - name: unixodbc-config - description: Default config files, expected to be overwritten by drivers. - pipeline: - - runs: | - mkdir -p "${{targets.subpkgdir}}/etc/php" - touch ${{targets.subpkgdir}}/etc/odbc.ini - touch ${{targets.subpkgdir}}/etc/odbcinst.ini - - name: unixodbc-static pipeline: - uses: split/static @@ -80,3 +63,18 @@ update: enabled: true github: identifier: lurcher/unixODBC + +test: + environment: + contents: + packages: + - python3 + - py3-pip + pipeline: + - runs: | + odbcinst --help + odbcinst --version | grep ${{package.version}} + - runs: | + pip3 install pyodbc + # This fails with "ImportError: libodbc.so.2: cannot open shared object file: No such file or directory" if unixodbc isn't installed + python -c "import pyodbc"