recipes: Rename 'pkghashtag' variable to 'pkgcategory'
[dragora.git] / recipes / networking / ncftp / recipe
blobe95626a2b8917010b1aabd0eb3bcd062f0eeaf3e
1 # Build recipe for ncftp.
3 # Copyright (c) 2018 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 program=ncftp
18 version=3.2.6
19 release=1
21 # Define a category for the output of the package name
22 pkgcategory=networking
24 tarname=${program}-${version}-src.tar.gz
26 # Remote source(s)
27 fetch=ftp://ftp.ncftp.com/ncftp/$tarname
29 description="
30 A File Transfer Protocol program.
32 NcFTP is a free set of programs that use the File Transfer Protocol.
33 It's been around for quite some time now (circa 1992) and many people
34 still use the program and contribute suggestions and feedback.
36 The main program is simply called \"ncftp\".  There are also separate
37 utility programs for one-shot FTP operations (i.e. for shell scripts
38 and command line junkies);  these include ncftpget, ncftpput, and
39 ncftpls.  Run each command without any arguments to see the usage
40 screen, or read the man page.
43 homepage=http://www.ncftp.com
44 license="Clarified Artistic License"
46 # Source documentation
47 docs="README.txt DONATE.txt doc/*.txt"
48 docsdir="${docdir}/${program}-${version}"
50 build()
52     set -e
54     unpack "${tardir}/$tarname"
56     cd "$srcdir"
58     # Set sane permissions
59     chmod -R u+w,go-w,a+rX-s .
61     # Unfortunately, this build system does
62     # not pick up the FLAGS after `configure'
63     CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -static" \
64     ./configure $configure_args \
65      --mandir=$mandir \
66      --enable-ssp \
67      --build="$(cc -dumpmachine)"
69     make -j${jobs}
70     make -j${jobs} DESTDIR="$destdir" install
72     # Replace hard link
73     ln -sf ncftpbatch "${destdir}/usr/bin/ncftpspooler"
75     # Compress and link man pages (if needed)
76     if test -d "${destdir}/$mandir"
77     then
78         (
79             cd "${destdir}/$mandir"
80             find . -type f -exec lzip -9 '{}' +
81             find . -type l | while read -r file
82             do
83                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
84                 rm -- "$file"
85             done
86         )
87     fi
89     # Copy documentation
91     mkdir -p "${destdir}${docsdir}"
92     cp -p $docs "${destdir}${docsdir}"
94     # Redundancy
95     rm -f "${destdir}${docsdir}/manifest.txt"