mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2024-12-24 11:53:25 +00:00
Add .rpm package generation script
This commit is contained in:
parent
fdd5b6bf9d
commit
f2755ae5bb
3
.gitignore
vendored
3
.gitignore
vendored
@ -95,3 +95,6 @@ src/zvbi/.dirstamp
|
||||
|
||||
# Arch
|
||||
package_creators/*.pkg.tar.xz
|
||||
|
||||
#RPMs
|
||||
package_creators/*.rpm
|
||||
|
10
README.md
10
README.md
@ -99,6 +99,16 @@ More usage information can be found on our website:
|
||||
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
|
||||
|
||||
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.
|
||||
|
@ -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)
|
||||
|
36
package_creators/ccextractor.spec
Normal file
36
package_creators/ccextractor.spec
Normal file
@ -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 <carlos@ccextractor.org>
|
||||
- Initial build
|
30
package_creators/rpm.sh
Executable file
30
package_creators/rpm.sh
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user