- Reset maintainership to ports@.

- Support staging.
- Modernise the Makefile:
  * Switch from USE_BZIP2=yes to USES=tar:bzip2
  * Use <OPTION>_RUN_DEPENDS instead of including bsd.port.options.mk and
    doing checks ourselves.
  * Drop the pkg-deinstall and pkg-install scripts. Instead, just rely on
    the ports infrastructure with GROUPS/USERS to create the "interch"
    group/user and use the plist to create /var/run/interchange and change
    the ownership in %D/interchange.
- Add some missing entries to the plist.

Based on a patch sent by the former maintainer.

PR:		191464
Submitted by:	loader@freebsdmall.com (based on)
This commit is contained in:
Raphael Kubo da Costa 2014-07-06 20:10:12 +00:00
parent a7d222b6fe
commit 74c8350522
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=361002
5 changed files with 106 additions and 160 deletions

View file

@ -3,11 +3,11 @@
PORTNAME= interchange
PORTVERSION= 5.6.1
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= www perl5
MASTER_SITES= http://ftp.icdevgroup.org/interchange/5.6/tar/
MAINTAINER= loader@freebsdmall.com
MAINTAINER= ports@FreeBSD.org
COMMENT= RedHat's database-enabled e-commerce server
RUN_DEPENDS= p5-Safe-Hole>=0.10:${PORTSDIR}/security/p5-Safe-Hole \
@ -17,102 +17,38 @@ RUN_DEPENDS= p5-Safe-Hole>=0.10:${PORTSDIR}/security/p5-Safe-Hole \
p5-Digest-SHA1>=2.11:${PORTSDIR}/security/p5-Digest-SHA1
BUILD_DEPENDS:= ${RUN_DEPENDS}
USES= perl5
USE_PERL5= configure
USE_BZIP2= yes
USES= perl5 tar:bzip2
USE_PERL5= configure fixpacklist
OPTIONS_DEFINE= MYSQL PGSQL
OPTIONS_DEFINE= MYSQL PGSQL
OPTIONS_DEFAULT= MYSQL
MYSQL_RUN_DEPENDS= p5-DBD-mysql>=0:${PORTSDIR}/databases/p5-DBD-mysql
PGSQL_RUN_DEPENDS= p5-DBD-Pg>=0:${PORTSDIR}/databases/p5-DBD-Pg
NO_STAGE= yes
.include <bsd.port.options.mk>
GROUPS= interch
USERS= interch
USE_RC_SUBR= interchange
.if ${PORT_OPTIONS:MMYSQL}
RUN_DEPENDS+= p5-DBD-mysql>=0:${PORTSDIR}/databases/p5-DBD-mysql
.endif
INTERCH_PREFIX= ${PREFIX}/interchange
.if ${PORT_OPTIONS:MPGSQL}
RUN_DEPENDS+= p5-DBD-Pg>=0:${PORTSDIR}/databases/p5-DBD-Pg
.endif
ARCH_PERL= ${SITE_PERL}/${PERL_ARCH}
MAN1= compile_link.1 \
config_prog.1 \
configdump.1 \
crontab.1 \
expire.1 \
expireall.1 \
findtags.1 \
ic_mod_perl.1 \
interchange.1 \
localize.1 \
makecat.1 \
offline.1 \
restart.1 \
update.1
MAN3= Vend::Accounting::SQL_Ledger.3 \
Vend::Cart.3 \
Vend::CounterFile.3 \
Vend::Form.3 \
Vend::Interpolate.3 \
Vend::Options::Matrix.3 \
Vend::Options::Old48.3 \
Vend::Options::Simple.3 \
Vend::Parser.3 \
Vend::Payment::AuthorizeNet.3 \
Vend::Payment::BoA.3 \
Vend::Payment::BusinessOnlinePayment.3 \
Vend::Payment::CyberCash.3 \
Vend::Payment::ECHO.3 \
Vend::Payment::EFSNet.3 \
Vend::Payment::Ezic.3 \
Vend::Payment::Getitcard.3 \
Vend::Payment::ICS.3 \
Vend::Payment::Linkpoint.3 \
Vend::Payment::MCVE.3 \
Vend::Payment::NetBilling.3 \
Vend::Payment::Protx2.3 \
Vend::Payment::PRI.3 \
Vend::Payment::PSiGate.3 \
Vend::Payment::Sage.3 \
Vend::Payment::Signio.3 \
Vend::Payment::Skipjack.3 \
Vend::Payment::TCLink.3 \
Vend::Payment::TestPayment.3 \
Vend::Payment::iTransact.3 \
Vend::SOAP::Transport.3 \
Vend::SQL_Parser.3 \
Vend::Ship.3 \
Vend::Ship::Postal.3 \
Vend::Ship::QueryUPS.3 \
Vend::Table::Editor.3 \
Vend::UserControl.3 \
Vend::UserDB.3
MAKE_ARGS+= NOCPANINSTALL=1 \
INSTALLARCHLIB=${PREFIX}/interchange/ \
INSTALLPRIVLIB=${PREFIX}/interchange/lib/ \
INSTALLMAN1DIR=${PREFIX}/man/man1
CONFIGURE_ARGS+= force=1
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:
@PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} PRE-INSTALL
CONFIGURE_ARGS= INTERCHANGE_USER=interch \
force=1
MAKE_ARGS= INSTALLARCHLIB=${INTERCH_PREFIX} \
INSTALLPRIVLIB=${INTERCH_PREFIX}/lib \
INSTALLMAN1DIR=${PREFIX}/man/man1 \
NOCPANINSTALL=1
pre-install:
@${MKDIR} ${PREFIX}/interchange
# This directory must exist before the installation happens, otherwise _uid (a
# file) will be copied to a file called ${STAGEDIR}${INTERCH_PREFIX}.
${MKDIR} ${STAGEDIR}${INTERCH_PREFIX}
post-install:
.for i in compile_link config_prog configdump 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
@PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/pkg-install ${PKGNAME} POST-INSTALL
# This directory has to be created here for check-plist to pass, otherwise it
# complains the @dirrmtry /var/run/interchange entry does not have a matching
# directory in the stage tree.
# Its ownership and mode are properly set in the @exec call when the package is
# installed.
${MKDIR} ${STAGEDIR}/var/run/interchange
.include <bsd.port.mk>

View file

@ -0,0 +1,22 @@
From: René Hertell <interchange@hertell.com>
Date: Wed, 24 Jun 2009 15:28:50 +0000 (+0300)
Subject: Fixed Makefile.PL to honour the DESTDIR-variable when doing eg. "make DESTDIR=/tmp...
X-Git-Tag: REL_5_7_2~51
X-Git-Url: http://git.icdevgroup.org/?p=interchange.git;a=commitdiff_plain;h=837be0427f40fd8f2d34fc3d6bbdc4d84aeb4ad3
Fixed Makefile.PL to honour the DESTDIR-variable when doing eg. "make DESTDIR=/tmp/pacage install"
---
diff --git a/Makefile.PL b/Makefile.PL
index ec81b8c..b26c529 100644
--- Makefile.PL
+++ Makefile.PL
@@ -739,7 +739,7 @@ sub MY::install {
next unless $MV::Default{$_};
push @args, "$_=$MV::Default{$_}";
}
- push @args, 'final=$(INSTALLARCHLIB)';
+ push @args, 'final=$(DESTDIR)$(INSTALLARCHLIB)';
my $argstring = join " ", @args;

View file

@ -1,22 +0,0 @@
#!/bin/sh
#
# $FreeBSD$
#
if [ "$2" != "POST-DEINSTALL" ]; then
exit 0
fi
USER=interch
# Don't delete it, there may be ${USER} owned files around.
pw usershow "${USER}" >/dev/null 2>&1 \
&& echo -e "\n\
* To clean up the Interchange from your filesystem,
* run 'rm -fr ${PKG_PREFIX}/interchange'
* and 'rm -fr /var/run/interchange'
*
* To delete the user '${USER}' permanently,
* use 'pw userdel ${USER}'.\n"
exit 0

View file

@ -1,47 +0,0 @@
#!/bin/sh
#
# $FreeBSD$
#
USER=interch
GROUP=${USER}
UID=95
GID=${UID}
case $2 in
PRE-INSTALL)
USER=interch
GROUP=${USER}
UID=95
GID=${UID}
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
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)
/usr/bin/install -d -m 755 -o ${USER} -g ${GROUP} /var/run/interchange
/usr/sbin/chown -R ${USER}:${GROUP} ${PKG_PREFIX}/interchange
;;
esac

View file

@ -12,6 +12,9 @@ bin/makecat
bin/offline
bin/restart
bin/update
@owner interch
@group interch
interchange/_allow_threads
interchange/_session_storable
interchange/_uid
interchange/catalog_after.cfg
@ -349,7 +352,7 @@ interchange/code/Widget/uploadhelper.widget
interchange/code/Widget/value.widget
interchange/code/Widget/yesno.widget
interchange/code/Widget/ynzero.widget
@unexec if [ `cat %D/interchange/error.log | wc -l` -le 1 ]; then rm -f %D/interchange/error.log; fi
interchange/error.log
interchange/etc/.empty
interchange/etc/jobs/db/export
interchange/etc/jobs/maintenance/logrotate
@ -1636,6 +1639,8 @@ interchange/standard/variables/LINE_MENU
interchange/standard/variables/PAGE_INIT
interchange/standard/variables/THEME_CSS
interchange/subdomains.cfg
@owner root
@group wheel
%%SITE_PERL%%/Vend/Accounting.pm
%%SITE_PERL%%/Vend/Accounting/SQL_Ledger.pm
%%SITE_PERL%%/Vend/Cart.pm
@ -1737,6 +1742,58 @@ interchange/subdomains.cfg
@dirrm %%SITE_PERL%%/auto/Vend/SOAP
@dirrm %%SITE_PERL%%/auto/Vend
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Interchange
man/man1/compile_link.1.gz
man/man1/config_prog.1.gz
man/man1/configdump.1.gz
man/man1/crontab.1.gz
man/man1/expire.1.gz
man/man1/expireall.1.gz
man/man1/findtags.1.gz
man/man1/ic_mod_perl.1.gz
man/man1/interchange.1.gz
man/man1/localize.1.gz
man/man1/makecat.1.gz
man/man1/offline.1.gz
man/man1/restart.1.gz
man/man1/update.1.gz
%%PERL5_MAN3%%/Vend::Accounting::SQL_Ledger.3.gz
%%PERL5_MAN3%%/Vend::Cart.3.gz
%%PERL5_MAN3%%/Vend::CounterFile.3.gz
%%PERL5_MAN3%%/Vend::Form.3.gz
%%PERL5_MAN3%%/Vend::Interpolate.3.gz
%%PERL5_MAN3%%/Vend::Options::Matrix.3.gz
%%PERL5_MAN3%%/Vend::Options::Old48.3.gz
%%PERL5_MAN3%%/Vend::Options::Simple.3.gz
%%PERL5_MAN3%%/Vend::Parser.3.gz
%%PERL5_MAN3%%/Vend::Payment::AuthorizeNet.3.gz
%%PERL5_MAN3%%/Vend::Payment::BoA.3.gz
%%PERL5_MAN3%%/Vend::Payment::BusinessOnlinePayment.3.gz
%%PERL5_MAN3%%/Vend::Payment::CyberCash.3.gz
%%PERL5_MAN3%%/Vend::Payment::ECHO.3.gz
%%PERL5_MAN3%%/Vend::Payment::EFSNet.3.gz
%%PERL5_MAN3%%/Vend::Payment::Ezic.3.gz
%%PERL5_MAN3%%/Vend::Payment::Getitcard.3.gz
%%PERL5_MAN3%%/Vend::Payment::ICS.3.gz
%%PERL5_MAN3%%/Vend::Payment::Linkpoint.3.gz
%%PERL5_MAN3%%/Vend::Payment::MCVE.3.gz
%%PERL5_MAN3%%/Vend::Payment::NetBilling.3.gz
%%PERL5_MAN3%%/Vend::Payment::PRI.3.gz
%%PERL5_MAN3%%/Vend::Payment::PSiGate.3.gz
%%PERL5_MAN3%%/Vend::Payment::Protx2.3.gz
%%PERL5_MAN3%%/Vend::Payment::Sage.3.gz
%%PERL5_MAN3%%/Vend::Payment::Signio.3.gz
%%PERL5_MAN3%%/Vend::Payment::Skipjack.3.gz
%%PERL5_MAN3%%/Vend::Payment::TCLink.3.gz
%%PERL5_MAN3%%/Vend::Payment::TestPayment.3.gz
%%PERL5_MAN3%%/Vend::Payment::iTransact.3.gz
%%PERL5_MAN3%%/Vend::SOAP::Transport.3.gz
%%PERL5_MAN3%%/Vend::SQL_Parser.3.gz
%%PERL5_MAN3%%/Vend::Ship.3.gz
%%PERL5_MAN3%%/Vend::Ship::Postal.3.gz
%%PERL5_MAN3%%/Vend::Ship::QueryUPS.3.gz
%%PERL5_MAN3%%/Vend::Table::Editor.3.gz
%%PERL5_MAN3%%/Vend::UserControl.3.gz
%%PERL5_MAN3%%/Vend::UserDB.3.gz
@dirrm interchange/standard/variables
@dirrm interchange/standard/upload
@dirrm interchange/standard/templates/regions
@ -1832,5 +1889,5 @@ interchange/subdomains.cfg
@dirrmtry interchange/src
@dirrmtry interchange/etc
@dirrmtry interchange
@cwd /
@exec install -d -o interch -g interch -m 770 /var/run/interchange
@dirrmtry /var/run/interchange