blob: d27fd8d06f78c7eefd77b9c5d50427fd5c46cb50 (
plain) (
blame)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# Created by: Rusmir Dusko <nemysis@FreeBSD.org>
# $FreeBSD$
PORTNAME= brickutils
PORTVERSION= 0.1.6.1
PORTREVISION= 1
CATEGORIES= cad
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-${PORTVERSION:R}/ \
SF/${PORTNAME}/${PORTNAME}-${PORTVERSION:R}/:docs \
SF/nemysisfreebsdp/${CATEGORIES}/:icons
DISTFILES= BrickUtils-${DISTVERSION}${EXTRACT_SUFX} \
${PORTNAME}_icons${EXTRACT_SUFX}:icons
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= BrickUtils-${DISTVERSION}${EXTRACT_SUFX} \
${PORTNAME}_icons${EXTRACT_SUFX}
MAINTAINER= koalative@gmail.com
COMMENT= Utility for building models with LEGO
LICENSE= GPLv3
RUN_DEPENDS= ${LOCALBASE}/share/ldraw/models/car.dat:${PORTSDIR}/cad/ldraw \
${PYTHON_PACKAGENAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \
${PYXML}
WRKSRC= ${WRKDIR}/BrickUtils-${PORTVERSION}
USE_GNOME= pygtk2
USE_PYTHON= yes
PORTDOCS= *
DOCSRCDIR1= ${WRKSRC}
DOC_FILES1= ChangeLog
OPTIONS_DEFINE= DOCS
SUB_FILES= ${PORTNAME} \
pkg-message
INSTALLS_ICONS= yes
ICON_SIZES= 32x32 48x48 64x64 72x72 96x96 128x128
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDOCS}
DISTFILES+= ${PORTNAME}-manual-it.pdf:docs \
${PORTNAME}-manual.pdf:docs
.endif
post-patch:
@${REINPLACE_CMD} -e 's|/usr/share/|${PREFIX}|' \
${WRKSRC}/pyBrickUtils.py
do-build:
@${PYTHON_CMD} -m compileall ${WRKSRC}
@${PYTHON_CMD} -O -m compileall ${WRKSRC}
do-install:
@${REINPLACE_CMD} -e 's|%%PYTHON_CMD%%|${PYTHON_CMD}|' \
${WRKDIR}/${PORTNAME}
${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
.for f in pyBrickUtils.py pyBrickUtils.pyc pyBrickUtils.pyo catalog.new
@(cd ${WRKSRC} && ${COPYTREE_SHARE} ${f} ${STAGEDIR}${DATADIR})
.endfor
@(cd ${WRKSRC} && ${COPYTREE_SHARE} BrickUtils ${STAGEDIR}${DATADIR})
${INSTALL_DATA} ${WRKSRC}/BrickUtils.desktop ${STAGEDIR}${DESKTOPDIR}
@${CHMOD} -R 775 ${STAGEDIR}${DATADIR}
@(cd ${STAGEDIR}${DATADIR} && ${CHMOD} -R 664 catalog.new)
.for s in ${ICON_SIZES}
@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}/apps/
${INSTALL_DATA} ${WRKDIR}/${PORTNAME}_${s}.png \
${STAGEDIR}${PREFIX}/share/icons/hicolor/${s}/apps/${PORTNAME}.png
.endfor
${LN} -sf ${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png \
${STAGEDIR}${PREFIX}/share/pixmaps/
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${STAGEDIR}${DOCSDIR}
@(cd ${_DISTDIR} && ${CP} -a *.pdf ${STAGEDIR}${DOCSDIR})
.endif
.include <bsd.port.mk>
|