qi: new version. Use tar(1) in the unpack function to cover general archives compres...
[dragora.git] / recipes / tools / qi / recipe
blob9f3a6c9ff4f5e51688343c730f2e3bcd18fb61d2
1 # Build recipe for qi.
3 # Copyright (c) 2017-2019 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.0-rc56
19 arch=noarch
20 release=1
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/tools"
25 tarname=${program}-${version}.tar.lz
27 # Remote source(s)
28 fetch="
29  http://rsync.dragora.org/current/sources/$tarname
30  http://gungre.ch/dragora/mirror/current/sources/$tarname
33 description="
34 A practical and user-friendly package manager.
36 Qi provides operating modes for build, install, remove, upgrade,
37 and inspect software packages.
39 Qi produces software packages using recipe names (also known as
40 "ports"); in this case, simple text files that contain shell
41 instructions.
43 Qi has been written to make use of Graft, a symlink utility to
44 keep your packages under a single directory hierarchy, it was inspired
45 by both Depot (Carnegie Mellon University) and Stow (Bob Glickstein).
48 homepage=http://www.dragora.org
49 license=GPLv3+
51 # Source documentation
52 docs="AUTHORS COPYING CREDITS NEWS README doc/example.order"
53 docsdir="${docdir}/${program}"
55 # Limit package name to the program name
56 full_pkgname=$program
58 build()
60     set -e
62     unpack "${tardir}/$tarname"
64     cd "$srcdir"
66     # Set sane permissions
67     chmod -R u+w,go-w,a+rX-s .
69     ./configure $configure_args --packagedir=/usr/pkg --targetdir=/
71     make -j${jobs} DESTDIR="$destdir" install
73     ln -s qi "${destdir}/usr/bin/dragora-qi"
75     # Copy the config file used in the temporary system
76     if test -r /tools/etc/qirc
77     then
78         cp -p /tools/etc/qirc "${destdir}/etc/qirc"
79         cp -p /tools/etc/qirc "${destdir}/etc/qirc.bak"
80         chmod 644 "${destdir}"/etc/qirc*
81     fi
83     # Manage dot new file(s)
84     touch "${destdir}/etc/.graft-config"
86     # Compress and copy source documents
88     lzip -9 "${destdir}/${infodir}/qi.info" \
89             "${destdir}/${mandir}/man1/qi.1"
91     mkdir -p "${destdir}${docsdir}"
92     cp -p $docs "${destdir}${docsdir}"/