recipe 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Build recipe for scrot.
  2. #
  3. # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
  4. # Copyright (c) 2018, 2022 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.10.0
  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/v${version}/$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=MIT
  36. # Source documentation
  37. docs="AUTHORS COPYING ChangeLog README*"
  38. docsdir="${docdir}/${program}-${version}"
  39. build()
  40. {
  41. unpack "${tardir}/$tarname"
  42. cd "$srcdir"
  43. rm -rf BUILD
  44. mkdir BUILD
  45. cd BUILD
  46. CPPFLAGS="$QICPPFLAGS" \
  47. CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
  48. meson setup $configure_args \
  49. --libdir /usr/lib${libSuffix} \
  50. --buildtype=release \
  51. --strip \
  52. ..
  53. ninja -j${jobs}
  54. DESTDIR="$destdir" ninja -j${jobs} install
  55. cd ..
  56. lzip -9 "${destdir}/${mandir}/man1/scrot.1"
  57. # Copy documentation
  58. mkdir -p "${destdir}/$docsdir"
  59. cp -p $docs "${destdir}/$docsdir"
  60. }