blob: c160c628290731f06043a1b001f09c05abdcd12b (
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
|
# Created by: Arjan van Leeuwen <avleeuwen@piwebs.com>
# $FreeBSD$
PORTNAME= dcraw
PORTVERSION= 9.26
CATEGORIES= graphics
MASTER_SITES= LOCAL/sunpoet
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Decoder for RAW files from digital cameras
LIB_DEPENDS= libjasper.so:graphics/jasper \
liblcms2.so:graphics/lcms2
CFLAGS+= -I${LOCALBASE}/include/jasper
LDFLAGS+= -ljasper -ljpeg -llcms2 -lm
USES= jpeg localbase tar:xz
PLIST_FILES= bin/${PORTNAME} \
man/man1/${PORTNAME}.1.gz
do-build:
@cd ${WRKSRC}/ && ${CC} -o ${PORTNAME} ${CFLAGS} ${PORTNAME}.c ${LDFLAGS}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${PREFIX}/man/man1/
# maintainer section:
MS_DIFF= ${MS_WRKSRC}/${PORTNAME}.c.diff
MS_VERSION= `${CAT} ${MS_VERSIONFILE}`
MS_VERSIONFILE= ${MS_WRKSRC}/.version
MS_WRKSRC= ${WRKSRC}/tmp
MS_MASTER_SITE= http://www.cybercom.net/~dcoffin/${PORTNAME}/
MS_DISTFILES= ${PORTNAME}.1 ${PORTNAME}.c
maketar: do-clean extract
@${MKDIR} ${MS_WRKSRC}/
.for file in ${MS_DISTFILES}
@${FETCH_CMD} -o ${MS_WRKSRC}/${file} ${MS_MASTER_SITE}${file}
.endfor
@${GREP} '^#define DCRAW_VERSION' ${MS_WRKSRC}/dcraw.c | cut -d'"' -f2 > ${MS_VERSIONFILE}
@${MKDIR} -m 755 ${MS_WRKSRC}/${PORTNAME}-${MS_VERSION}/
@cd ${MS_WRKSRC}/ && ${CHMOD} 644 ${MS_DISTFILES} && ${MV} ${MS_DISTFILES} ${PORTNAME}-${MS_VERSION}/
@(${DIFF} -u ${WRKSRC}/${PORTNAME}.c ${MS_WRKSRC}/${PORTNAME}-${MS_VERSION}/${PORTNAME}.c > ${MS_DIFF}) || ${TRUE}
@if [ -s ${MS_DIFF} ]; then \
cd ${MS_WRKSRC}/ && ${TAR} -Jcf ${PORTNAME}-${MS_VERSION}.tar.xz ${PORTNAME}-${MS_VERSION}/; \
sudo ${INSTALL} -m 644 ${MS_WRKSRC}/${PORTNAME}-${MS_VERSION}.tar.xz ${DISTDIR}/; \
${SED} -i '' -e '/^PORTVERSION=/ s|${PORTVERSION}|'${MS_VERSION}'|; /^PORTREVISION=/d' ${.CURDIR}/Makefile; \
cd ${.CURDIR}/ && ${MAKE_CMD} makesum; \
${ECHO_MSG} "*** Update from ${PORTVERSION} to ${MS_VERSION}, diff: ${MS_DIFF} ***"; \
else \
${ECHO_MSG} "*** ${MS_MASTER_SITE}${PORTNAME}.c is unchanged (${PORTVERSION}) ***"; \
fi
.include <bsd.port.mk>
|