recipe 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # Build recipe for graft.
  2. #
  3. # Copyright (c) 2017-2018 Matias Fonzo, <selk@dragora.org>.
  4. #
  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
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  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.
  16. program=graft
  17. version=2.16
  18. arch=noarch
  19. release=2
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/tools"
  22. tarname=${program}-${version}.tar.gz
  23. # Remote source(s)
  24. fetch=http://peters.gormand.com.au/Home/tools/graft/$tarname
  25. description="
  26. A package management utility.
  27. Graft provides a mechanism for managing multiple packages under a single
  28. directory hierarchy. Packages are installed in self contained directory
  29. trees and symbolic links from a common area are made to the package files.
  30. This approach allows multiple versions of the same package to co-exist on
  31. the one system. One version is the commonly available version and symbolic
  32. links will be made to this version. New versions can be tested and once
  33. acceptable can replace the current commonly available version. Older
  34. versions can still be used for legacy systems by using the 'real' path
  35. name to the package instead of the 'common' path name.
  36. "
  37. homepage=http://peters.gormand.com.au/Home/tools/graft
  38. license=GPLv2+
  39. # Source documentation
  40. docs="CHANGES COPYING README THOUGHTS doc/graft.html doc/graft.pdf doc/graft.txt"
  41. docsdir="${docdir}/${program}"
  42. # Limit package name to the program name
  43. full_pkgname=$program
  44. build()
  45. {
  46. set -e
  47. unpack "${tardir}/$tarname"
  48. cd "$srcdir"
  49. # Set sane permissions
  50. chmod -R u+w,go-w,a+rX-s .
  51. cp -f Makefile.dist Makefile
  52. make \
  53. PACKAGEDIR=/usr/pkg \
  54. TARGETDIR=/ \
  55. BIN="${destdir}/usr/bin" \
  56. MAN="${destdir}/$mandir" \
  57. DOC="${destdir}/$docsdir" \
  58. install
  59. # Compress manual page
  60. lzip -9 "${destdir}/${mandir}/man1/graft.1"
  61. # Copy source documentation
  62. mkdir -p "${destdir}${docsdir}"
  63. cp -p $docs "${destdir}${docsdir}"
  64. # Remove shipped .nograft from DOC
  65. rm -f "${destdir}${docsdir}/.nograft"
  66. }