aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/samesame/Makefile
blob: 805eb62003f1afd8916f6b5671b91b525709b357 (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
# New ports collection makefile for:    samesame
# Date created:     14 April 2009
# Whom:         Alex de Kruijff
#
# $FreeBSD$

PORTNAME=   samesame
PORTVERSION=    1.2
PORTREVISION=   1
CATEGORIES= sysutils
MASTER_SITES=   http://samesame.kruijff.org/ \
        ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= dhn

MAINTAINER= samesame@akruijff.dds.nl
COMMENT=    Find identical files and optionally link them together

CONFLICTS=  samefile-[0-9]*

MAN1=   samearchive.1 samearchive-lite.1 samefile.1 samelink.1
MANCOMPRESSED=  yes
PLIST_FILES=    bin/samearchive     bin/samefile \
        bin/samearchive-lite    bin/samelink \
        etc/rc.d/samesame.sh

USE_BZIP2=  yes

OPTIONS=    DEBUG "Enables debugging support" Off \
        DISK_STORAGE "Allow temporarily storage paths on disk" On \
        LOGIC "Determine results by using logic when posible" On \
        TEST "Run quality assurance test" Off

.include <bsd.port.pre.mk>

.if defined(WITH_DEBUG)
CFLAGS+=    -DDEBUG
.endif

.if defined(WITH_DISK_STORAGE)
CFLAGS+=    -DWITH_DISK_STORAGE
.endif

.if defined(WITHOUT_LOGIC)
CFLAGS+=    -DWITHOUT_LOGIC
.endif

CFLAGS+=    -DWITH_MMAP
CFLAGS+=    -D'TEMP_STORAGE_DIR=\"/tmp\"'
CFLAGS+=    -DPATH_INIT=256
CFLAGS+=    -DSTATIC_CACHE_CAPACITY=8192

post-patch:
    @${REINPLACE_CMD} -e 's|@||g' ${WRKSRC}/Makefile

post-build:
.if defined(WITH_TEST)
    cd ${WRKSRC}; ${MAKE} test
.endif

pre-install:
.if defined(WITH_TEST)
    cd ${WRKSRC}; ${MAKE} test
.endif

post-install:
    ${STRIP_CMD} ${PREFIX}/bin/samefile
    ${STRIP_CMD} ${PREFIX}/bin/samelink
    ${STRIP_CMD} ${PREFIX}/bin/samearchive
    ${STRIP_CMD} ${PREFIX}/bin/samearchive-lite
    ${INSTALL_SCRIPT} ${FILESDIR}/samesame.sh ${PREFIX}/etc/rc.d/

.include <bsd.port.post.mk>