aboutsummaryrefslogtreecommitdiffstats
path: root/misc/saaghar/Makefile
blob: 94a3263460edda5afea29f8551ae142807145002 (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
# $FreeBSD$

PORTNAME=   saaghar
PORTVERSION=    2.5.0
PORTREVISION=   1
CATEGORIES= misc
MASTER_SITES=   SF/saaghar/Source%20Code/:saaghar \
        SF/ganjoor/s3db:ganjoor
DISTFILES=  Saaghar-${PORTVERSION}.tar.gz:saaghar   \
        ganjoor-s3db-930711.zip:ganjoor
DIST_SUBDIR=    ${PORTNAME}

MAINTAINER= javad.kouhi@gmail.com
COMMENT=    Persian poetry software

LICENSE=    GPLv3

EXTRACT_DEPENDS=    ${LOCALBASE}/bin/unzip:archivers/unzip

OPTIONS_DEFINE= DEBUG

USES=       qmake dos2unix qt:4
USE_QT=     gui network sql xml sql-sqlite3_run \
        moc_build rcc_build uic_build phonon \
        dbus declarative xmlpatterns svg script
WRKSRC=     ${WRKDIR}/Saaghar

DOS2UNIX_REGEX= .*\.([ch]|cpp)

.include <bsd.port.options.mk>

.if !${PORT_OPTIONS:MDEBUG}
QMAKE_ARGS+=    -config release
.endif

post-extract:
    ${UNZIP_CMD} -d ${WRKDIR}/ganjoor \
        ${DISTDIR}/${DIST_SUBDIR}/ganjoor-s3db-930711.zip

post-patch:
    @${REINPLACE_CMD} -e '1 s|^.*/|/|g' \
        ${WRKSRC}/src/saagharwindow.cpp \
        ${WRKSRC}/src/version.h

post-install:
    cd ${WRKDIR}/ganjoor && ${COPYTREE_SHARE} .  ${STAGEDIR}${DATADIR}

.include <bsd.port.mk>