- Update to 5.2.0

- OPTIONSfy
- Pass maintainership to submitter

PR:		ports/86204
Submitted by:	loader <loader@freebsdmall.com>
This commit is contained in:
Sergey Matveychuk 2005-09-21 12:19:06 +00:00
parent e1799dbe43
commit 9311a87bb9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=143283
8 changed files with 1492 additions and 980 deletions

View file

@ -6,71 +6,105 @@
#
PORTNAME= interchange
PORTVERSION= 4.8.7
PORTVERSION= 5.2.0
CATEGORIES= www
MASTER_SITES= http://ftp.icdevgroup.org/interchange/4.8/tar/
MASTER_SITES= http://ftp.icdevgroup.org/interchange/5.2/tar/
MAINTAINER= ports@FreeBSD.org
MAINTAINER= loader@freebsdmall.com
COMMENT= RedHat's database-enabled e-commerce server
BUILD_DEPENDS= ${SITE_PERL}/SQL/Statement.pm:${PORTSDIR}/databases/p5-SQL-Statement
RUN_DEPENDS= ${SITE_PERL}/SQL/Statement.pm:${PORTSDIR}/databases/p5-SQL-Statement \
${ARCH_PERL}/Storable.pm:${PORTSDIR}/devel/p5-Storable \
${ARCH_PERL}/Safe/Hole.pm:${PORTSDIR}/security/p5-Safe-Hole \
${ARCH_PERL}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5 \
${ARCH_PERL}/MIME/Base64.pm:${PORTSDIR}/mail/p5-MIME-Tools \
${SITE_PERL}/LWP/Simple.pm:${PORTSDIR}/www/p5-libwww \
${SITE_PERL}/URI/URL.pm:${PORTSDIR}/net/p5-URI \
${SITE_PERL}/Term/ReadLine/Perl.pm:${PORTSDIR}/devel/p5-ReadLine-Perl \
${ARCH_PERL}/Term/ReadKey.pm:${PORTSDIR}/devel/p5-Term-ReadKey
BUILD_DEPENDS= ${ARCH_PERL}/Safe/Hole.pm:${PORTSDIR}/security/p5-Safe-Hole \
${SITE_PERL}/URI/URL.pm:${PORTSDIR}/net/p5-URI \
${SITE_PERL}/Business/UPS.pm:${PORTSDIR}/misc/p5-Business-UPS \
${SITE_PERL}/LWP/Simple.pm:${PORTSDIR}/www/p5-libwww
USE_PERL5= yes
PERL_CONFIGURE= yes
OPTIONS= MYSQL "Add MySQL support" off \
PGSQL "Add PostgreSQL support" off
.include <bsd.port.pre.mk>
.if defined(WITH_MYSQL)
BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql
USE_SQLDB= yes
.endif
.if defined(WITH_PGSQL)
BUILD_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/Pg.pm:${PORTSDIR}/databases/p5-DBD-Pg
USE_SQLDB= yes
.endif
ARCH_PERL= ${SITE_PERL}/${PERL_ARCH}
MAN1= configdump.1 config_prog.1 expire.1 localize.1 \
makecat.1 dump.1 compile_link.1 offline.1 update.1 \
restart.1 expireall.1 interchange.1
MAN7= iccattut.7 icdatabase.7 icadvanced.7 icconfig.7 \
icfoundation.7 icfaq.7 ic_howto_cvs.7 icupgrade.7 \
ic_ecommerce.7 ictags.7 ictemplates.7
restart.1 expireall.1 interchange.1 findtags.1 \
ic_mod_perl.1
MAN3= Vend::UserDB.3 \
Vend::SQL_Parser.3 \
Tie::ShadowHash.3 \
Vend::Ship::Postal.3 \
Vend::Parser.3 \
Vend::Payment::CyberCash.3 \
Vend::CounterFile.3 \
Vend::Table::Editor.3 \
Vend::Payment::TCLink.3 \
Vend::Payment::TestPayment.3 \
Vend::UserControl.3 \
Vend::SOAP::Transport.3 \
Vend::Payment::Signio.3 \
Vend::Payment::iTransact.3 \
Vend::Payment::WellsFargo.3 \
Vend::Options::Matrix.3 \
Vend::Payment::ECHO.3 \
Vend::Payment::Linkpoint.3 \
Vend::Ship.3 \
Vend::Accounting::SQL_Ledger.3 \
Vend::Payment::MCVE.3 \
Vend::Interpolate.3 \
Vend::Payment::PSiGate.3 \
IniConf.3 \
Business::Fedex.3 \
Vend::Payment::AuthorizeNet.3 \
Vend::Payment::EFSNet.3 \
Vend::Payment::BoA.3 \
Vend::Form.3 \
Vend::Payment::Skipjack.3 \
Vend::Options::Simple.3 \
Vend::Options::Old48.3 \
Vend::Ship::QueryUPS.3
USE_REINPLACE= yes
MAKE_ARGS+= NOCPANINSTALL=1 \
INSTALLARCHLIB=${PREFIX}/interchange \
INSTALLARCHLIB=${PREFIX}/interchange/ \
INSTALLPRIVLIB=${PREFIX}/interchange/lib/ \
INSTALLMAN1DIR=${PREFIX}/man/man1 \
INSTALLMAN3DIR=${PREFIX}/man/man7
INSTALLMAN1DIR=${PREFIX}/man/man1
CONFIGURE_ARGS+= force=1
.if defined(PACKAGE_BUILDING)
IGNORE="needs a tty at the configure stage"
.endif
post-patch:
@${REINPLACE_CMD} -e "s:You are now ready to cd to \$$realdir:You are now ready to cd to ${PREFIX}:g" ${WRKSRC}/Makefile.PL
pre-configure:
.if !defined(USE_THIS_PERL)
@[ ! "${PERL_VER}" \< "5.6.1" ] || ( ${ECHO_CMD} -e "You use perl ${PERL_VER}, interchange should be used with 5.6.1 or better,\njust install the newer perl from ports and run 'use.perl port', this will\nmake the new perl the default perl. If you already have some perl modules\ninstalled for your old perl, you have to reinstall them for the new perl.\n\nIf you absolutely want to try to run interchange with perl ${PERL_VER},\nyou have to add '-DUSE_THIS_PERL' as an option for 'make'.\n" ; exit 1 )
.endif
.if !defined(CHECK_FOR_IC_USER)
@${ECHO_CMD} -e "This port needs a specific user account ('interch') at configure time.\n\nIf it is ok for you to add a new user at configure time of this port\nadd '-DCHECK_FOR_IC_USER' as an option for 'make'.\n"
@exit 1
.endif
@PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} PRE-INSTALL
pre-install:
@${MKDIR} ${PREFIX}/interchange
post-install:
@${INSTALL_SCRIPT} ${FILESDIR}/interchange.sh \
${PREFIX}/etc/rc.d/interchange.sh.sample
@${REINPLACE_CMD} -i "" -e 's:%%PREFIX%%:${PREFIX}:' \
${PREFIX}/etc/rc.d/interchange.sh.sample
.for i in compile_link config_prog configdump dump expire expireall interchange localize makecat offline restart update
@${REINPLACE_CMD} -i "" -e "s:${PREFIX}:${PREFIX}/interchange:g; s:${PREFIX}/interchange/bin: ${PREFIX}/bin:g" ${PREFIX}/bin/${i}
.endfor
@${CHOWN} -R interch:interch ${PREFIX}/interchange/src
@${CHOWN} -R interch:interch ${PREFIX}/interchange
.include <bsd.port.mk>
.if ${PERL_LEVEL} < 500600
IGNORE= Needs perl 5.6.1 or higher, install lang/perl5.8 and try again
.endif
.include <bsd.port.post.mk>

View file

@ -1,2 +1,2 @@
MD5 (interchange-4.8.7.tar.gz) = cfcdd12875125bcdd7e3c05b32dff0e3
SIZE (interchange-4.8.7.tar.gz) = 1898969
MD5 (interchange-5.2.0.tar.gz) = 25780415aaaf596fe56a0c2b34347ca9
SIZE (interchange-5.2.0.tar.gz) = 2007576

View file

@ -1,35 +1,49 @@
#!/bin/sh
#
# $FreeBSD$
#
RUNDIR=/var/run/interchange
LOGDIR=/var/log/interchange
ICUSER=$(cat %%PREFIX%%/interchange/_uid)
PIDFILE=${RUNDIR}/interchange.pid
SOCKFILE=${RUNDIR}/interchange.sock
# PROVIDE: interchange
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: FreeBSD shutdown
OPTS="SocketFile=${SOCKFILE} IPCsocket=${SOCKFILE}.ipc PIDfile=${PIDFILE}"
OPTS="${OPTS} --pidfile=${PIDFILE} --log=${LOGDIR}/error.log --rundir=${RUNDIR}"
#
# Add the following lines to /etc/rc.conf to enable Interchange:
# interchange_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable Interchange
# interchange_config (str): Default config file:
# /usr/local/interchange/interchange.cfg
# interchange_args (str): Custom additional arguments to be passed
# to interchange (default empty).
#
case "$1" in
start)
[ -d ${RUNDIR} ] || \
(mkdir ${RUNDIR} && chown ${ICUSER}:${ICUSER} ${RUNDIR})
[ -d ${LOGDIR} ] || \
(mkdir ${LOGDIR} && chown ${ICUSER}:${ICUSER} ${LOGDIR})
if [ -x %%PREFIX%%/bin/interchange ]; then
su -m ${ICUSER} \
-c "%%PREFIX%%/bin/interchange ${OPTS} >/dev/null" && \
echo -n ' interchange'
fi
;;
stop)
if [ -r ${PIDFILE} ]; then
kill $(cat ${PIDFILE}) && \
echo -n ' interchange'
fi
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
;;
esac
. /etc/rc.subr
name="interchange"
rcvar=`set_rcvar`
interchange_enable=${interchange_enable:-"NO"}
interchange_config=${interchange_config:-"/usr/local/interchange/interchange.cfg"}
interchange_args=${interchange_args:-""}
load_rc_config $name
interchange_user="interch"
pidfile="/var/run/interchange/interchange.pid"
command="/usr/local/bin/interchange"
command_interpreter="/usr/local/bin/perl"
command_args="--config=${interchange_config} ${interchange_args}"
stop_cmd="interchange_cmd --stop"
restart_cmd="interchange_cmd --restart"
reload_cmd="interchange_cmd --restart"
interchange_cmd()
{
su -l ${interchange_user} -c "exec env PIDfile=${pidfile} ${command} ${command_args} $1"
}
run_rc_command "$1"

View file

@ -1,31 +0,0 @@
--- Makefile.PL_orig Sun Aug 11 13:52:36 2002
+++ Makefile.PL Sun Aug 11 13:57:36 2002
@@ -789,17 +796,17 @@
WriteMakefile(
NAME => "Interchange",
MAN3PODS => {
- 'pod/ic_ecommerce.pod' => 'blib/man3/ic_ecommerce.8',
- 'pod/ic_howto_cvs.pod' => 'blib/man3/ic_howto_cvs.8',
- 'pod/icadvanced.pod' => 'blib/man3/icadvanced.8',
- 'pod/iccattut.pod' => 'blib/man3/iccattut.8',
- 'pod/icconfig.pod' => 'blib/man3/icconfig.8',
- 'pod/icdatabase.pod' => 'blib/man3/icdatabase.8',
- 'pod/icfaq.pod' => 'blib/man3/icfaq.8',
- 'pod/icfoundation.pod' => 'blib/man3/icfoundation.8',
- 'pod/ictags.pod' => 'blib/man3/ictags.8',
- 'pod/ictemplates.pod' => 'blib/man3/ictemplates.8',
- 'pod/icupgrade.pod' => 'blib/man3/icupgrade.8',
+ 'pod/ic_ecommerce.pod' => 'blib/man3/ic_ecommerce.7',
+ 'pod/ic_howto_cvs.pod' => 'blib/man3/ic_howto_cvs.7',
+ 'pod/icadvanced.pod' => 'blib/man3/icadvanced.7',
+ 'pod/iccattut.pod' => 'blib/man3/iccattut.7',
+ 'pod/icconfig.pod' => 'blib/man3/icconfig.7',
+ 'pod/icdatabase.pod' => 'blib/man3/icdatabase.7',
+ 'pod/icfaq.pod' => 'blib/man3/icfaq.7',
+ 'pod/icfoundation.pod' => 'blib/man3/icfoundation.7',
+ 'pod/ictags.pod' => 'blib/man3/ictags.7',
+ 'pod/ictemplates.pod' => 'blib/man3/ictemplates.7',
+ 'pod/icupgrade.pod' => 'blib/man3/icupgrade.7',
},
DISTNAME => "interchange",
clean => {

View file

@ -1,13 +0,0 @@
--- dist/src/tlink.c.orig Thu Jul 4 03:03:50 2002
+++ dist/src/tlink.c Thu Jul 4 03:04:04 2002
@@ -36,9 +36,9 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
+#include <netinet/in.h>
#include <arpa/inet.h>
#include <arpa/telnet.h>
-#include <netinet/in.h>
#include <netdb.h>
#include <sys/un.h>
#include <unistd.h>

View file

@ -11,6 +11,8 @@ USER=interch
# Don't delete it, there may be ${USER} owned files around.
pw usershow "${USER}" >/dev/null 2>&1 \
&& echo -e "*\n* To delete the user '${USER}' use 'pw userdel ${USER}'.\n*"
&& echo -e "*\n\
* To clean up the Interchange from your filesystem, run 'rm -fr ${PKG_PREFIX}/interchange.' \n\
* To delete the user '${USER}' permanently, use 'pw userdel ${USER}'.\n*"
exit 0

View file

@ -3,26 +3,44 @@
# $FreeBSD$
#
# $1 = package name
if [ "$2" != "PRE-INSTALL" ]; then
exit 0
fi
USER=interch
GROUP=${USER}
UID=95
GID=${UID}
pw groupshow ${GROUP} >/dev/null 2>&1 \
|| (pw groupadd ${GROUP} -g ${GID} \
|| (echo "Adding group '${GROUP}' failed!"; exit 1) \
&& echo "Added group '${GROUP}'.")
case $2 in
PRE-INSTALL)
USER=interch
GROUP=${USER}
UID=95
GID=${UID}
pw usershow ${USER} >/dev/null 2>&1 \
|| (pw useradd ${USER} -h - -u ${UID} -g ${GROUP} \
-c "Interchange user" -d "${PKG_PREFIX}/interchange" \
-s "/sbin/nologin" \
|| (echo "Adding user '${USER}' failed!"; exit 1) \
&& echo "Added user '${USER}'.")
if pw group show "${GROUP}" 2>/dev/null; then
echo "You already have a group \"${GROUP}\", so I will use it."
else
if pw groupadd ${GROUP} -g ${GID}; then
echo "Added group \"${GROUP}\"."
else
echo "Adding group \"${GROUP}\" failed..."
exit 1
fi
fi
exit 0
if pw user show "${USER}" 2>/dev/null; then
echo "You already have a user \"${USER}\", so I will use it."
else
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
-d "${PKG_PREFIX}/interchange" \
-s /bin/sh -c "Interchange user"
then
echo "Added user \"${USER}\"."
else
echo "Adding user \"${USER}\" failed..."
exit 1
fi
fi
;;
POST-INSTALL)
chown -R ${USER}:${GROUP} ${PKG_PREFIX}/interchange
;;
esac

File diff suppressed because it is too large Load diff