recipe 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # Build recipe for scrot.
  2. #
  3. # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
  4. # Copyright (c) 2018 Matias Fonzo, <selk@dragora.org>.
  5. #
  6. # Licensed under the Apache License, Version 2.0 (the "License");
  7. # you may not use this file except in compliance with the License.
  8. # You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. program=scrot
  18. version=0.8
  19. release=1
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/x-apps"
  22. tarname=${program}-${version}.tar.gz
  23. # Remote source(s)
  24. fetch=http://github.com/dreamer/scrot/archive/$tarname
  25. description="
  26. Command line screen capture util.
  27. scrot is a command-line screen capture util like \"import\", but using
  28. imlib2. It has lots of options for autogenerating filenames, and can
  29. do fun stuff like taking screenshots of multiple displays and glueing
  30. them together.
  31. "
  32. homepage=http://github.com/dreamer/scrot
  33. license=BSD
  34. # Source documentation
  35. docs="AUTHORS COPYING ChangeLog README TODO"
  36. docsdir="${docdir}/${program}-${version}"
  37. # Custom source directory
  38. srcdir="${program}-${program}-${version}"
  39. build()
  40. {
  41. set -e
  42. unpack "${tardir}/$tarname"
  43. cd "$srcdir"
  44. # Refresh scrot using patches from Debian, plus an update
  45. # from Dragora adding a missing header to getopt.c
  46. for file in "${worktree}"/patches/scrot/??*.patch
  47. do
  48. patch -Np1 < "$file"
  49. done
  50. unset file
  51. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  52. $configure_args \
  53. --mandir=$mandir \
  54. --build="$(cc -dumpmachine)"
  55. make -j${jobs} V=1
  56. make -j${jobs} DESTDIR="$destdir" install
  57. lzip -9 "${destdir}/${mandir}/man1/scrot.1"
  58. # This is wrong
  59. rm -rf "${destdir}/usr/doc"
  60. # Copy documentation
  61. mkdir -p "${destdir}${docsdir}"
  62. cp -p $docs "${destdir}${docsdir}/"
  63. }