recipe 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Build recipe for tint2.
  2. #
  3. # Copyright (c) 2019-2020 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. # Exit immediately on any error
  17. set -e
  18. program=tint2
  19. version=20190714_7831350
  20. release=2
  21. # Define a category for the output of the package name
  22. pkgcategory=x-apps
  23. tarname=${program}-${version}.tar.lz
  24. # Remote source(s)
  25. fetch="
  26. http://rsync.dragora.org/current/sources/$tarname
  27. http://mirror.cedia.org.ec/dragora/current/sources/$tarname
  28. "
  29. description="
  30. tint2 is a simple panel/taskbar made for modern X window managers.
  31. It was specifically made for Openbox but it should also work with
  32. other window managers (GNOME, KDE, Xfce, etc.).
  33. "
  34. homepage=http://gitlab.com/o9000/tint2
  35. license=GPLv2+
  36. # Source documentation
  37. docsdir="${docdir}/${program}-${version}"
  38. build()
  39. {
  40. unpack "${tardir}/$tarname"
  41. cd "$srcdir"
  42. # Set sane permissions
  43. chmod -R u+w,go-w,a+rX-s .
  44. mkdir BUILD
  45. cd BUILD
  46. cmake \
  47. -DCMAKE_C_FLAGS_RELEASE:STRING="$QICFLAGS" \
  48. -DCMAKE_EXE_LINKER_FLAGS:STRING="$QILDFLAGS" \
  49. -DCMAKE_INSTALL_PREFIX=/usr \
  50. -DCMAKE_INSTALL_MANDIR=$mandir \
  51. -DCMAKE_INSTALL_DOCDIR=$docsdir \
  52. -DCMAKE_BUILD_TYPE=Release \
  53. -DCMAKE_VERBOSE_MAKEFILE=ON \
  54. ..
  55. make -j${jobs}
  56. make -j${jobs} DESTDIR="$destdir" install
  57. # Compress and link man pages (if needed)
  58. if test -d "${destdir}/$mandir"
  59. then
  60. (
  61. cd "${destdir}/$mandir"
  62. find . -type f -exec lzip -9 {} +
  63. find . -type l | while read -r file
  64. do
  65. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  66. rm -- "$file"
  67. done
  68. )
  69. fi
  70. }