recipes: Replace 'outdir' with package hash tags
[dragora.git] / recipes / tools / graft / recipe
blob73435fd2a69b3426bd5ad2124e4906db1fde8f16
1 # Build recipe for graft.
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=graft
18 version=2.16
19 arch=noarch
20 release=3
22 # Define hash tag to categorize the package name output
23 pkghashtag=tools
25 tarname=${program}-${version}.tar.gz
27 # Remote source(s)
28 fetch=http://peters.gormand.com.au/Home/tools/graft/$tarname
30 description="
31 A package management utility.
33 Graft provides a mechanism for managing multiple packages under a single
34 directory hierarchy. Packages are installed in self contained directory
35 trees and symbolic links from a common area are made to the package files.
37 This approach allows multiple versions of the same package to coexist on
38 the same system. One version is the commonly available version and
39 symbolic links will be made to this version. New versions can be tested
40 and once acceptable can replace the current commonly available version.
41 Older versions can still be used for legacy systems by using the 'real'
42 path name to the package instead of the 'common' path name.
45 homepage=http://peters.gormand.com.au/Home/tools/graft
46 license=GPLv2+
48 # Source documentation
49 docs="CHANGES COPYING README THOUGHTS doc/graft.html doc/graft.pdf doc/graft.txt"
50 docsdir="${docdir}/${program}"
52 # Limit package name to the program name
53 full_pkgname=$program
55 build()
57     set -e
59     unpack "${tardir}/$tarname"
61     cd "$srcdir"
63     # Set sane permissions
64     chmod -R u+w,go-w,a+rX-s .
66     cp -f Makefile.dist Makefile
68     make \
69      PACKAGEDIR=/usr/pkg       \
70      TARGETDIR=/               \
71      BIN="${destdir}/usr/bin"  \
72      MAN="${destdir}/$mandir"  \
73      DOC="${destdir}/$docsdir" \
74      install
76     # Compress manual page
77     lzip -9 "${destdir}/${mandir}/man1/graft.1"
79     # Copy source documentation
80     mkdir -p "${destdir}${docsdir}"
81     cp -p $docs "${destdir}${docsdir}"
83     # Remove shipped .nograft from DOC
84     rm -f "${destdir}${docsdir}/.nograft"