recipe 2.4 KB

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