diff --git a/.gitignore b/.gitignore index aad1229a..c4ddd6d3 100644 --- a/.gitignore +++ b/.gitignore @@ -91,4 +91,7 @@ src/utf8proc/.dirstamp src/zlib/.deps/ src/zlib/.dirstamp src/zvbi/.deps/ -src/zvbi/.dirstamp \ No newline at end of file +src/zvbi/.dirstamp + +# Arch +package_creators/*.pkg.tar.xz diff --git a/README.md b/README.md index 870816fc..6c2a18fc 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,16 @@ More usage information can be found on our website: # test your build ./ccextractor +### Arch Linux + # make sure you have CCExtractor repository forked + # clone repository + sudo pacman -S git + git clone https://github.com/%USERNAME%/ccextractor.git # paste your github username + + # building installation package (.pkg.tar.xz) or installing directly + cd ccextractor/package_creators + ./arch.sh + ### Windows Open the windows/ccextractor.sln file with Visual Studio (2015 at least), and build it. Configurations "(Debug|Release)-Full" includes dependent libraries which are used for OCR. diff --git a/docs/CHANGES.TXT b/docs/CHANGES.TXT index 2a29c066..1ef7dfda 100644 --- a/docs/CHANGES.TXT +++ b/docs/CHANGES.TXT @@ -2,6 +2,7 @@ ----------------- - Fix: Prevent the OCR being initialized more than once (happened on multiprogram and PAT changes) +- New: Added build/installation script for .pkg.tar.xz (Arch Linux). 0.85b (2017-1-26) diff --git a/package_creators/PKGBUILD b/package_creators/PKGBUILD new file mode 100644 index 00000000..05ef2601 --- /dev/null +++ b/package_creators/PKGBUILD @@ -0,0 +1,22 @@ +pkgname=ccextractor +pkgver=0.85 +pkgrel=1 +pkgdesc="A closed captions and teletext subtitles extractor for video streams." +arch=('i686' 'x86_64') +url="http://www.ccextractor.org" +license=('GPL') +depends=('gcc-libs' 'tesseract') +source=( + $pkgname-$pkgver.tar.gz +) + +build() { + cd "$srcdir/$pkgname-$pkgver" + CC=gcc ./configure --enable-ocr --prefix="$pkgdir/usr/local" + make -j4 +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make install +} diff --git a/package_creators/arch.sh b/package_creators/arch.sh new file mode 100755 index 00000000..d8e0cd75 --- /dev/null +++ b/package_creators/arch.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +./tarball.sh +retval=$? +if [ $retval -ne 0 ]; then + echo "Sorry, the package could not be created as the tarball building process failed with return code $retval" + rm -f ./*.tar.gz + exit $retval +fi +makepkg -g >> PKGBUILD +makepkg -sc +retval=$? +if [ $retval -ne 0 ]; then + echo "Sorry, the package could not be created as makepkg failed with return code $retval" + rm -rf ./*.tar.gz src + sed -i '$ d' PKGBUILD + exit $retval +fi +rm -f ./*.tar.gz +sed -i '$ d' PKGBUILD +read -p "Do you wish to install ccextractor? [y/N] " yn +case $yn in + [Yy]* ) if [ -x "$(command -v sudo)" ]; then + sudo pacman -U ./*.pkg.tar.xz; + else + su -c "pacman -U ./*.pkg.tar.xz"; + fi + rm -f ./*.pkg.tar.xz;; + * ) exit;; +esac diff --git a/package_creators/tarball.sh b/package_creators/tarball.sh index e949911b..113ce340 100755 --- a/package_creators/tarball.sh +++ b/package_creators/tarball.sh @@ -27,4 +27,4 @@ rm -rf config.log rm -rf aclocal.m4 rm -rf build-conf rm -rf autom4te.cache -cd package_creators \ No newline at end of file +cd package_creators