View | Details | Raw Unified | Return to bug 200520
Collapse All | Expand All

(-)Makefile (-20 / +13 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	FreeBSD-Portindex
4
PORTNAME=	FreeBSD-Portindex
5
PORTVERSION=	3.4
5
PORTVERSION=	3.4
6
PORTREVISION=	2
6
PORTREVISION=	3
7
CATEGORIES=	ports-mgmt perl5
7
CATEGORIES=	ports-mgmt perl5
8
MASTER_SITES=	http://www.infracaninophile.co.uk/portindex/
8
MASTER_SITES=	http://www.infracaninophile.co.uk/portindex/
9
PKGNAMEPREFIX=	p5-
9
PKGNAMEPREFIX=	p5-
Lines 16-36 Link Here
16
BUILD_DEPENDS=	p5-BerkeleyDB>0:${PORTSDIR}/databases/p5-BerkeleyDB
16
BUILD_DEPENDS=	p5-BerkeleyDB>0:${PORTSDIR}/databases/p5-BerkeleyDB
17
RUN_DEPENDS:=	${BUILD_DEPENDS}
17
RUN_DEPENDS:=	${BUILD_DEPENDS}
18
18
19
USES=		perl5 tar:xz
20
USE_PERL5=	configure
19
NO_ARCH=	yes
21
NO_ARCH=	yes
20
22
21
# GraphViz not required for portindex to run or generate GraphViz
22
# format output: this is only needed to render the output on the same
23
# machine.
24
OPTIONS_DEFINE=	GRAPHVIZ
25
GRAPHVIS_DESCR=	Add GraphViz run-time dependency
26
27
.include <bsd.port.options.mk>
28
29
GRAPHVIZ_RUN_DEPENDS=	dot:${PORTSDIR}/graphics/graphviz
30
31
USES+=		perl5 tar:xz
32
USE_PERL5=	configure
33
34
CACHE_DIR?=	/var/db/portindex
23
CACHE_DIR?=	/var/db/portindex
35
CACHE_OWNER?=	root
24
CACHE_OWNER?=	root
36
CACHE_GROUP?=	operator
25
CACHE_GROUP?=	operator
Lines 38-53 Link Here
38
27
39
CFG_FILE=	portindex.cfg
28
CFG_FILE=	portindex.cfg
40
29
41
SUB_FILES+=	pkg-install pkg-deinstall
30
PLIST_SUB+=	CACHE_DIR=${CACHE_DIR} \
42
SUB_LIST+=	CACHE_DIR=${CACHE_DIR} \
43
		CACHE_OWNER=${CACHE_OWNER} \
31
		CACHE_OWNER=${CACHE_OWNER} \
44
		CACHE_GROUP=${CACHE_GROUP} \
32
		CACHE_GROUP=${CACHE_GROUP} \
45
		CACHE_MODE=${CACHE_MODE}
33
		CACHE_MODE=${CACHE_MODE}
46
34
47
post-install:	install-conf
35
# GraphViz not required for portindex to run or generate GraphViz
36
# format output: this is only needed to render the output on the same
37
# machine.
38
OPTIONS_DEFINE=	GRAPHVIZ
39
GRAPHVIZ_DESC=	Add GraphViz run-time dependency
40
GRAPHVIZ_RUN_DEPENDS=	dot:${PORTSDIR}/graphics/graphviz
48
41
49
install-conf:
42
post-install:
50
	cd ${WRKSRC} ; \
43
	${MKDIR} ${STAGEDIR}${CACHE_DIR}
51
	${INSTALL_DATA} ${CFG_FILE}.sample ${STAGEDIR}${PREFIX}/etc/${CFG_FILE}.sample
44
	${INSTALL_DATA} ${WRKSRC}/${CFG_FILE}.sample ${STAGEDIR}${PREFIX}/etc/${CFG_FILE}.sample
52
45
53
.include <bsd.port.mk>
46
.include <bsd.port.mk>
(-)files/pkg-deinstall.in (-23 lines)
Lines 1-23 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
6
PATH=/usr/sbin:/usr/bin:/bin ; export PATH
7
8
CACHE_DIR=%%CACHE_DIR%%
9
10
case $2 in
11
    
12
    # Remove the cache directory, but only if it is empty.
13
14
    POST-DEINSTALL)
15
	if [ ! -d ${CACHE_DIR} ] ; then
16
	    rmdir ${CACHE_DIR} >/dev/null 2>&1 || true
17
	fi
18
	;;
19
esac
20
21
#
22
# That's All Folks!
23
#
(-)files/pkg-install.in (-33 lines)
Lines 1-33 Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
6
PATH=/usr/sbin:/usr/bin:/bin ; export PATH
7
8
CACHE_DIR=%%CACHE_DIR%%
9
CACHE_OWNER=%%CACHE_OWNER%%
10
CACHE_GROUP=%%CACHE_GROUP%%
11
CACHE_MODE=%%CACHE_MODE%%
12
13
case $2 in
14
    
15
    # Create the cache directory and make it writable by group
16
    # 'operator' by default.  Only if the cache directory doesn't
17
    # already exist.  Have to do this by hand if installing via pkg.
18
    #
19
    # Add default copy of config file if no previous config file
20
    # exists.
21
22
    POST-INSTALL)
23
	if [ ! -d ${CACHE_DIR} ] ; then
24
	    mkdir -p ${CACHE_DIR}  
25
	    chown ${CACHE_OWNER}:${CACHE_GROUP} ${CACHE_GROUP}
26
	    chmod ${CACHE_MODE} ${CACHE_DIR}
27
	fi
28
	;;
29
esac
30
31
#
32
# That's All Folks!
33
#
(-)pkg-plist (-3 / +2 lines)
Lines 10-18 Link Here
10
man/man1/make-readmes.1.gz
10
man/man1/make-readmes.1.gz
11
man/man1/portdepends.1.gz
11
man/man1/portdepends.1.gz
12
man/man1/portindex.1.gz
12
man/man1/portindex.1.gz
13
@unexec if cmp -s %D/etc/portindex.cfg.sample %D/etc/portindex.cfg ; then rm -f %D/etc/portindex.cfg ; fi
13
@sample etc/portindex.cfg.sample
14
etc/portindex.cfg.sample
15
@exec [ ! -f %B/portindex.cfg ] && cp -p %B/%f %B/portindex.cfg || true
16
%%SITE_PERL%%/FreeBSD/Portindex/Category.pm
14
%%SITE_PERL%%/FreeBSD/Portindex/Category.pm
17
%%SITE_PERL%%/FreeBSD/Portindex/Config.pm
15
%%SITE_PERL%%/FreeBSD/Portindex/Config.pm
18
%%SITE_PERL%%/FreeBSD/Portindex/FileObject.pm
16
%%SITE_PERL%%/FreeBSD/Portindex/FileObject.pm
Lines 23-25 Link Here
23
%%SITE_PERL%%/FreeBSD/Portindex/PortsTreeObject.pm
21
%%SITE_PERL%%/FreeBSD/Portindex/PortsTreeObject.pm
24
%%SITE_PERL%%/FreeBSD/Portindex/Tree.pm
22
%%SITE_PERL%%/FreeBSD/Portindex/Tree.pm
25
%%SITE_PERL%%/FreeBSD/Portindex/TreeObject.pm
23
%%SITE_PERL%%/FreeBSD/Portindex/TreeObject.pm
24
@dir(%%CACHE_OWNER%%,%%CACHE_GROUP%%,%%CACHE_MODE%%) %%CACHE_DIR%%

Return to bug 200520