aboutsummaryrefslogtreecommitdiff
path: root/graphics/py-sorl-thumbnail/Makefile
blob: a523deca7d5f1fddee329a41585f4b882bac9a41 (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
# New ports collection makefile for:	py-sorl-thumbnail
# Date created:				24 November 2009
# Whom:					Kevin Golding <ports@caomhin.org>
#
# $FreeBSD$
#

PORTNAME=	sorl-thumbnail
PORTVERSION=	3.2.5
CATEGORIES=	graphics python
MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}

MAINTAINER=	ports@caomhin.org
COMMENT=	The sorl-thumbnail package provides an easy way to generate image thumbnails.

RUN_DEPENDS=	${LOCALBASE}/bin/pildriver.py:${PORTSDIR}/graphics/py-imaging

USE_PYTHON=	2.4+
USE_PYDISTUTILS=	yes

DOCSDIR=	${PREFIX}/share/doc/py-${PORTNAME}

OPTIONSFILE=	${PORT_DBDIR}/py-${PORTNAME}/options
OPTIONS=	DJANGO "Enable Django" On \
		PDF "Enable PDF Thumbnails" Off \
		WORD "Enable Word Document thumbnail handling" Off \
		DOCS "Install HTML documentation (requires Sphinx)" Off

.include <bsd.port.options.mk>

.if !defined(WITHOUT_DJANGO)
RUN_DEPENDS+=	${PYTHON_SITELIBDIR}/django/bin/django-admin.py:${PORTSDIR}/www/py-django
.endif

.if defined(WITH_PDF)
RUN_DEPENDS+=	${LOCALBASE}/bin/Magick-config:${PORTSDIR}/graphics/ImageMagick
.endif

.if defined(WITH_WORD)
RUN_DEPENDS+=	wvVersion:${PORTSDIR}/textproc/wv
.endif

.if defined(WITH_DOCS)
BUILD_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}sphinx>0:${PORTSDIR}/textproc/py-sphinx
PORTDOCS=	*
.endif

post-build:
.if defined(WITH_DOCS)
	cd ${WRKSRC}/docs && ${MAKE} html
.endif

post-install:
.if defined(WITH_DOCS)
	${MKDIR} ${DOCSDIR}
	${CP} -R ${WRKSRC}/docs/_build/html ${DOCSDIR}
.endif

.include <bsd.port.mk>