automated .deb packaging
This commit is contained in:
		
							
								
								
									
										29
									
								
								deploy/debian/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								deploy/debian/Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -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"]
 | 
			
		||||
							
								
								
									
										10
									
								
								deploy/debian/control
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								deploy/debian/control
									
									
									
									
									
										Normal file
									
								
							@@ -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)
 | 
			
		||||
							
								
								
									
										2
									
								
								deploy/debian/copy.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								deploy/debian/copy.sh
									
									
									
									
									
										Normal file
									
								
							@@ -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
 | 
			
		||||
		Reference in New Issue
	
	Block a user