diff --git a/.gitignore b/.gitignore index c4ddd6d3..57f03cbf 100644 --- a/.gitignore +++ b/.gitignore @@ -95,3 +95,6 @@ src/zvbi/.dirstamp # Arch package_creators/*.pkg.tar.xz + +#RPMs +package_creators/*.rpm diff --git a/README.md b/README.md index 6c2a18fc..755b478a 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,16 @@ More usage information can be found on our website: # building installation package (.pkg.tar.xz) or installing directly cd ccextractor/package_creators ./arch.sh + +### Redhat Package Manager (rpm) based Linux Distributions + # make sure you have CCExtractor repository forked + # clone repository + # install git via source + git clone https://github.com/%USERNAME%/ccextractor.git # paste your github username + + # building installation package (.rpm) + cd ccextractor/package_creators + ./rpm.sh ### Windows diff --git a/docs/CHANGES.TXT b/docs/CHANGES.TXT index 1ef7dfda..cc5ca4e6 100644 --- a/docs/CHANGES.TXT +++ b/docs/CHANGES.TXT @@ -2,7 +2,10 @@ ----------------- - Fix: Prevent the OCR being initialized more than once (happened on multiprogram and PAT changes) +- New: Added .rpm package generation script. - New: Added build/installation script for .pkg.tar.xz (Arch Linux). +- New: Added tarball generation script. +- New: Added Autoconf build scripts for CCExtractor to generate makefiles. 0.85b (2017-1-26) diff --git a/package_creators/ccextractor.spec b/package_creators/ccextractor.spec new file mode 100644 index 00000000..8fbc3e81 --- /dev/null +++ b/package_creators/ccextractor.spec @@ -0,0 +1,36 @@ +Name: ccextractor +Version: 0.85 +Release: 1 +Summary: A closed captions and teletext subtitles extractor for video streams. +Group: Applications/Internet +License: GPL +URL: http://ccextractor.org/ +Source0: %{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +%description +CCExtractor is a software that extracts closed captions from videos of various formats, even live video streams. Available as a multi-platform desktop application. + +%global debug_package %{nil} + +%prep +%setup -q + +%build +./configure --enable-ocr --prefix="$pkgdir/usr/local" +make + +%install +mkdir -p $RPM_BUILD_ROOT/usr/local/bin +install ccextractor $RPM_BUILD_ROOT/usr/local/bin/ccextractor + +%files +%defattr(-,root,root) +/usr/local/bin/ccextractor + +%clean +rm -rf $RPM_BUILD_ROOT + +%changelog +* Fri Apr 14 2017 Carlos Fernandez +- Initial build diff --git a/package_creators/rpm.sh b/package_creators/rpm.sh new file mode 100755 index 00000000..5f71309f --- /dev/null +++ b/package_creators/rpm.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +if [[ $(rpmbuild 2>&1) == *"not found"* ]] +then + echo "ERROR: 'rpmbuild' package not found. Please install it and try again." + exit 0 +fi + +workdir=`pwd` +echo "%_topdir $workdir/RPMBUILD" >> $HOME/.rpmmacros +./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 +mkdir -p RPMBUILD/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} +mv *.tar.gz RPMBUILD/SOURCES/ +cp ccextractor.spec RPMBUILD/SPECS +cd RPMBUILD/SPECS +rpmbuild -ba ccextractor.spec +retval=$? +if [ $retval -ne 0 ]; then + echo "Sorry, the package could not be created as rpmbuild failed with return code $retval" + exit $retval +fi +cd ../.. +cp RPMBUILD/RPMS/x86_64/*.rpm . +rm -rf RPMBUILD