recipes: tools/qi: just a minor change for a clean installation
[dragora.git] / recipes / tools / qi / recipe
blob084c7effccc83f2f1626d648abe7a163161cdbe9
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-rc58
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 \
70      --prefix=/usr \
71      --libexecdir=/usr/libexec \
72      --bindir=/usr/bin \
73      --sbindir=/usr/sbin \
74      --sysconfdir=/etc \
75      --localstatedir=/var \
76      --infodir=/usr/share/info \
77      --mandir=/usr/share/man \
78      --docdir=/usr/share/doc \
79      --packagedir=/usr/pkg \
80      --targetdir=/
82     make -j${jobs} DESTDIR="$destdir" install
84     ln -s qi "${destdir}/usr/bin/dragora-qi"
86     # Copy the config file used in the temporary system
87     if test -r /tools/etc/qirc
88     then
89         cp -p /tools/etc/qirc "${destdir}/etc/"
90         cp -p /tools/etc/qirc "${destdir}/etc/qirc.bak"
91         chmod 644 "${destdir}"/etc/qirc*
92     fi
94     # Manage dot new file(s)
95     touch "${destdir}/etc/.graft-config"
97     # Compress and copy source documents
99     rm -f "${destdir}/${infodir}/dir"
100     lzip -9 "${destdir}/${infodir}/qi.info" \
101             "${destdir}/${mandir}/man1/qi.1"
103     mkdir -p "${destdir}${docsdir}"
104     cp -p $docs "${destdir}${docsdir}"/