twoftpd: fix license, distfiles, mark as nocross, vsed
sgn: increase opt level, patch for log2 Co-authored-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Close: #31214
This commit is contained in:
parent
a5ad5a8e56
commit
8f050e3ba1
62
srcpkgs/twoftpd/patches/log2-conflict.patch
Normal file
62
srcpkgs/twoftpd/patches/log2-conflict.patch
Normal file
|
@ -0,0 +1,62 @@
|
|||
log2 is declared in math.h
|
||||
Index: twoftpd-1.43/log.c
|
||||
===================================================================
|
||||
--- twoftpd-1.43.orig/log.c
|
||||
+++ twoftpd-1.43/log.c
|
||||
@@ -32,14 +32,14 @@ void log_start(void)
|
||||
obuf_puts(&errbuf, "]: ");
|
||||
}
|
||||
|
||||
-void log1(const char* a)
|
||||
+void twoftpd_log1(const char* a)
|
||||
{
|
||||
log_start();
|
||||
log_str(a);
|
||||
log_end();
|
||||
}
|
||||
|
||||
-void log2(const char* a, const char* b)
|
||||
+void twoftpd_log2(const char* a, const char* b)
|
||||
{
|
||||
log_start();
|
||||
log_str(a);
|
||||
Index: twoftpd-1.43/log.h
|
||||
===================================================================
|
||||
--- twoftpd-1.43.orig/log.h
|
||||
+++ twoftpd-1.43/log.h
|
||||
@@ -8,7 +8,7 @@ extern void log_start(void);
|
||||
#define log_uint(U) obuf_putu(&errbuf, U)
|
||||
#define log_end() obuf_putsflush(&errbuf, "\n")
|
||||
|
||||
-extern void log1(const char*);
|
||||
-extern void log2(const char*, const char*);
|
||||
+extern void twoftpd_log1(const char*);
|
||||
+extern void twoftpd_log2(const char*, const char*);
|
||||
|
||||
#endif
|
||||
Index: twoftpd-1.43/main.c
|
||||
===================================================================
|
||||
--- twoftpd-1.43.orig/main.c
|
||||
+++ twoftpd-1.43/main.c
|
||||
@@ -171,18 +171,18 @@ static int dispatch_request(const comman
|
||||
cmd = find_command(table1);
|
||||
if (!cmd && table2) cmd = find_command(table2);
|
||||
if (!cmd) {
|
||||
- if (log) log2(request, req_param ? req_param : "(no parameter)");
|
||||
+ if (log) twoftpd_log2(request, req_param ? req_param : "(no parameter)");
|
||||
return respond(502, 1, "Command not supported.");
|
||||
}
|
||||
|
||||
if (req_param) {
|
||||
- if (log) log2(cmd->name, cmd->hideparam ? "XXXXXXXX" : req_param);
|
||||
+ if (log) twoftpd_log2(cmd->name, cmd->hideparam ? "XXXXXXXX" : req_param);
|
||||
if (cmd->fn1)
|
||||
return cmd->fn1();
|
||||
return respond(501, 1, "Command requires no parameter");
|
||||
}
|
||||
else {
|
||||
- if (log) log1(cmd->name);
|
||||
+ if (log) twoftpd_log1(cmd->name);
|
||||
if (cmd->fn0)
|
||||
return cmd->fn0();
|
||||
return respond(504, 1, "Command requires a parameter");
|
|
@ -1,33 +1,32 @@
|
|||
# Template file for 'twoftpd'
|
||||
pkgname=twoftpd
|
||||
version=1.43
|
||||
revision=4
|
||||
revision=5
|
||||
build_style=gnu-makefile
|
||||
depends="sv-helper ucspi-tcp"
|
||||
makedepends="bglibs-devel cvm-devel"
|
||||
depends="sv-helper ucspi-tcp"
|
||||
short_desc="Simple secure efficient FTP server"
|
||||
maintainer="bougyman <bougyman@voidlinux.org>"
|
||||
license="GPL-2"
|
||||
license="GPL-2.0-or-later"
|
||||
homepage="http://untroubled.org/twoftpd/"
|
||||
distfiles="http://untroubled.org/twoftpd/twoftpd-1.43.tar.gz"
|
||||
distfiles="http://untroubled.org/twoftpd/twoftpd-${version}.tar.gz"
|
||||
checksum=ed77d2f3020bdbbe1a0a7d9a84780f3525431300e5000901e95a982873e24dc3
|
||||
system_accounts="ftp"
|
||||
ftp_pgroup="nogroup"
|
||||
nocross="deps are nocross"
|
||||
|
||||
pre_build() {
|
||||
do_configure() {
|
||||
echo '/usr/bin' > conf-bin
|
||||
echo '/usr/share/man' > conf-man
|
||||
echo '/usr/include' > conf-include
|
||||
echo '/usr/lib' > conf-lib
|
||||
echo "$CC $LDFLAGS" > conf-ld
|
||||
sed -e 's|/usr/local/include|/usr/include|' -e "s|gcc|$CC $CFLAGS|" \
|
||||
-i conf-cc
|
||||
echo "$CC $CFLAGS" >conf-cc
|
||||
}
|
||||
|
||||
do_install() {
|
||||
make install install_prefix=${DESTDIR}
|
||||
vsv twoftpd-anon
|
||||
vlicense COPYING
|
||||
vdoc README
|
||||
vdoc NEWS
|
||||
vdoc ANNOUNCEMENT
|
||||
|
|
Loading…
Reference in New Issue
Block a user