Fix url for getting Graft
[dragora.git] / recipes / tools / graft / recipe
blob85b165e5c2ce8025ec3948c86e5044b01efc793b
1 # Build recipe for graft.
3 # Copyright (c) 2017-2019, 2021-2022 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 # Exit immediately on any error
18 set -e
20 program=graft
21 version=2.16
22 arch=noarch
23 release=6
25 # Define a category for the output of the package name
26 pkgcategory=tools
28 tarname=${program}-${version}.tar.gz
30 # Remote source(s)
31 fetch="
32  https://rsync.dragora.org/current/sources/$tarname
33  https://mirror.cedia.org.ec/dragora/current/sources/$tarname
35 #fetch=http://peters.gormand.com.au/Home/tools/graft/$tarname
37 description="
38 A package management utility (version $version).
40 Graft provides a mechanism for managing multiple packages under a single
41 directory hierarchy. Packages are installed in self contained directory
42 trees and symbolic links from a common area are made to the package files.
44 This approach allows multiple versions of the same package to coexist on
45 the same system. One version is the commonly available version and
46 symbolic links will be made to this version. New versions can be tested
47 and once acceptable can replace the current commonly available version.
48 Older versions can still be used for legacy systems by using the 'real'
49 path name to the package instead of the 'common' path name.
52 homepage=https://peters.gormand.com.au/Home/tools/graft
53 license=GPLv2+
55 # Source documentation
56 docs="CHANGES COPYING README THOUGHTS doc/graft.html doc/graft.pdf doc/graft.txt"
57 docsdir="${docdir}/${program}"
59 # Limit package name to the program name
60 full_pkgname="${program}@${pkgcategory}"
62 build()
64     unpack "${tardir}/$tarname"
66     cd "$srcdir"
68     # Set sane permissions
69     chmod -R u+w,go-w,a+rX-s .
71     cp -f Makefile.dist Makefile
73     make \
74      PACKAGEDIR=/usr/pkg       \
75      TARGETDIR=/               \
76      BIN="${destdir}/usr/bin"  \
77      MAN="${destdir}/$mandir"  \
78      DOC="${destdir}/$docsdir" \
79      install
81     # Compress manual page
82     lzip -9 "${destdir}/${mandir}/man1/graft.1"
84     # Copy source documentation
85     mkdir -p "${destdir}${docsdir}"
86     cp -p $docs "${destdir}${docsdir}"
88     # Remove shipped .nograft from DOC
89     rm -f "${destdir}${docsdir}/.nograft"