recipe 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Recipe file for sdcv.
  2. #
  3. # Maintainers: (C) 2016 Mateus P. Rodrigues, mprodrigues@dragora.org.
  4. #
  5. # Under the terms of the GNU General Public License.
  6. program=sdcv
  7. version=0.5.0-beta2
  8. release=1
  9. description="
  10. sdcv - console version of StarDict
  11. "
  12. homepage=https://dushistov.github.io/sdcv/
  13. license=GPLv2
  14. tarname=${program}-${version}-Source.tar.bz2
  15. pkgname=${program}
  16. pkgversion=0.5.0b2
  17. # Remote source(s)
  18. fetch=http://nbtelecom.dl.sourceforge.net/project/sdcv/sdcv/$tarname
  19. # Parallel jobs for the compiler
  20. jobs=3
  21. # Source documentation
  22. docs="AUTHORS LICENSE NEWS README.org"
  23. docsdir="${docdir}/${program}-${version}"
  24. build() {
  25. unpack "${tardir}/$tarname"
  26. cd "$srcdir"-Source
  27. mkdir -p build && cd build
  28. CMAKE_ROOT=/usr/share/cmake-2.8 cmake ..
  29. make -j${jobs}
  30. make -j${jobs} lang
  31. make -j${jobs} install DESTDIR="$destdir"
  32. # Compress and link man pages (if needed)
  33. if [ -d "${destdir}/$mandir" ] ; then
  34. (
  35. cd "${destdir}/$mandir"
  36. find . -type f -exec lzip -9 '{}' +
  37. find . -type l | while read -r file
  38. do
  39. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  40. rm -- "$file"
  41. done
  42. )
  43. fi
  44. # Copy documentation
  45. mkdir -p "${destdir}${docsdir}"
  46. for file in $docs ; do
  47. cp -p $file "${destdir}${docsdir}"
  48. done
  49. }