recipe 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. # Build recipe for qi.
  2. #
  3. # Copyright (c) 2017-2020 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.3
  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.lz
  23. # Remote source(s)
  24. fetch="
  25. http://rsync.dragora.org/current/sources/$tarname
  26. http://mirror.cedia.org.ec/dragora/current/sources/$tarname
  27. "
  28. description="
  29. A user-friendly package manager.
  30. Qi is a simple but well-integrated package manager. It can create,
  31. install, remove, and upgrade software packages. Qi produces binary
  32. packages using recipes, which are files containing specific instructions
  33. to build each package from source. Qi can manage multiple packages
  34. under a single directory hierarchy. This method allows to maintain a
  35. set of packages and multiple versions of them. This means that Qi could
  36. be used as the main package manager or complement the existing one.
  37. Qi offers a friendly command line interface, a global configuration
  38. file, a simple recipe layout to deploy software packages; also works
  39. with binary packages in parallel, speeding up installations and packages
  40. in production. The format used for packages is a simplified but safe
  41. POSIX pax archive compressed with lzip.
  42. Qi is a modern (POSIX-compliant) shell script released under the
  43. terms of the GNU General Public License. There are only two major
  44. dependencies for the magic: graft(1) and tarlz(1), the rest is expected
  45. to be found in any Unix-like system.
  46. "
  47. homepage=http://www.dragora.org
  48. license=GPLv3+
  49. # Source documentation
  50. docs="AUTHORS COPYING CREDITS NEWS README doc/example.order"
  51. docsdir="${docdir}/${program}"
  52. # Limit package name to the program name
  53. full_pkgname=$program
  54. build()
  55. {
  56. set -e
  57. unpack "${tardir}/$tarname"
  58. cd "$srcdir"
  59. # Set sane permissions
  60. chmod -R u+w,go-w,a+rX-s .
  61. ./configure \
  62. --prefix=/usr \
  63. --libexecdir=/usr/libexec \
  64. --bindir=/usr/bin \
  65. --sbindir=/usr/sbin \
  66. --sysconfdir=/etc \
  67. --localstatedir=/var \
  68. --infodir=/usr/share/info \
  69. --mandir=/usr/share/man \
  70. --docdir=/usr/share/doc \
  71. --packagedir=/usr/pkg \
  72. --targetdir=/
  73. make -j${jobs} DESTDIR="$destdir" install
  74. ln -s qi "${destdir}/usr/bin/dragora-qi"
  75. # Copy the config file used in the temporary system
  76. if test -r /tools/etc/qirc
  77. then
  78. cp -p /tools/etc/qirc "${destdir}/etc/"
  79. cp -p /tools/etc/qirc "${destdir}/etc/qirc.bak"
  80. chmod 644 "${destdir}"/etc/qirc*
  81. fi
  82. # Manage dot new file(s)
  83. touch "${destdir}/etc/.graft-config"
  84. # Compress and copy source documents
  85. rm -f "${destdir}/${infodir}/dir"
  86. lzip -9 "${destdir}/${infodir}/qi.info" \
  87. "${destdir}/${mandir}/man1/qi.1"
  88. mkdir -p "${destdir}${docsdir}"
  89. cp -p $docs "${destdir}${docsdir}"/
  90. }