recipe 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # Build recipe for graft.
  2. #
  3. # Copyright (c) 2017-2019, 2021-2022 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=6
  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="
  27. https://dragora.mirror.garr.it/current/sources/$tarname
  28. rsync://rsync.dragora.org/current/sources/$tarname
  29. "
  30. #fetch=http://peters.gormand.com.au/Home/tools/graft/$tarname
  31. description="
  32. A package management utility (version $version).
  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.
  36. This approach allows multiple versions of the same package to coexist on
  37. the same system. One version is the commonly available version and
  38. symbolic links will be made to this version. New versions can be tested
  39. and once acceptable can replace the current commonly available version.
  40. Older versions can still be used for legacy systems by using the 'real'
  41. path name to the package instead of the 'common' path name.
  42. "
  43. homepage=https://peters.gormand.com.au/Home/tools/graft
  44. license=GPLv2+
  45. # Source documentation
  46. docs="CHANGES COPYING README THOUGHTS doc/graft.html doc/graft.pdf doc/graft.txt"
  47. docsdir="${docdir}/${program}"
  48. # Limit package name to the program name
  49. full_pkgname="${program}@${pkgcategory}"
  50. build()
  51. {
  52. unpack "${tardir}/$tarname"
  53. cd "$srcdir"
  54. # Set sane permissions
  55. chmod -R u+w,go-w,a+rX-s .
  56. cp -f Makefile.dist Makefile
  57. make \
  58. PACKAGEDIR=/usr/pkg \
  59. TARGETDIR=/ \
  60. BIN="${destdir}/usr/bin" \
  61. MAN="${destdir}/$mandir" \
  62. DOC="${destdir}/$docsdir" \
  63. install
  64. # Compress manual page
  65. lzip -9 "${destdir}/${mandir}/man1/graft.1"
  66. # Copy source documentation
  67. mkdir -p "${destdir}/$docsdir"
  68. cp -p $docs "${destdir}/$docsdir"
  69. # Remove shipped .nograft from DOC
  70. rm -f "${destdir}/$docsdir.nograft"
  71. }