new package: subtitleripper

This commit is contained in:
Tee KOBAYASHI 2022-03-11 02:26:19 +09:00 committed by xtkoba
parent db79876425
commit 99654b9cb4
2 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,49 @@
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@
### enable ppm support ###
DEFINES += -D_HAVE_LIB_PPM_
-LIBS += -lppm
+LIBS += -lnetpbm
### enable PNG support ###
DEFINES += -D_HAVE_PNG_
@@ -19,11 +19,11 @@
DEFINES += -D_HAVE_ZLIB_
LIBS += -lz
-CC = gcc
+CC ?= gcc
WARN = -Wall -Wstrict-prototypes
COPT = -g -O2
-CFLAGS = $(COPT) $(WARN) $(DEFINES) $(INCLUDES)
+CFLAGS += $(WARN) $(DEFINES) $(INCLUDES)
# list of all files that are part of the package
PACKAGE_FILES = Makefile \
@@ -70,19 +70,19 @@
# Target
subtitle2pgm: subtitle2pgm.o spudec.o
@echo "Linking $@"
- @$(CC) $(LIBS) $^ -o $@
+ @$(CC) $^ -o $@ $(LDFLAGS) $(LIBS)
subtitle2vobsub: subtitle2vobsub.o vobsub.o
@echo "Linking $@"
- @$(CC) $(LIBS) $^ -o $@
+ @$(CC) $^ -o $@ $(LDFLAGS) $(LIBS)
srttool: srttool.o
@echo "Linking $@"
- @$(CC) $(LIBS) -g $^ -o $@
+ @$(CC) -g $^ -o $@ $(LDFLAGS) $(LIBS)
vobsub2pgm: vobsub2pgm.o vobsub.o spudec.o
@echo "Linking $@"
- @$(CC) $(LIBS) -g $^ -o $@
+ @$(CC) -g $^ -o $@ $(LDFLAGS) $(LIBS)
.PHONY: clean dist rpm
clean:

View File

@ -0,0 +1,20 @@
TERMUX_PKG_HOMEPAGE=http://subtitleripper.sourceforge.net/
TERMUX_PKG_DESCRIPTION="DVD subtitle ripper for Linux"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
_VERSION=0.3-4
TERMUX_PKG_VERSION=${_VERSION//-/.}
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/subtitleripper/subtitleripper-${_VERSION}.tgz
TERMUX_PKG_SHA256=8af6c2ebe55361900871c731ea1098b1a03efa723cd29ee1d471435bd21f3ac4
TERMUX_PKG_DEPENDS="libpng, netpbm, zlib"
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_pre_configure() {
CPPFLAGS+=" -DHAVE_GETLINE"
CFLAGS+=" $CPPFLAGS"
}
termux_step_make_install() {
install -Dm700 -t $TERMUX_PREFIX/bin \
srttool subtitle2pgm subtitle2vobsub vobsub2pgm
}