Merge pull request #728 from fandango-/arch

[FEATURE] Arch Linux installation script (create .pkg.tar.xz archive or install directly)
This commit is contained in:
Carlos Fernandez Sanz 2017-04-11 08:05:38 -07:00 committed by GitHub
commit 4438e6c780
6 changed files with 68 additions and 2 deletions

5
.gitignore vendored
View File

@ -91,4 +91,7 @@ src/utf8proc/.dirstamp
src/zlib/.deps/
src/zlib/.dirstamp
src/zvbi/.deps/
src/zvbi/.dirstamp
src/zvbi/.dirstamp
# Arch
package_creators/*.pkg.tar.xz

View File

@ -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.

View File

@ -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)

22
package_creators/PKGBUILD Normal file
View File

@ -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
}

30
package_creators/arch.sh Executable file
View File

@ -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

View File

@ -27,4 +27,4 @@ rm -rf config.log
rm -rf aclocal.m4
rm -rf build-conf
rm -rf autom4te.cache
cd package_creators
cd package_creators