automated .deb packaging
This commit is contained in:
parent
ba8fc1079a
commit
80e9397e01
|
@ -1,4 +1,4 @@
|
|||
FROM checks_parser_base
|
||||
FROM checks_parser_base_ubuntu
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt update
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt install -y wget git cmake make gcc g++ fuse libboost-regex-dev
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
from checks_parser_base_ubuntu
|
||||
|
||||
#for envsubst
|
||||
RUN DEBIAN_FRONTEND=noninteractive apt install -y gettext
|
||||
|
||||
ARG pkgname=checks-parser
|
||||
ARG pkgver=1.0
|
||||
ARG revision=1
|
||||
|
||||
ARG pkg=${pkgname}_$pkgver-$revision
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN mkdir -p $pkg/DEBIAN
|
||||
RUN mkdir -p $pkg/usr/bin
|
||||
RUN mkdir -p /output
|
||||
COPY deploy/debian/control $pkg/DEBIAN/control
|
||||
COPY deploy/debian/copy.sh .
|
||||
|
||||
RUN envsubst < $pkg/DEBIAN/control | tee $pkg/DEBIAN/control.output && mv $pkg/DEBIAN/control.output $pkg/DEBIAN/control
|
||||
RUN envsubst < copy.sh | tee copy.sh.output && mv copy.sh.output copy.sh
|
||||
|
||||
RUN chmod +x copy.sh
|
||||
|
||||
RUN cp /app/build/checks-parser $pkg/usr/bin
|
||||
|
||||
RUN dpkg-deb --build $pkg
|
||||
|
||||
ENTRYPOINT ["./copy.sh"]
|
|
@ -0,0 +1,10 @@
|
|||
Package: checks-parser
|
||||
Version: 3.0-1
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Homepage: https://git.foxarmy.org/checks-parser
|
||||
Depends: libc, qtbase5-dev, openssl, libmbedtls-dev, tesseract-ocr, tesseract-ocr-rus, libopencv-dev, libzbar-dev, qttools5-dev, nlohmann-json3-dev, libcurl4-openssl-dev, libtesseract-dev, libqrencode-dev
|
||||
Maintainer: Leca <leca@foxarmy.org>
|
||||
Description: Utility for parsing checks(receipts) to csv
|
||||
Utility for extraction of content of a check(receipt) using plaintext, OCR or request to FTS (Federal Taxation Service)
|
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
cp $pkg.deb /output
|
|
@ -1,30 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
pkgname="checks-parser"
|
||||
pkgver="3.0"
|
||||
revision="1"
|
||||
|
||||
pkg=${pkgname}_$pkgver-$revision
|
||||
mkdir $pkg
|
||||
|
||||
mkdir -p $pkg/usr/bin
|
||||
|
||||
cp ../../checks-parser $pkg/usr/bin
|
||||
|
||||
mkdir $pkg/DEBIAN
|
||||
|
||||
echo \
|
||||
"Package: $pkgname
|
||||
Version: $pkgver-$revision
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Homepage: https://git.foxarmy.org/checks-parser
|
||||
Depends: libc, qtbase5-dev, openssl, libmbedtls-dev, tesseract-ocr, tesseract-ocr-rus, libopencv-dev, libzbar-dev, qttools5-dev, nlohmann-json3-dev, libcurl4-openssl-dev, libtesseract-dev
|
||||
Maintainer: Leca <leca@foxarmy.org>
|
||||
Description: Utility for parsing checks(receipts) to csv
|
||||
Utility for extraction of content of a check(receipt) using plaintext, OCR or request to FTS (Federal Taxation Service)"\
|
||||
> $pkg/DEBIAN/control
|
||||
|
||||
dpkg-deb --build $pkg
|
||||
rm -rf $pkg
|
|
@ -1,14 +1,24 @@
|
|||
services:
|
||||
base:
|
||||
image: checks_parser_base:latest
|
||||
base_ubuntu:
|
||||
image: checks_parser_base_ubuntu:latest
|
||||
build:
|
||||
context: .
|
||||
dockerfile: deploy/base-docker/Dockerfile
|
||||
dockerfile: deploy/base-docker/ubuntu.Dockerfile
|
||||
appimage:
|
||||
image: checks_parser_appimage:latest
|
||||
build:
|
||||
dockerfile: deploy/appimage/Dockerfile
|
||||
context: .
|
||||
volumes:
|
||||
- ./binaries:/output
|
||||
depends_on:
|
||||
- base
|
||||
- base_ubuntu
|
||||
debian:
|
||||
image: checks_parser_debian:latest
|
||||
build:
|
||||
dockerfile: deploy/debian/Dockerfile
|
||||
context: .
|
||||
volumes:
|
||||
- ./binaries:/output
|
||||
depends_on:
|
||||
- base_ubuntu
|
||||
|
|
Loading…
Reference in New Issue