recipes: tools/dialog: Upgraded to version 1.3-20200327
[dragora.git] / recipes / tools / dialog / recipe
blob07a1f2b6ebcb799a313415912590c2b4a7c8431e
1 # Build recipe for dialog.
3 # Copyright (c) 2017-2020 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=dialog
18 version=1.3-20200327
19 release=1
21 # Define a category for the output of the package name
22 pkgcategory=tools
24 tarname=${program}-${version}.tgz
26 # Remote source(s)
27 fetch=http://invisible-mirror.net/archives/dialog/$tarname
29 description="
30 Display dialog boxes in scripts.
32 Dialog is a program that will let you present a variety
33 of questions or display messages in nice looking color
34 non-graphical dialog boxes from a shell or perl script.
37 homepage=http://www.gnu.org/software/ncurses
38 license=LGPLv2.1
40 # Source documentation
41 docs="CHANGES COPYING README VERSION"
42 docsdir="${docdir}/${program}-${version}"
44 # Custom source directory
45 srcdir=${program}-${version}
47 build()
49     set -e
51     unpack "${tardir}/$tarname"
53     cd "$srcdir"
55     # Set sane permissions
56     chmod -R u+w,go-w,a+rX-s .
58     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS -static" \
59      $configure_args \
60      --libdir=/usr/lib${libSuffix} \
61      --mandir=$mandir \
62      --with-ncursesw \
63      --disable-rpath-hack \
64      --build="$(gcc -dumpmachine)"
66     make -j${jobs}
67     make -j${jobs} DESTDIR="$destdir" install
69     # Insert the look & feel from Dragora 3.  ;-)
71     mkdir -p "${destdir}/etc"
72     cp -p "${worktree}/archive/dialog/dialogrc" "${destdir}/etc/"
73     chmod 644 "${destdir}/etc/dialogrc"
75     # To manage .new (config) files via graft(8)
76     touch "${destdir}/etc/.graft-config"
78     # Compress man page and copy documentation
80     lzip -9 "${destdir}/${mandir}/man1/dialog.1"
82     mkdir -p "${destdir}${docsdir}"
83     cp -p $docs "${destdir}${docsdir}"