Skip to content

Commit

Permalink
Stage support
Browse files Browse the repository at this point in the history
I merged the 2 plists to prevent orphans to be reported during make check-plist
of misc/amanda-server,  as it installs into stage some files already provided by
misc/amanda-client

Bump PORTREVISION as the install/deinstall scripts were revised

PR:		ports/193196
  • Loading branch information
ant1 committed Aug 31, 2014
1 parent 78ab4b0 commit 6cfd62d
Show file tree
Hide file tree
Showing 5 changed files with 416 additions and 354 deletions.
4 changes: 0 additions & 4 deletions misc/amanda-client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ PORTREVISION= 0
COMMENT= The Advanced Maryland Automatic Network Disk Archiver (client)

MASTERDIR= ${.CURDIR}/../amanda-server
PKGINSTALL= mustnotexist

PLIST= ${PKGDIR}/pkg-plist.client

CLIENT_ONLY= yes

NO_STAGE= yes
.include "${MASTERDIR}/Makefile"
76 changes: 16 additions & 60 deletions misc/amanda-server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

PORTNAME= amanda
PORTVERSION= 3.3.2
PORTREVISION= 1
PORTREVISION= 2
PORTEPOCH= 1
CATEGORIES= misc
MASTER_SITES= SF/amanda/amanda%20-%20stable/${PORTVERSION}
PKGNAMESUFFIX?= -server

MAINTAINER= [email protected]
MAINTAINER= [email protected]
COMMENT?= The Advanced Maryland Automatic Network Disk Archiver (server)

RUN_DEPENDS= perl-amanda:${PORTSDIR}/misc/amanda-perl-wrapper
Expand All @@ -19,7 +19,7 @@ WRKSRC= ${WRKDIR}/amanda-${PORTVERSION}
SLAVEDIRS= misc/amanda-client

GNU_CONFIGURE= yes
USES= gmake pkgconfig perl5
USES= charsetfix gmake pkgconfig perl5
USE_GNOME= glib20
USE_OPENSSL= yes
USE_LDCONFIG= yes
Expand All @@ -31,7 +31,8 @@ CONFIGURE_ARGS= --libexecdir=${PREFIX}/libexec/amanda \
--disable-glibtest \
--with-user=${USERS} --with-group=${AMANDA_GROUP} \
--with-bsdtcp-security --with-bsdudp-security \
--with-ssh-security
--with-ssh-security \
--disable-installperms
CONFIGURE_ENV= PERL=${LOCALBASE}/bin/perl-amanda
PKG_MESSAGE= ${WRKDIR}/pkg-message
SUB_FILES= pkg-message
Expand All @@ -53,7 +54,7 @@ GROUPS?= operator amanda

AMANDA_GNUTAR_LISTDIR?= ${PREFIX}/var/amanda/gnutar-lists
AMANDA_DATES?= ${PREFIX}/var/amanda/amandates
PLIST_SUB= SHLIBVER=${PORTVERSION} AMANDA_DATES=${AMANDA_DATES}
PLIST_SUB= SHLIBVER=${PORTVERSION} AMANDA_GROUP=${AMANDA_GROUP}

# amanda-server/amanda-client common part
.if defined (AMANDA_SERVER)
Expand All @@ -68,7 +69,6 @@ SAMBA_DESC= Enable the use of smbclient
S3_DESC= Enable Amazon S3 device support
.endif

NO_STAGE= yes
.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MGNUTAR}
Expand All @@ -81,6 +81,9 @@ RUN_DEPENDS+= gtar:${PORTSDIR}/archivers/gtar
# amanda-server part
.if !defined(CLIENT_ONLY)

PKGINSTALL= ${WRKDIR}/pkg-install
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
PLIST_SUB+= CLIENT_ONLY="@comment " SERVER_ONLY=""
SUB_FILES+= pkg-install pkg-deinstall
SUB_LIST+= PERL=${PERL} SITE_PERL_REL=${SITE_PERL_REL}

Expand All @@ -104,30 +107,9 @@ RUN_DEPENDS+= ${LOCALBASE}/lib/amanda/libamandad-${PORTVERSION}.so:${PORTSDIR}/m

CONFIGURE_ARGS+=--without-client

MAN5= disklist.5 \
tapelist.5
MAN7= amanda-changers.7 \
amanda-compatibility.7 \
amanda-devices.7 \
amanda-interactivity.7 \
amanda-taperscan.7
MAN8= amaddclient.8 amadmin.8 amaespipe.8 amcheck.8 \
amcheckdb.8 amcheckdump.8 \
amcleanup.8 \
amcleanupdisk.8 \
amcrypt.8 amcryptsimple.8 amcrypt-ossl-asym.8 amcrypt-ossl.8 \
amdevcheck.8 \
amdump.8 amfetchdump.8 amflush.8 amgetconf.8 amgpgcrypt.8 \
amlabel.8 \
amoverview.8 amreport.8 amrestore.8 amrmtape.8 \
amserverconfig.8 amstatus.8 \
amtape.8 amtoc.8 amtapetype.8 \
amvault.8

.if ${PORT_OPTIONS:MPLOT}
BUILD_DEPENDS+= gnuplot:${PORTSDIR}/math/gnuplot
RUN_DEPENDS+= gnuplot:${PORTSDIR}/math/gnuplot
MAN8+= amplot.8
PLIST_SUB+= PLOT=''
CONFIGURE_ARGS+= --with-gnuplot=${LOCALBASE}/bin/gnuplot
.else
Expand All @@ -152,13 +134,16 @@ CONFIGURE_ARGS+= --disable-s3-device
PLIST_SUB+= S3DEVICE='@comment '
.endif

post-install:
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}

# amanda-client part
.else

PKGINSTALL= ${WRKDIR}/pkg-install.client
PKGDEINSTALL= ${PKGINSTALL}
PLIST_SUB+= CLIENT_ONLY="" SERVER_ONLY="@comment "
SUB_FILES+= pkg-install.client
SUB_LIST+= AMANDA_DATES=${AMANDA_DATES} AMANDA_GNUTAR_LISTDIR=${AMANDA_GNUTAR_LISTDIR} \
USERS=${USERS} AMANDA_GROUP=${AMANDA_GROUP}

pre-fetch:
@${ECHO} ""
@${ECHO} "You may use the following build options:"
Expand All @@ -181,35 +166,6 @@ CONFIGURE_ARGS+=--without-server --with-amandates=${AMANDA_DATES}
CFLAGS= -DFreeBSD_NO_SNAPSHOT_DUMP=t
.endif

MAN5= amanda-archive-format.5 \
amanda-client.conf.5 \
amanda.conf.5
MAN7= amanda-applications.7 \
amanda-auth.7 \
amanda-match.7 \
amanda-scripts.7
MAN8= amanda.8 \
amarchiver.8 \
amdump_client.8 \
amgtar.8 \
ampgsql.8 \
amraw.8 \
amrecover.8 \
amsamba.8 \
amservice.8 \
amstar.8 \
amsuntar.8 \
amzfs-sendrecv.8 \
amzfs-snapshot.8 \
script-email.8

post-install:
${MKDIR} ${AMANDA_GNUTAR_LISTDIR}
${CHOWN} ${USERS}:${AMANDA_GROUP} ${AMANDA_GNUTAR_LISTDIR}
${TOUCH} ${AMANDA_DATES}
${CHOWN} ${USERS}:${AMANDA_GROUP} ${AMANDA_DATES}
${CAT} ${PKGMESSAGE}

.endif

# MEMO:
Expand Down
16 changes: 16 additions & 0 deletions misc/amanda-server/files/pkg-install.client.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
# $FreeBSD$

case "$2" in
POST-INSTALL)
mkdir -p %%AMANDA_GNUTAR_LISTDIR%%
chown %%USERS%%:%%AMANDA_GROUP%% %%AMANDA_GNUTAR_LISTDIR%%
touch %%AMANDA_DATES%%
chown %%USERS%%:%%AMANDA_GROUP%% %%AMANDA_DATES%%
;;
POST-DEINSTALL)
test -s %%AMANDA_DATES%% || rm -f %%AMANDA_DATES%%
rmdir -p %%AMANDA_GNUTAR_LISTDIR%% || :
;;
esac

Loading

0 comments on commit 6cfd62d

Please sign in to comment.