File: debian.sh

package info (click to toggle)
ccextractor 0.87%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 10,064 kB
  • sloc: ansic: 172,772; makefile: 777; sh: 622; python: 319
file content (44 lines) | stat: -rw-r--r-- 1,081 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
TYPE="debian"   # can be one of 'slackware', 'debian', 'rpm'
PROGRAM_NAME="ccextractor"
VERSION="0.85"
RELEASE="1"
LICENSE="GPL-2.0"
MAINTAINER="carlos@ccextractor.org"
REQUIRES="gcc,libcurl4-gnutls-dev,tesseract-ocr,tesseract-ocr-dev,libleptonica-dev"

../linux/pre-build.sh

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


(cd ../linux; ./autogen.sh; ./configure; make; sudo 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;)

 cd ../linux
 make distclean
 ./cleanup
 cd ../package_creators