diff options
author | gahr <gahr@FreeBSD.org> | 2016-10-27 13:49:09 +0800 |
---|---|---|
committer | gahr <gahr@FreeBSD.org> | 2016-10-27 13:49:09 +0800 |
commit | c4a2c7f8b52c053e9ce44dffef14725322ad9fc4 (patch) | |
tree | d720e37f939e7ec51f3191db3bea0a027966b860 /ftp | |
parent | 3baeb71bb56c4739693df9cb492422cdc27bb0bb (diff) | |
download | freebsd-ports-gnome-c4a2c7f8b52c053e9ce44dffef14725322ad9fc4.tar.gz freebsd-ports-gnome-c4a2c7f8b52c053e9ce44dffef14725322ad9fc4.tar.zst freebsd-ports-gnome-c4a2c7f8b52c053e9ce44dffef14725322ad9fc4.zip |
New ports: devel/libfastcommon, ftp/fastdfs, ftp/php(56|70)-fastdfs
FastDFS is an open source high performance distributed file system (DFS).
It's major functions include: file storing, file syncing and file accessing,
and design for high capacity and load balance.
WWW: https://github.com/happyfish100/fastdfs
PR: 213311
Submitted by: Daniel Ylitalo <daniel@blodan.se>
Diffstat (limited to 'ftp')
24 files changed, 548 insertions, 0 deletions
diff --git a/ftp/Makefile b/ftp/Makefile index 0ec577aeb7be..812f3fdbbb22 100644 --- a/ftp/Makefile +++ b/ftp/Makefile @@ -17,6 +17,7 @@ SUBDIR += curl-hiphop SUBDIR += curlpp SUBDIR += dmachine + SUBDIR += fastdfs SUBDIR += filezilla SUBDIR += fmirror SUBDIR += fpc-libcurl @@ -64,8 +65,10 @@ SUBDIR += pear-Net_FTP SUBDIR += pftpd SUBDIR += php56-curl + SUBDIR += php56-fastdfs SUBDIR += php56-ftp SUBDIR += php70-curl + SBUDIR += php70-fastdfs SUBDIR += php70-ftp SUBDIR += phpwebftp SUBDIR += plasma-applet-ftpmonitor diff --git a/ftp/fastdfs/Makefile b/ftp/fastdfs/Makefile new file mode 100644 index 000000000000..b57157877905 --- /dev/null +++ b/ftp/fastdfs/Makefile @@ -0,0 +1,36 @@ +# $FreeBSD$ + +PORTNAME= fastdfs +PORTVERSION= 5.0.8 +CATEGORIES= ftp + +MAINTAINER= daniel@blodan.se +COMMENT= High performance distributed file system (DFS) + +LICENSE= GPLv3 + +LIB_DEPENDS= libfastcommon.so:devel/libfastcommon + +USES= perl5 +USE_LDCONFIG= yes + +USE_RC_SUBR= fdfs_storaged fdfs_trackerd +USERS= _fastdfs +GROUPS= _fastdfs + +USE_GITHUB= yes +GH_ACCOUNT= happyfish100 +GH_TAGNAME= 87659981148a362812912b6d4752d281ac05f0b6 + +MAKE_ENV += DESTDIR=${STAGEDIR} + +do-build: + cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${SH} make.sh + +do-install: + cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${SH} make.sh install + @${INSTALL} -d ${STAGEDIR}/var/db/fastdfs + @${INSTALL} -d ${STAGEDIR}/var/db/fastdfs/tracker + @${INSTALL} -d ${STAGEDIR}/var/db/fastdfs/storage + +.include <bsd.port.mk> diff --git a/ftp/fastdfs/distinfo b/ftp/fastdfs/distinfo new file mode 100644 index 000000000000..c79e85944cfb --- /dev/null +++ b/ftp/fastdfs/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1477045074 +SHA256 (happyfish100-fastdfs-5.0.8-87659981148a362812912b6d4752d281ac05f0b6_GH0.tar.gz) = c901415de55cad67fe31678091ce131ad4973bce19770f1a03b0be38ba02662d +SIZE (happyfish100-fastdfs-5.0.8-87659981148a362812912b6d4752d281ac05f0b6_GH0.tar.gz) = 335406 diff --git a/ftp/fastdfs/files/fdfs_storaged.in b/ftp/fastdfs/files/fdfs_storaged.in new file mode 100644 index 000000000000..09a6e52ebb29 --- /dev/null +++ b/ftp/fastdfs/files/fdfs_storaged.in @@ -0,0 +1,46 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: fdfs_storaged +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable `fdfs_storaged': +# +# fdfs_storaged_enable="YES" +# + +. /etc/rc.subr + +name="fdfs_storaged" +rcvar=fdfs_storaged_enable + +command="%%PREFIX%%/bin/fdfs_storaged" +pidfile="/var/run/fdfs_storaged.pid" + +start_postcmd="${name}_poststart" +stop_postcmd="rm ${pidfile}" + +fdfs_storaged_poststart() +{ + /bin/ps auxwww|/usr/bin/grep fdfs_storaged|/usr/bin/grep -v 'grep'|grep -v 'rc.d'|/usr/bin/awk '{print $2;}' > /var/run/fdfs_storaged.pid + + currpid=`/bin/cat /var/run/fdfs_storaged.pid` + + if [ "$currpid" -gt 0 ]; then + echo "Started fdfs_storaged." + fi +} + +# read configuration and set defaults +load_rc_config "$name" +: ${fdfs_storaged_enable="NO"} +: ${fdfs_storaged_config="%%PREFIX%%/etc/fdfs/storage.conf"} + +command_args="${fdfs_storaged_config}" +required_files="${fdfs_storaged_config}" + +run_rc_command "$1" + diff --git a/ftp/fastdfs/files/fdfs_trackerd.in b/ftp/fastdfs/files/fdfs_trackerd.in new file mode 100644 index 000000000000..66739d6ad8be --- /dev/null +++ b/ftp/fastdfs/files/fdfs_trackerd.in @@ -0,0 +1,46 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: fdfs_trackerd +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable `fdfs_trackerd': +# +# fdfs_trackerd_enable="YES" +# + +. /etc/rc.subr + +name="fdfs_trackerd" +rcvar=fdfs_trackerd_enable + +command="%%PREFIX%%/bin/fdfs_trackerd" +pidfile="/var/run/fdfs_trackerd.pid" + +start_postcmd="${name}_poststart" +stop_postcmd="rm ${pidfile}" + +fdfs_trackerd_poststart() +{ + /bin/ps auxwww|/usr/bin/grep fdfs_trackerd|/usr/bin/grep -v 'grep'|grep -v 'rc.d'|/usr/bin/awk '{print $2;}' > /var/run/fdfs_trackerd.pid + + currpid=`/bin/cat /var/run/fdfs_trackerd.pid` + + if [ "$currpid" -gt 0 ]; then + echo "Started fdfs_trackerd." + fi +} + +# read configuration and set defaults +load_rc_config "$name" +: ${fdfs_trackerd_enable="NO"} +: ${fdfs_trackerd_config="%%PREFIX%%/etc/fdfs/tracker.conf"} + +command_args="${fdfs_trackerd_config}" +required_files="${fdfs_trackerd_config}" + +run_rc_command "$1" + diff --git a/ftp/fastdfs/files/patch-client-Makefile.in b/ftp/fastdfs/files/patch-client-Makefile.in new file mode 100644 index 000000000000..9d31939b16f8 --- /dev/null +++ b/ftp/fastdfs/files/patch-client-Makefile.in @@ -0,0 +1,38 @@ +--- client/Makefile.in.orig 2016-08-08 07:17:50 UTC ++++ client/Makefile.in +@@ -3,10 +3,10 @@ + COMPILE = $(CC) $(CFLAGS) + ENABLE_STATIC_LIB = $(ENABLE_STATIC_LIB) + ENABLE_SHARED_LIB = $(ENABLE_SHARED_LIB) +-INC_PATH = -I../common -I../tracker -I/usr/include/fastcommon ++INC_PATH = -I../common -I../tracker -I$(LOCALBASE)/include/fastcommon + LIB_PATH = $(LIBS) -lfastcommon + TARGET_PATH = $(TARGET_PREFIX)/bin +-TARGET_LIB = $(TARGET_PREFIX)/lib64 ++TARGET_LIB = $(TARGET_PREFIX)/lib + TARGET_INC = $(TARGET_PREFIX)/include + CONFIG_PATH = $(TARGET_CONF_PATH) + +@@ -50,7 +50,8 @@ ALL_LIBS = $(STATIC_LIBS) $(SHARED_LIBS) + + all: $(ALL_OBJS) $(ALL_PRGS) $(ALL_LIBS) + libfdfsclient.so: +- $(COMPILE) -o $@ $< -shared $(FDFS_SHARED_OBJS) $(LIB_PATH) ++ $(COMPILE) -o $@ $< -shared $(FDFS_SHARED_OBJS) $(LIB_PATH) \ ++ -Wl,-soname,libfdfsclient.so + libfdfsclient.a: + ar cru $@ $< $(FDFS_STATIC_OBJS) + .o: +@@ -66,9 +67,9 @@ install: + mkdir -p $(CONFIG_PATH) + mkdir -p $(TARGET_LIB) + mkdir -p $(TARGET_PREFIX)/lib +- cp -f $(ALL_PRGS) $(TARGET_PATH) +- if [ $(ENABLE_STATIC_LIB) -eq 1 ]; then cp -f $(STATIC_LIBS) $(TARGET_LIB); cp -f $(STATIC_LIBS) $(TARGET_PREFIX)/lib/;fi +- if [ $(ENABLE_SHARED_LIB) -eq 1 ]; then cp -f $(CLIENT_SHARED_LIBS) $(TARGET_LIB); cp -f $(CLIENT_SHARED_LIBS) $(TARGET_PREFIX)/lib/;fi ++ install -s $(ALL_PRGS) $(TARGET_PATH) ++ if [ $(ENABLE_STATIC_LIB) -eq 1 ]; then install -s $(STATIC_LIBS) $(TARGET_LIB); install -s $(STATIC_LIBS) $(TARGET_PREFIX)/lib/;fi ++ if [ $(ENABLE_SHARED_LIB) -eq 1 ]; then install -s $(CLIENT_SHARED_LIBS) $(TARGET_LIB); install -s $(CLIENT_SHARED_LIBS) $(TARGET_PREFIX)/lib/;fi + + mkdir -p $(TARGET_INC)/fastdfs + cp -f $(FDFS_HEADER_FILES) $(TARGET_INC)/fastdfs diff --git a/ftp/fastdfs/files/patch-conf-client.conf b/ftp/fastdfs/files/patch-conf-client.conf new file mode 100644 index 000000000000..161990d6dd6a --- /dev/null +++ b/ftp/fastdfs/files/patch-conf-client.conf @@ -0,0 +1,11 @@ +--- conf/client.conf.orig 2016-08-08 07:17:50 UTC ++++ conf/client.conf +@@ -7,7 +7,7 @@ connect_timeout=30 + network_timeout=60 + + # the base path to store log files +-base_path=/home/yuqing/fastdfs ++base_path=/var/db/fastdfs + + # tracker_server can ocur more than once, and tracker_server format is + # "host:port", host can be hostname or ip address diff --git a/ftp/fastdfs/files/patch-conf-storage.conf b/ftp/fastdfs/files/patch-conf-storage.conf new file mode 100644 index 000000000000..51b71c74fa2d --- /dev/null +++ b/ftp/fastdfs/files/patch-conf-storage.conf @@ -0,0 +1,36 @@ +--- conf/storage.conf.orig 2016-08-08 07:17:50 UTC ++++ conf/storage.conf +@@ -38,7 +38,7 @@ heart_beat_interval=30 + stat_report_interval=60 + + # the base path to store data and log files +-base_path=/home/yuqing/fastdfs ++base_path=/var/db/fastdfs/storage + + # max concurrent connections the server supported + # default value is 256 +@@ -106,8 +106,8 @@ store_path_count=1 + + # store_path#, based 0, if store_path0 not exists, it's value is base_path + # the paths must be exist +-store_path0=/home/yuqing/fastdfs +-#store_path1=/home/yuqing/fastdfs2 ++store_path0=/var/db/fastdfs/storage ++#store_path1=/var/db/fastdfs/storage2 + + # subdir_count * subdir_count directories will be auto created under each + # store_path (disk), value can be 1 to 256, default value is 256 +@@ -130,11 +130,11 @@ log_level=info + + #unix group name to run this program, + #not set (empty) means run by the group of current user +-run_by_group= ++run_by_group=_fastdfs + + #unix username to run this program, + #not set (empty) means run by current user +-run_by_user= ++run_by_user=_fastdfs + + # allow_hosts can ocur more than once, host can be hostname or ip address, + # "*" (only one asterisk) means match all ip addresses diff --git a/ftp/fastdfs/files/patch-conf-tracker.conf b/ftp/fastdfs/files/patch-conf-tracker.conf new file mode 100644 index 000000000000..42ff48d4e902 --- /dev/null +++ b/ftp/fastdfs/files/patch-conf-tracker.conf @@ -0,0 +1,25 @@ +--- conf/tracker.conf.orig 2016-08-08 07:17:50 UTC ++++ conf/tracker.conf +@@ -19,7 +19,7 @@ connect_timeout=30 + network_timeout=60 + + # the base path to store data and log files +-base_path=/home/yuqing/fastdfs ++base_path=/var/db/fastdfs/tracker + + # max concurrent connections this server supported + max_connections=256 +@@ -85,11 +85,11 @@ log_level=info + + #unix group name to run this program, + #not set (empty) means run by the group of current user +-run_by_group= ++run_by_group=_fastdfs + + #unix username to run this program, + #not set (empty) means run by current user +-run_by_user= ++run_by_user=_fastdfs + + # allow_hosts can ocur more than once, host can be hostname or ip address, + # "*" (only one asterisk) means match all ip addresses diff --git a/ftp/fastdfs/files/patch-make.sh b/ftp/fastdfs/files/patch-make.sh new file mode 100644 index 000000000000..50e709575b69 --- /dev/null +++ b/ftp/fastdfs/files/patch-make.sh @@ -0,0 +1,102 @@ +--- make.sh.orig 2016-08-08 07:17:50 UTC ++++ make.sh +@@ -1,58 +1,19 @@ +-tmp_src_filename=fdfs_check_bits.c +-cat <<EOF > $tmp_src_filename +-#include <stdio.h> +-#include <unistd.h> +-#include <fcntl.h> +-int main() +-{ +- printf("%d\n", (int)sizeof(long)); +- printf("%d\n", (int)sizeof(off_t)); +- return 0; +-} +-EOF +- +-gcc -D_FILE_OFFSET_BITS=64 -o a.out $tmp_src_filename +-output=$(./a.out) + +-if [ -f /bin/expr ]; then +- EXPR=/bin/expr +-else +- EXPR=/usr/bin/expr +-fi +- +-count=0 +-int_bytes=4 +-off_bytes=8 +-for col in $output; do +- if [ $count -eq 0 ]; then +- int_bytes=$col +- else +- off_bytes=$col +- fi +- +- count=$($EXPR $count + 1) +-done +- +-/bin/rm -f a.out $tmp_src_filename +-if [ "$int_bytes" -eq 8 ]; then ++if [ "$(/usr/bin/uname -m)" = "amd64" ]; then + OS_BITS=64 +-else +- OS_BITS=32 +-fi +- +-if [ "$off_bytes" -eq 8 ]; then + OFF_BITS=64 + else ++ OS_BITS=32 + OFF_BITS=32 + fi + + ENABLE_STATIC_LIB=0 + ENABLE_SHARED_LIB=1 +-TARGET_PREFIX=$DESTDIR/usr +-TARGET_CONF_PATH=$DESTDIR/etc/fdfs ++TARGET_PREFIX=$DESTDIR$PREFIX ++TARGET_CONF_PATH=$DESTDIR$PREFIX/etc/fdfs + TARGET_INIT_PATH=$DESTDIR/etc/init.d + +-WITH_LINUX_SERVICE=1 ++WITH_LINUX_SERVICE=0 + + DEBUG_FLAG=1 + +@@ -74,7 +35,7 @@ if [ "$uname" = "Linux" ]; then + fi + CFLAGS="$CFLAGS" + elif [ "$uname" = "FreeBSD" ] || [ "$uname" = "Darwin" ]; then +- LIBS="$LIBS -L/usr/lib" ++ LIBS="$LIBS -L/usr/local/lib" + CFLAGS="$CFLAGS" + if [ "$uname" = "Darwin" ]; then + CFLAGS="$CFLAGS -DDARWIN" +@@ -180,26 +141,3 @@ perl -pi -e "s#\\\$\(LIBS\)#$LIBS#g" Mak + perl -pi -e "s#\\\$\(TARGET_PREFIX\)#$TARGET_PREFIX#g" Makefile + cd .. + +-if [ "$1" = "install" ]; then +- cd .. +- cp -f restart.sh $TARGET_PREFIX/bin +- cp -f stop.sh $TARGET_PREFIX/bin +- +- if [ "$uname" = "Linux" ]; then +- if [ "$WITH_LINUX_SERVICE" = "1" ]; then +- if [ ! -d /etc/fdfs ]; then +- mkdir -p /etc/fdfs +- cp -f conf/tracker.conf $TARGET_CONF_PATH/tracker.conf.sample +- cp -f conf/storage.conf $TARGET_CONF_PATH/storage.conf.sample +- cp -f conf/client.conf $TARGET_CONF_PATH/client.conf.sample +- cp -f conf/storage_ids.conf $TARGET_CONF_PATH/storage_ids.conf.sample +- fi +- mkdir -p $TARGET_INIT_PATH +- cp -f init.d/fdfs_trackerd $TARGET_INIT_PATH +- cp -f init.d/fdfs_storaged $TARGET_INIT_PATH +-# /sbin/chkconfig --add fdfs_trackerd +-# /sbin/chkconfig --add fdfs_storaged +- fi +- fi +-fi +- diff --git a/ftp/fastdfs/files/patch-storage-Makefile.in b/ftp/fastdfs/files/patch-storage-Makefile.in new file mode 100644 index 000000000000..6db80da6b740 --- /dev/null +++ b/ftp/fastdfs/files/patch-storage-Makefile.in @@ -0,0 +1,20 @@ +--- storage/Makefile.in.orig 2016-08-08 07:17:50 UTC ++++ storage/Makefile.in +@@ -1,7 +1,7 @@ + .SUFFIXES: .c .o + + COMPILE = $(CC) $(CFLAGS) +-INC_PATH = -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I/usr/include/fastcommon ++INC_PATH = -I. -Itrunk_mgr -I../common -I../tracker -I../client -Ifdht_client -I$(LOCALBASE)/include/fastcommon + LIB_PATH = $(LIBS) -lfastcommon + TARGET_PATH = $(TARGET_PREFIX)/bin + CONFIG_PATH = $(TARGET_CONF_PATH) +@@ -34,7 +34,7 @@ all: $(ALL_OBJS) $(ALL_PRGS) + install: + mkdir -p $(TARGET_PATH) + mkdir -p $(CONFIG_PATH) +- cp -f $(ALL_PRGS) $(TARGET_PATH) ++ install -s $(ALL_PRGS) $(TARGET_PATH) + if [ ! -f $(CONFIG_PATH)/storage.conf.sample ]; then cp -f ../conf/storage.conf $(CONFIG_PATH)/storage.conf.sample; fi + clean: + rm -f $(ALL_OBJS) $(ALL_PRGS) diff --git a/ftp/fastdfs/files/patch-tracker-Makefile.in b/ftp/fastdfs/files/patch-tracker-Makefile.in new file mode 100644 index 000000000000..1ee70efc45e5 --- /dev/null +++ b/ftp/fastdfs/files/patch-tracker-Makefile.in @@ -0,0 +1,21 @@ +--- tracker/Makefile.in.orig 2016-08-08 07:17:50 UTC ++++ tracker/Makefile.in +@@ -1,7 +1,7 @@ + .SUFFIXES: .c .o + + COMPILE = $(CC) $(CFLAGS) +-INC_PATH = -I../common -I/usr/include/fastcommon ++INC_PATH = -I../common -I$(LOCALBASE)/include/fastcommon + LIB_PATH = $(LIBS) -lfastcommon + TARGET_PATH = $(TARGET_PREFIX)/bin + CONFIG_PATH = $(TARGET_CONF_PATH) +@@ -26,7 +26,8 @@ all: $(ALL_OBJS) $(ALL_PRGS) + install: + mkdir -p $(TARGET_PATH) + mkdir -p $(CONFIG_PATH) +- cp -f $(ALL_PRGS) $(TARGET_PATH) ++ install -s $(ALL_PRGS) $(TARGET_PATH) + if [ ! -f $(CONFIG_PATH)/tracker.conf.sample ]; then cp -f ../conf/tracker.conf $(CONFIG_PATH)/tracker.conf.sample; fi ++ if [ ! -f $(CONFIG_PATH)/storage_ids.conf.sample ]; then cp -f ../conf/storage_ids.conf $(CONFIG_PATH)/storage_ids.conf.sample; fi + clean: + rm -f $(ALL_OBJS) $(ALL_PRGS) diff --git a/ftp/fastdfs/pkg-descr b/ftp/fastdfs/pkg-descr new file mode 100644 index 000000000000..52342c7f2604 --- /dev/null +++ b/ftp/fastdfs/pkg-descr @@ -0,0 +1,5 @@ +FastDFS is an open source high performance distributed file system (DFS). +It's major functions include: file storing, file syncing and +file accessing, and design for high capacity and load balance. + +WWW: https://github.com/happyfish100/fastdfs diff --git a/ftp/fastdfs/pkg-plist b/ftp/fastdfs/pkg-plist new file mode 100644 index 000000000000..e6589e3ad59f --- /dev/null +++ b/ftp/fastdfs/pkg-plist @@ -0,0 +1,36 @@ +bin/fdfs_append_file +bin/fdfs_appender_test +bin/fdfs_appender_test1 +bin/fdfs_crc32 +bin/fdfs_delete_file +bin/fdfs_download_file +bin/fdfs_file_info +bin/fdfs_monitor +bin/fdfs_storaged +bin/fdfs_test +bin/fdfs_test1 +bin/fdfs_trackerd +bin/fdfs_upload_appender +bin/fdfs_upload_file +@sample etc/fdfs/client.conf.sample +@sample etc/fdfs/storage.conf.sample +@sample etc/fdfs/storage_ids.conf.sample +@sample etc/fdfs/tracker.conf.sample +include/fastdfs/client_func.h +include/fastdfs/client_global.h +include/fastdfs/fdfs_client.h +include/fastdfs/fdfs_define.h +include/fastdfs/fdfs_global.h +include/fastdfs/fdfs_http_shared.h +include/fastdfs/fdfs_shared_func.h +include/fastdfs/mime_file_parser.h +include/fastdfs/storage_client.h +include/fastdfs/storage_client1.h +include/fastdfs/tracker_client.h +include/fastdfs/tracker_proto.h +include/fastdfs/tracker_types.h +include/fastdfs/trunk_shared.h +lib/libfdfsclient.so +@dir /var/db/fastdfs/storage +@dir /var/db/fastdfs/tracker +@dir /var/db/fastdfs diff --git a/ftp/php56-fastdfs/Makefile b/ftp/php56-fastdfs/Makefile new file mode 100644 index 000000000000..36010f780e58 --- /dev/null +++ b/ftp/php56-fastdfs/Makefile @@ -0,0 +1,28 @@ +# $FreeBSD$ + +PORTNAME= php56-fastdfs +PORTVERSION= 5.0.8 +CATEGORIES= ftp + +MAINTAINER= daniel@blodan.se +COMMENT= PHP 5.6 module for accessing a FastDFS cluster + +LICENSE= GPLv3 + +LIB_DEPENDS= libfastcommon.so:devel/libfastcommon \ + libfdfsclient.so:ftp/fastdfs + +USE_GITHUB= yes +GH_ACCOUNT= happyfish100 +GH_PROJECT= fastdfs +GH_TAGNAME= 87659981148a362812912b6d4752d281ac05f0b6 + +USES= php:ext +IGNORE_WITH_PHP= 55 70 +PHP_DEFAULT= 5.6 + +WRKSRC_SUBDIR= php_client + +PHP_MODNAME= fastdfs_client + +.include <bsd.port.mk> diff --git a/ftp/php56-fastdfs/distinfo b/ftp/php56-fastdfs/distinfo new file mode 100644 index 000000000000..52c7d7a25b56 --- /dev/null +++ b/ftp/php56-fastdfs/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1477046032 +SHA256 (happyfish100-fastdfs-5.0.8-87659981148a362812912b6d4752d281ac05f0b6_GH0.tar.gz) = c901415de55cad67fe31678091ce131ad4973bce19770f1a03b0be38ba02662d +SIZE (happyfish100-fastdfs-5.0.8-87659981148a362812912b6d4752d281ac05f0b6_GH0.tar.gz) = 335406 diff --git a/ftp/php56-fastdfs/files/patch-config.m4 b/ftp/php56-fastdfs/files/patch-config.m4 new file mode 100644 index 000000000000..2017cab49190 --- /dev/null +++ b/ftp/php56-fastdfs/files/patch-config.m4 @@ -0,0 +1,11 @@ +--- config.m4.orig 2016-08-08 07:17:50 UTC ++++ config.m4 +@@ -7,7 +7,7 @@ if test "$PHP_FASTDFS_CLIENT" != "no"; t + PHP_SUBST(FASTDFS_CLIENT_SHARED_LIBADD) + + if test -z "$ROOT"; then +- ROOT=/usr ++ ROOT=/usr/local + fi + + PHP_ADD_INCLUDE($ROOT/include/fastcommon) diff --git a/ftp/php56-fastdfs/pkg-descr b/ftp/php56-fastdfs/pkg-descr new file mode 100644 index 000000000000..d90caa5fc86a --- /dev/null +++ b/ftp/php56-fastdfs/pkg-descr @@ -0,0 +1,3 @@ +PHP module for accessing a FastDFS cluster + +WWW: https://github.com/happyfish100/fastdfs diff --git a/ftp/php56-fastdfs/pkg-message b/ftp/php56-fastdfs/pkg-message new file mode 100644 index 000000000000..993d158f9115 --- /dev/null +++ b/ftp/php56-fastdfs/pkg-message @@ -0,0 +1,15 @@ +Before you can start using this module; +- Make sure you have configured client.conf to point to your FastDFS cluster + and that you see the cluster with fdfs_monitor +- Add this to your php.ini file +================================================================== +fastdfs_client.base_path = /var/tmp +fastdfs_client.connect_timeout = 2 +fastdfs_client.network_timeout = 60 +fastdfs_client.log_level = info +fastdfs_client.log_filename = +fastdfs_client.http.anti_steal_secret_key = +fastdfs_client.tracker_group_count = 1 +fastdfs_client.tracker_group0 = /usr/local/etc/fdfs/client.conf +fastdfs_client.use_connection_pool = false +fastdfs_client.connection_pool_max_idle_time = 3600 diff --git a/ftp/php70-fastdfs/Makefile b/ftp/php70-fastdfs/Makefile new file mode 100644 index 000000000000..cea1b934524b --- /dev/null +++ b/ftp/php70-fastdfs/Makefile @@ -0,0 +1,28 @@ +# $FreeBSD$ + +PORTNAME= php70-fastdfs +PORTVERSION= 5.0.8 +CATEGORIES= ftp + +MAINTAINER= daniel@blodan.se +COMMENT= PHP 7 module for accessing a FastDFS cluster + +LICENSE= GPLv3 + +LIB_DEPENDS= libfastcommon.so:devel/libfastcommon \ + libfdfsclient.so:ftp/fastdfs + +USE_GITHUB= yes +GH_ACCOUNT= happyfish100 +GH_PROJECT= fastdfs +GH_TAGNAME= 87659981148a362812912b6d4752d281ac05f0b6 + +USES= php:ext +IGNORE_WITH_PHP= 55 56 +PHP_DEFAULT= 7.0 + +WRKSRC_SUBDIR= php_client + +PHP_MODNAME= fastdfs_client + +.include <bsd.port.mk> diff --git a/ftp/php70-fastdfs/distinfo b/ftp/php70-fastdfs/distinfo new file mode 100644 index 000000000000..3ba115879eaa --- /dev/null +++ b/ftp/php70-fastdfs/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1477046089 +SHA256 (happyfish100-fastdfs-5.0.8-87659981148a362812912b6d4752d281ac05f0b6_GH0.tar.gz) = c901415de55cad67fe31678091ce131ad4973bce19770f1a03b0be38ba02662d +SIZE (happyfish100-fastdfs-5.0.8-87659981148a362812912b6d4752d281ac05f0b6_GH0.tar.gz) = 335406 diff --git a/ftp/php70-fastdfs/files/patch-config.m4 b/ftp/php70-fastdfs/files/patch-config.m4 new file mode 100644 index 000000000000..2017cab49190 --- /dev/null +++ b/ftp/php70-fastdfs/files/patch-config.m4 @@ -0,0 +1,11 @@ +--- config.m4.orig 2016-08-08 07:17:50 UTC ++++ config.m4 +@@ -7,7 +7,7 @@ if test "$PHP_FASTDFS_CLIENT" != "no"; t + PHP_SUBST(FASTDFS_CLIENT_SHARED_LIBADD) + + if test -z "$ROOT"; then +- ROOT=/usr ++ ROOT=/usr/local + fi + + PHP_ADD_INCLUDE($ROOT/include/fastcommon) diff --git a/ftp/php70-fastdfs/pkg-descr b/ftp/php70-fastdfs/pkg-descr new file mode 100644 index 000000000000..d90caa5fc86a --- /dev/null +++ b/ftp/php70-fastdfs/pkg-descr @@ -0,0 +1,3 @@ +PHP module for accessing a FastDFS cluster + +WWW: https://github.com/happyfish100/fastdfs diff --git a/ftp/php70-fastdfs/pkg-message b/ftp/php70-fastdfs/pkg-message new file mode 100644 index 000000000000..993d158f9115 --- /dev/null +++ b/ftp/php70-fastdfs/pkg-message @@ -0,0 +1,15 @@ +Before you can start using this module; +- Make sure you have configured client.conf to point to your FastDFS cluster + and that you see the cluster with fdfs_monitor +- Add this to your php.ini file +================================================================== +fastdfs_client.base_path = /var/tmp +fastdfs_client.connect_timeout = 2 +fastdfs_client.network_timeout = 60 +fastdfs_client.log_level = info +fastdfs_client.log_filename = +fastdfs_client.http.anti_steal_secret_key = +fastdfs_client.tracker_group_count = 1 +fastdfs_client.tracker_group0 = /usr/local/etc/fdfs/client.conf +fastdfs_client.use_connection_pool = false +fastdfs_client.connection_pool_max_idle_time = 3600 |