aboutsummaryrefslogtreecommitdiffstats
path: root/devel/ioncube/Makefile
blob: 46fd3bbf1ba6805e1a6ca77109cf786951b50991 (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
# New ports collection makefile for:    ioncube
# Date created:     Fri Feb 12 21:43:10 CET 2010
# Whom:         Svyatoslav Lempert <svyatoslav.lempert@gmail.com>
#
# $FreeBSD$
#

PORTNAME=   ioncube
DISTVERSION=    4.4.0
CATEGORIES= devel
MASTER_SITES=   http://downloads3.ioncube.com/loader_downloads/ \
        http://dl.ispsystem.info/ioncube/${DISTVERSION}/ \
        http://downloads2.ioncube.com/loader_downloads/
DISTNAME=   ${PORTNAME}_loaders_fre_${VER}_${ARCH:S,i386,x86,:S,amd64,x86-64,}

MAINTAINER= svyatoslav.lempert@gmail.com
COMMENT=    ionCube loader for PHP code

ONLY_FOR_ARCHS= i386 amd64
NO_BUILD=   yes
USE_BZIP2=  yes
USE_PHP=    yes

SUB_FILES=  pkg-message
WRKSRC=     ${WRKDIR}/${PORTNAME}
DIST_SUBDIR=    ${PORTNAME}/${DISTVERSION}

.include <bsd.port.pre.mk>

# Detect OS Version
VER=    7
.if ${OSVERSION} >= 800000
VER=    8
.endif
.if ${OSVERSION} >= 900000
VER=    9
.endif

.if empty(PHP_VERSION)
PHP_VERSION!=   ${MAKE} -C ${PORTSDIR}/${PHP_PORT} -V PORTVERSION
.endif

PHP_INSTVER=    ${PHP_VERSION:C/^([0-9]+\.[0-9]+).*/\1/}

do-install:
    @${MKDIR} ${PREFIX}/lib/php/${PHP_EXT_DIR}/ioncube/
    ${INSTALL_DATA} ${WRKSRC}/ioncube_loader_fre_${PHP_INSTVER}.so \
        ${PREFIX}/lib/php/${PHP_EXT_DIR}/ioncube/ioncube_loader.so
    ${INSTALL_DATA} ${WRKSRC}/ioncube_loader_fre_${PHP_INSTVER}_ts.so \
        ${PREFIX}/lib/php/${PHP_EXT_DIR}/ioncube/ioncube_loader_ts.so

post-install:
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>