mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-02 19:02:57 +02:00
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
2 changed files with 69 additions and 8 deletions
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'
|
# Template file for 'twoftpd'
|
||||||
pkgname=twoftpd
|
pkgname=twoftpd
|
||||||
version=1.43
|
version=1.43
|
||||||
revision=4
|
revision=5
|
||||||
build_style=gnu-makefile
|
build_style=gnu-makefile
|
||||||
depends="sv-helper ucspi-tcp"
|
|
||||||
makedepends="bglibs-devel cvm-devel"
|
makedepends="bglibs-devel cvm-devel"
|
||||||
|
depends="sv-helper ucspi-tcp"
|
||||||
short_desc="Simple secure efficient FTP server"
|
short_desc="Simple secure efficient FTP server"
|
||||||
maintainer="bougyman <bougyman@voidlinux.org>"
|
maintainer="bougyman <bougyman@voidlinux.org>"
|
||||||
license="GPL-2"
|
license="GPL-2.0-or-later"
|
||||||
homepage="http://untroubled.org/twoftpd/"
|
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
|
checksum=ed77d2f3020bdbbe1a0a7d9a84780f3525431300e5000901e95a982873e24dc3
|
||||||
system_accounts="ftp"
|
system_accounts="ftp"
|
||||||
ftp_pgroup="nogroup"
|
ftp_pgroup="nogroup"
|
||||||
|
nocross="deps are nocross"
|
||||||
|
|
||||||
pre_build() {
|
do_configure() {
|
||||||
echo '/usr/bin' > conf-bin
|
echo '/usr/bin' > conf-bin
|
||||||
echo '/usr/share/man' > conf-man
|
echo '/usr/share/man' > conf-man
|
||||||
echo '/usr/include' > conf-include
|
echo '/usr/include' > conf-include
|
||||||
echo '/usr/lib' > conf-lib
|
echo '/usr/lib' > conf-lib
|
||||||
echo "$CC $LDFLAGS" > conf-ld
|
echo "$CC $LDFLAGS" > conf-ld
|
||||||
sed -e 's|/usr/local/include|/usr/include|' -e "s|gcc|$CC $CFLAGS|" \
|
echo "$CC $CFLAGS" >conf-cc
|
||||||
-i conf-cc
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
make install install_prefix=${DESTDIR}
|
make install install_prefix=${DESTDIR}
|
||||||
vsv twoftpd-anon
|
vsv twoftpd-anon
|
||||||
vlicense COPYING
|
|
||||||
vdoc README
|
vdoc README
|
||||||
vdoc NEWS
|
vdoc NEWS
|
||||||
vdoc ANNOUNCEMENT
|
vdoc ANNOUNCEMENT
|
||||||
|
|
Loading…
Add table
Reference in a new issue