recipe 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Build recipe for xorg-cf-files.
  2. #
  3. # Copyright (c) 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. program=xorg-cf-files
  17. version=1.0.6
  18. arch=noarch
  19. release=1
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/xorg/util"
  22. tarname=${program}-${version}.tar.bz2
  23. # Remote source(s)
  24. fetch=http://www.x.org/releases/individual/util/$tarname
  25. description="
  26. Data files for the imake package.
  27. The xorg-cf-files package contains the data files for the imake utility,
  28. defining the known settings for a wide variety of platforms (many of which
  29. have not been verified or tested in over a decade), and for many of the
  30. libraries formerly delivered in the X.Org monolithic releases.
  31. "
  32. homepage=http://www.x.org
  33. license="MIT X Consortium"
  34. # Source documentation
  35. docs="COPYING ChangeLog README"
  36. docsdir="${docdir}/${program}-${version}"
  37. build()
  38. {
  39. set -e
  40. unpack "${tardir}/$tarname"
  41. cd "$srcdir"
  42. # Set sane permissions
  43. chmod -R u+w,go-w,a+rX-s .
  44. ./configure $configure_args --libdir=/usr/lib${libSuffix} \
  45. --mandir=$mandir --docdir=$docsdir --build="$(cc -dumpmachine)"
  46. make -j${jobs} V=1
  47. make -j${jobs} DESTDIR="$destdir" install
  48. # Compress and link man pages (if needed)
  49. if test -d "${destdir}/$mandir"
  50. then
  51. (
  52. cd "${destdir}/$mandir"
  53. find . -type f -exec lzip -9 '{}' +
  54. find . -type l | while read -r file
  55. do
  56. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  57. rm -- "$file"
  58. done
  59. )
  60. fi
  61. # Copy documentation
  62. mkdir -p "${destdir}${docsdir}"
  63. cp -p $docs "${destdir}${docsdir}"
  64. }