recipe 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # Build recipe for qi.
  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=qi
  17. version=1.0-rc52
  18. arch=noarch
  19. release=1
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/tools"
  22. tarname=${program}-${version}.tar.lz
  23. # Remote source(s)
  24. fetch="
  25. http://rsync.dragora.org/current/sources/$tarname
  26. http://gungre.ch/dragora/mirror/current/sources/$tarname
  27. "
  28. description="
  29. A practical and user-friendly package manager.
  30. Qi provides operating modes for build, install, remove, upgrade,
  31. and inspect software packages.
  32. Qi produces software packages using recipe names (also known as
  33. "ports"); in this case, simple text files that contain shell
  34. instructions.
  35. Qi has been written to make use of Graft, a symlink utility to
  36. keep your packages under a single directory hierarchy, it was inspired
  37. by both Depot (Carnegie Mellon University) and Stow (Bob Glickstein).
  38. "
  39. homepage=http://www.dragora.org
  40. license=GPLv3+
  41. # Source documentation
  42. docs="AUTHORS COPYING CREDITS NEWS README doc/example.order"
  43. docsdir="${docdir}/${program}"
  44. # Limit package name to the program name
  45. full_pkgname=$program
  46. build()
  47. {
  48. set -e
  49. unpack "${tardir}/$tarname"
  50. cd "$srcdir"
  51. # Set sane permissions
  52. chmod -R u+w,go-w,a+rX-s .
  53. ./configure $configure_args --packagedir=/usr/pkg --targetdir=/
  54. make -j${jobs} DESTDIR="$destdir" install
  55. # Copy the config file used in the temporary system
  56. if test -r /tools/etc/qirc
  57. then
  58. cp -p /tools/etc/qirc "${destdir}/etc/"
  59. chmod 644 "${destdir}/etc/qirc"
  60. fi
  61. # Manage dot new file(s)
  62. touch "${destdir}/etc/.graft-config"
  63. # Compress and copy source documents
  64. lzip -9 "${destdir}/${infodir}/qi.info" \
  65. "${destdir}/${mandir}/man1/qi.1"
  66. mkdir -p "${destdir}${docsdir}"
  67. cp -p $docs "${destdir}${docsdir}"/
  68. }