From e2f6fce8509cae03b2450605a8a5f0f6da9dca6d Mon Sep 17 00:00:00 2001 From: Evgeny Shulgin Date: Tue, 27 Dec 2016 00:31:00 +0400 Subject: [PATCH] Added build script for .deb (#574) * Added build script for .deb * Added tip for users and automatically build --- linux/description-pak | 1 + package_creators/debian.sh | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 linux/description-pak create mode 100644 package_creators/debian.sh diff --git a/linux/description-pak b/linux/description-pak new file mode 100644 index 00000000..3a8e2a2c --- /dev/null +++ b/linux/description-pak @@ -0,0 +1 @@ +Best open source tool for a subtitled world diff --git a/package_creators/debian.sh b/package_creators/debian.sh new file mode 100644 index 00000000..cd16830f --- /dev/null +++ b/package_creators/debian.sh @@ -0,0 +1,38 @@ +#!/bin/bash +TYPE="debian" # can be one of 'slackware', 'debian', 'rpm' +PROGRAM_NAME="ccextractor" +VERSION="0.84" +RELEASE="1" +LICENSE="GPL-2.0" +MAINTAINER="carlos@ccextractor.org" +REQUIRES="gcc,libcurl4-gnutls-dev,tesseract-ocr,tesseract-ocr-dev,libleptonica-dev" + +out=$((LC_ALL=C dpkg -s checkinstall) 2>&1) + +if [[ $out == *"is not installed"* ]] +then + read -r -p "You have not installed the package 'checkinstall'. Would you like to install it? [Y/N] " response + if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]] + then + apt-get install -y checkinstall + else + exit 0 + fi +fi + +mkdir -p ../linux/objs + +(cd ../linux; checkinstall \ + -y \ + --pkgrelease=$RELEASE \ + --pkggroup="CCExtractor" \ + --backup=no \ + --install=no \ + --type $TYPE \ + --pkgname=$PROGRAM_NAME \ + --pkgversion=$VERSION \ + --pkglicense=$LICENSE \ + --pakdir="../package_creators/build" \ + --maintainer=$MAINTAINER \ + --nodoc \ + --requires=$REQUIRES)