recipe 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. # Exit immediately on any error
  18. set -e
  19. program=scrot
  20. version=0.8
  21. release=1
  22. # Define a category for the output of the package name
  23. pkgcategory=x-apps
  24. tarname=${program}-${version}.tar.gz
  25. # Remote source(s)
  26. fetch=https://github.com/dreamer/scrot/archive/$tarname
  27. description="
  28. Command line screen capture util.
  29. scrot is a command-line screen capture util like \"import\", but using
  30. imlib2. It has lots of options for autogenerating filenames, and can
  31. do fun stuff like taking screenshots of multiple displays and glueing
  32. them together.
  33. "
  34. homepage=https://github.com/dreamer/scrot
  35. license=BSD
  36. # Source documentation
  37. docs="AUTHORS COPYING ChangeLog README TODO"
  38. docsdir="${docdir}/${program}-${version}"
  39. # Custom source directory
  40. srcdir="${program}-${program}-${version}"
  41. build()
  42. {
  43. unpack "${tardir}/$tarname"
  44. cd "$srcdir"
  45. # Refresh scrot using patches from Debian, plus an update
  46. # from Dragora adding a missing header to getopt.c
  47. for file in "${worktree}"/patches/scrot/??*.patch
  48. do
  49. patch -Np1 < "$file"
  50. done
  51. unset -v file
  52. ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  53. $configure_args \
  54. --mandir=$mandir \
  55. --build="$(gcc -dumpmachine)"
  56. make -j${jobs} V=1
  57. make -j${jobs} DESTDIR="$destdir" install
  58. lzip -9 "${destdir}/${mandir}/man1/scrot.1"
  59. # This is wrong
  60. rm -rf "${destdir}/usr/doc"
  61. # Copy documentation
  62. mkdir -p "${destdir}${docsdir}"
  63. cp -p $docs "${destdir}${docsdir}/"
  64. }