Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # $OpenBSD: Makefile,v 1.1.1.1 2014/07/08 08:45:22 zhuk Exp $
  2. CATEGORIES = books devel
  3. COMMENT = POSIX manual pages
  4. DISTNAME = man-pages-posix-2013-a
  5. PKGNAME = ${DISTNAME:C/(-[0-9]+)-/\1/}
  6. PKG_ARCH = *
  7. MASTER_SITES = https://www.kernel.org/pub/linux/docs/man-pages/man-pages-posix/
  8. EXTRACT_SUFX = .tar.xz
  9. # custom copyleft license, see POSIX-COPYRIGHT
  10. PERMIT_PACKAGE_CDROM = Yes
  11. USE_GROFF = Yes
  12. NO_BUILD = Yes
  13. NO_TEST = Yes
  14. DOCDIR = ${PREFIX}/share/doc/posix
  15. SUBST_VARS = DOCDIR
  16. # mapping of categories: source => destination
  17. MANS = 0p 3
  18. MANS += 1p 1
  19. MANS += 3p 3
  20. do-install:
  21. .for _src _dst in ${MANS}
  22. ${INSTALL_DATA_DIR} ${DOCDIR}/man/man${_dst}
  23. ${INSTALL_DATA} ${WRKSRC}/man${_src}/*.${_src} ${DOCDIR}/man/man${_dst}
  24. cd ${DOCDIR}/man/man${_dst}; \
  25. for page in *.${_src}; do \
  26. echo mv $$page $${page%${_src}}${_dst} >&2; \
  27. mv $$page $${page%${_src}}${_dst}; \
  28. done
  29. # 1. Tweak page names to make whatis happier.
  30. # 2. Change Linux references in PROLOG sections to "generic" ones.
  31. perl -pi \
  32. -e 's,^(\.TH [^"]+)"${_src}",$$1"${_dst}",i;' \
  33. -e 's,Linux(\.| (?:behavior|implementation|manual)),OS$$1,g;' \
  34. ${DOCDIR}/man/man${_dst}/*.${_dst}
  35. .endfor
  36. ${INSTALL_DATA} ${WRKSRC}/POSIX-COPYRIGHT ${DOCDIR}
  37. # Install original package until mandoc(1) receive tbl(7) support,
  38. # to obey the license rules
  39. ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/${DISTFILES} \
  40. ${DOCDIR}
  41. .include <bsd.port.mk>