blob: 65e85271b3d12249ccf9dc08da18006bd3089e1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# $FreeBSD$
PORTNAME= codespell
PORTVERSION= 1.8
CATEGORIES= textproc
MAINTAINER= gjb@FreeBSD.org
COMMENT= Source code spelling checker
LICENSE= GPLv2
USES= python:3 tar:xz
USE_GITHUB= yes
GH_ACCOUNT= lucasdemarchi
GH_TAGNAME= 4cb7fe3
OPTIONS_DEFINE= DOCS EXAMPLES
PLIST_FILES= bin/codespell
PORTDOCS= COPYING NEWS TODO
PORTEXAMPLES= *
SUB_FILES+= pkg-message
do-build:
${REINPLACE_CMD} 's|#!/usr/bin/env python3|#!${PYTHON_CMD}|' \
${WRKSRC}/codespell.py
${REINPLACE_CMD} "s|^default_dictionary = .*|default_dictionary = '${EXAMPLESDIR}/data/dictionary.txt'|" \
${WRKSRC}/codespell.py
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/codespell.py ${STAGEDIR}${PREFIX}/bin/codespell
@${MKDIR} ${STAGEDIR}${DOCSDIR}
. for i in ${PORTDOCS}
${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
. endfor
.for i in data example
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/${i}
${INSTALL_DATA} ${WRKSRC}/${i}/* ${STAGEDIR}${EXAMPLESDIR}/${i}
.endfor
.include <bsd.port.mk>
|