1 # Build recipe for ncftp.
3 # Copyright (c) 2018, 2020-2021 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # Exit immediately on any error
24 # Define a category for the output of the package name
25 pkgcategory=networking
27 tarname=${program}-${version}-src.tar.gz
30 fetch=ftp://ftp.ncftp.com/ncftp/$tarname
33 A File Transfer Protocol program.
35 NcFTP is a free set of programs that use the File Transfer Protocol.
36 It's been around for quite some time now (circa 1992) and many people
37 still use the program and contribute suggestions and feedback.
39 The main program is simply called \"ncftp\". There are also separate
40 utility programs for one-shot FTP operations (i.e. for shell scripts
41 and command line junkies); these include ncftpget, ncftpput, and
42 ncftpls. Run each command without any arguments to see the usage
43 screen, or read the man page.
46 homepage=https://www.ncftp.com
47 license="Clarified Artistic License"
49 # Source documentation
50 docs="README.txt DONATE.txt doc/*.txt"
51 docsdir="${docdir}/${program}-${version}"
55 unpack "${tardir}/$tarname"
59 # Apply patches from Debian to refresh this source
64 patch -Np1 -i "${worktree}/patches/ncftp/${line}"
67 done < "${worktree}/patches/ncftp/series"
69 # Update config detection for hosts
70 cp -f "${worktree}/archive/common/config.guess" .
71 cp -f "${worktree}/archive/common/config.sub" .
73 # Set sane permissions
74 chmod -R u+w,go-w,a+rX-s .
76 # Unfortunately, this build system does
77 # not pick up the FLAGS after `configure'
78 CC=gcc CPPFLAGS="$QICPPFLAGS" \
79 CFLAGS="$QICFLAGS -DNO_SSLv2 -D_FILE_OFFSET_BITS=64 -Wall" \
80 LDFLAGS="$QILDFLAGS -static" \
81 ./configure $configure_args \
85 --build="$(gcc -dumpmachine)"
88 make -j${jobs} DESTDIR="$destdir" install
91 ln -sf ncftpbatch "${destdir}/usr/bin/ncftpspooler"
93 # Include missing manpage for ncftpbookmarks
94 # Thanks again to "Debian GNU/Linux" :-)
96 install -p -m 0644 "${worktree}/archive/ncftp/ncftpbookmarks.1" \
97 -D "${destdir}/${mandir}/man1/ncftpbookmarks.1"
99 # Compress and link man pages (if needed)
101 cd "${destdir}/$mandir"
102 find . -type f -exec lzip -9 {} +
103 find . -type l | while read -r file
105 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
112 mkdir -p "${destdir}/$docsdir"
113 cp -p $docs "${destdir}/$docsdir"
116 rm -f "${destdir}/$docsdirmanifest.txt"