qi: Bump to version 1.4
[dragora.git] / recipes / tools / qi / recipe
blob5d9897e4650d3c1d2820d678c86588a9f4b5bb07
1 # Build recipe for qi.
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=qi
18 version=1.4
19 arch=noarch
20 release=1
22 # Define hash tag to categorize the package name output
23 pkghashtag=tools
25 tarname=${program}-${version}.tar.lz
27 # Remote source(s)
28 fetch="
29  http://rsync.dragora.org/current/sources/$tarname
30  http://mirror.cedia.org.ec/dragora/current/sources/$tarname
33 description="
34 A user-friendly package manager.
36 Qi is a simple but well-integrated package manager.  It can create,
37 install, remove, and upgrade software packages.  Qi produces binary
38 packages using recipes, which are files containing specific instructions
39 to build each package from source.  Qi can manage multiple packages
40 under a single directory hierarchy.  This method allows to maintain a
41 set of packages and multiple versions of them.  This means that Qi could
42 be used as the main package manager or complement the existing one.
44 Qi offers a friendly command line interface, a global configuration
45 file, a simple recipe layout to deploy software packages; also works
46 with binary packages in parallel, speeding up installations and packages
47 in production.  The format used for packages is a simplified but safe
48 POSIX pax archive compressed with lzip.
50 Qi is a modern (POSIX-compliant) shell script released under the
51 terms of the GNU General Public License.  There are only two major
52 dependencies for the magic: graft(1) and tarlz(1), the rest is expected
53 to be found in any Unix-like system.
56 homepage=http://www.dragora.org
57 license=GPLv3+
59 # Source documentation
60 docs="AUTHORS COPYING CREDITS NEWS README.md doc/example.order"
61 docsdir="${docdir}/${program}"
63 # Limit package name to the program name
64 full_pkgname=$program
66 build()
68     set -e
70     unpack "${tardir}/$tarname"
72     cd "$srcdir"
74     # Set sane permissions
75     chmod -R u+w,go-w,a+rX-s .
77     ./configure \
78      --prefix=/usr \
79      --libexecdir=/usr/libexec \
80      --bindir=/usr/bin \
81      --sbindir=/usr/sbin \
82      --sysconfdir=/etc \
83      --localstatedir=/var \
84      --infodir=/usr/share/info \
85      --mandir=/usr/share/man \
86      --docdir=/usr/share/doc \
87      --packagedir=/usr/pkg \
88      --targetdir=/
90     make -j${jobs} DESTDIR="$destdir" install
92     ln -s qi "${destdir}/usr/bin/dragora-qi"
94     # Copy the config file used in the temporary system
95     if test -r /tools/etc/qirc
96     then
97         cp -p /tools/etc/qirc "${destdir}/etc/"
98         cp -p /tools/etc/qirc "${destdir}/etc/qirc.bak"
99         chmod 644 "${destdir}"/etc/qirc*
100     fi
102     # Manage dot new file(s)
103     touch "${destdir}/etc/.graft-config"
105     # Compress and copy source documents
107     rm -f "${destdir}/${infodir}/dir"
108     lzip -9 "${destdir}/${infodir}/qi.info" \
109             "${destdir}/${mandir}/man1/qi.1"
111     mkdir -p "${destdir}${docsdir}"
112     cp -p $docs "${destdir}${docsdir}"