new package: lrzip
This commit is contained in:
parent
1f96f22189
commit
0341dd2bb0
|
@ -0,0 +1,21 @@
|
|||
TERMUX_PKG_HOMEPAGE=https://github.com/ckolivas/lrzip
|
||||
TERMUX_PKG_DESCRIPTION="A compression utility that excels at compressing large files"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=0.651
|
||||
TERMUX_PKG_SRCURL=https://github.com/ckolivas/lrzip/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=f4c84de778a059123040681fd47c17565fcc4fec0ccc68fcf32d97fad16cd892
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
TERMUX_PKG_DEPENDS="bash, libbz2, libc++, liblz4, liblzo, zlib"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
--enable-asm=no
|
||||
"
|
||||
# Avoid conflicting with lrzsz.
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="
|
||||
bin/lrz
|
||||
share/man/man1/lrz.1
|
||||
"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
autoreconf -fi
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
-AC_CHECK_LIB(pthread, pthread_create, ,
|
||||
+AC_CHECK_LIB(c, pthread_create, ,
|
||||
AC_MSG_ERROR([Could not find pthread library - please install libpthread]))
|
||||
AC_CHECK_LIB(m, sqrt, ,
|
||||
AC_MSG_ERROR([Could not find math library - please install libm]))
|
|
@ -0,0 +1,51 @@
|
|||
--- a/doc/lrzip.conf.example
|
||||
+++ b/doc/lrzip.conf.example
|
||||
@@ -48,7 +48,7 @@
|
||||
# REPLACEFILE = YES
|
||||
|
||||
# Override for Temporary Directory. Only valid when stdin/out or Test is used
|
||||
-# TMPDIR = /tmp
|
||||
+# TMPDIR = @TERMUX_PREFIX@/tmp
|
||||
|
||||
# Whether to use encryption on compression YES, NO (-e)
|
||||
# ENCRYPT = NO
|
||||
--- a/lrzip.c
|
||||
+++ b/lrzip.c
|
||||
@@ -470,10 +470,10 @@
|
||||
/* Use /tmp if nothing is writeable so far */
|
||||
if (fd_in == -1) {
|
||||
dealloc(control->infile);
|
||||
- control->infile = malloc(20);
|
||||
+ control->infile = malloc(sizeof("@TERMUX_PREFIX@/tmp/lrzipin.XXXXXX"));
|
||||
if (unlikely(!control->infile))
|
||||
fatal_return(("Failed to allocate infile name\n"), -1);
|
||||
- strcpy(control->infile, "/tmp/lrzipin.XXXXXX");
|
||||
+ strcpy(control->infile, "@TERMUX_PREFIX@/tmp/lrzipin.XXXXXX");
|
||||
fd_in = mkstemp(control->infile);
|
||||
}
|
||||
|
||||
--- a/man/lrzip.conf.5
|
||||
+++ b/man/lrzip.conf.5
|
||||
@@ -12,7 +12,7 @@
|
||||
three places\&:
|
||||
.nf
|
||||
$PWD \- Current Directory
|
||||
-/etc/lrzip
|
||||
+@TERMUX_PREFIX@/etc/lrzip
|
||||
$HOME/\&.lrzip
|
||||
.PP
|
||||
Parameters are set in \fBPARAMETER\&=VALUE\fP fashion where any line
|
||||
--- a/util.c
|
||||
+++ b/util.c
|
||||
@@ -209,9 +209,9 @@
|
||||
}
|
||||
}
|
||||
if (fp == NULL) {
|
||||
- fp = fopen("/etc/lrzip/lrzip.conf", "r");
|
||||
+ fp = fopen("@TERMUX_PREFIX@/etc/lrzip/lrzip.conf", "r");
|
||||
if (fp)
|
||||
- fprintf(control->msgout, "Using configuration file /etc/lrzip/lrzip.conf\n");
|
||||
+ fprintf(control->msgout, "Using configuration file @TERMUX_PREFIX@/etc/lrzip/lrzip.conf\n");
|
||||
}
|
||||
if (fp == NULL)
|
||||
return false;
|
Loading…
Reference in New Issue