recipe 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. # Build recipe for xdg-user-dirs.
  2. #
  3. # Copyright (c) 2018-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=xdg-user-dirs
  17. version=0.17
  18. release=2
  19. # Set 'outdir' for a nice and well-organized output directory
  20. outdir="${outdir}/${arch}/xorg/extra"
  21. tarname=${program}-${version}.tar.gz
  22. # Remote source(s)
  23. fetch=http://user-dirs.freedesktop.org/releases/$tarname
  24. description="
  25. A tool to help manage user directories like the Desktop folder.
  26. xdg-user-dirs is a tool to help manage \"well known\" user directories
  27. like the desktop folder and the music folder. It also handles
  28. localization (i.e. translation) of the filenames.
  29. The way it works is that xdg-user-dirs-update is run very early in the
  30. login phase. This program reads a configuration file, and a set of
  31. default directories. It then creates localized versions of these
  32. directories in the users home directory and sets up a config file in
  33. \$(XDG_CONFIG_HOME)/user-dirs.dirs (XDG_CONFIG_HOME defaults to
  34. ~/.config) that applications can read to find these directories.
  35. "
  36. homepage=http://freedesktop.org/wiki/Software/xdg-user-dirs
  37. license=GPLv2+
  38. # Source documentation
  39. docs="AUTHORS COPYING ChangeLog NEWS README TODO"
  40. docsdir="${docdir}/${program}-${version}"
  41. build()
  42. {
  43. set -e
  44. unpack "${tardir}/$tarname"
  45. cd "$srcdir"
  46. # Set sane permissions
  47. chmod -R u+w,go-w,a+rX-s .
  48. ./configure \
  49. CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  50. $configure_args \
  51. --libdir=/usr/lib${libSuffix} \
  52. --mandir=$mandir \
  53. --docdir=$docsdir \
  54. --enable-documentation \
  55. --build="$(cc -dumpmachine)"
  56. make -j${jobs} V=1
  57. make -j${jobs} DESTDIR="$destdir" install-strip
  58. # To manage dot new files via graft(1)
  59. touch "${destdir}/etc/xdg/.graft-config"
  60. # Compress and link man pages (if needed)
  61. if test -d "${destdir}/$mandir"
  62. then
  63. (
  64. cd "${destdir}/$mandir"
  65. find . -type f -exec lzip -9 '{}' +
  66. find . -type l | while read -r file
  67. do
  68. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  69. rm -- "$file"
  70. done
  71. )
  72. fi
  73. # Copy documentation
  74. mkdir -p "${destdir}${docsdir}"
  75. cp -p $docs "${destdir}${docsdir}"
  76. }