aboutsummaryrefslogtreecommitdiff
path: root/astro/xplanet
diff options
context:
space:
mode:
authorRoman Bogorodskiy <novel@FreeBSD.org>2005-04-16 10:55:22 +0000
committerRoman Bogorodskiy <novel@FreeBSD.org>2005-04-16 10:55:22 +0000
commit84dffb2f3745a3056204468f3441ece339317c80 (patch)
treed9acc6040f1b41a2d7fd69bba87a310cf8efdae6 /astro/xplanet
parent54adf866b1bcadfbef8a77a63c1e41446db5ad4b (diff)
downloadports-84dffb2f3745a3056204468f3441ece339317c80.tar.gz
ports-84dffb2f3745a3056204468f3441ece339317c80.zip
Do not overwrite config file on upgrade.
Requested by: Dan Langille <dan@langille.org>
Notes
Notes: svn path=/head/; revision=133477
Diffstat (limited to 'astro/xplanet')
-rw-r--r--astro/xplanet/Makefile12
-rw-r--r--astro/xplanet/pkg-plist2
2 files changed, 11 insertions, 3 deletions
diff --git a/astro/xplanet/Makefile b/astro/xplanet/Makefile
index fa962265c912..f8d80cfa82a3 100644
--- a/astro/xplanet/Makefile
+++ b/astro/xplanet/Makefile
@@ -7,7 +7,7 @@
PORTNAME= xplanet
PORTVERSION= 1.1.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= astro
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -15,6 +15,7 @@ MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= novel@FreeBSD.org
COMMENT= Draw pictures of the earth textured by an image
+USE_REINPLACE= yes
USE_X_PREFIX= yes
GNU_CONFIGURE= yes
USE_GNOME= #
@@ -22,8 +23,6 @@ CONFIGURE_ARGS= --with-map-extension=jpg
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \
LIBS="-L${LOCALBASE}/lib -L${X11BASE}/lib -lm"
-PLIST_FILES= bin/xplanet
-
OPTIONS= FREETYPE "Enable Freetype support" on \
PANGO "Enable PANGO support" on \
GIF "Enable GIF support" on \
@@ -85,6 +84,10 @@ LIB_DEPENDS+= tiff.4:${PORTSDIR}/graphics/tiff
CONFIGURE_ARGS+= --without-tiff
.endif
+post-extract:
+ @${REINPLACE_CMD} -e "s/default/default.sample/g" ${WRKSRC}/Makefile.in
+ @${MV} ${WRKSRC}/xplanet/config/default ${WRKSRC}/xplanet/config/default.sample
+
post-install:
.for file in freebsd.committers.markers freebsd.ftp.markers
@${INSTALL_DATA} ${PORTSDIR}/astro/xearth/files/${file} \
@@ -94,5 +97,8 @@ post-install:
${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
@${FIND} ${DATADIR} -type d | ${SORT} -r | \
${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
+ @if test ! -f ${DATADIR}/config/default; then \
+ ${CP} ${DATADIR}/config/default.sample ${DATADIR}/config/default; \
+ fi
.include <bsd.port.post.mk>
diff --git a/astro/xplanet/pkg-plist b/astro/xplanet/pkg-plist
new file mode 100644
index 000000000000..3e9d39883a13
--- /dev/null
+++ b/astro/xplanet/pkg-plist
@@ -0,0 +1,2 @@
+bin/xplanet
+@unexec if cmp -s %D/share/xplanet/config/defult %D/share/xplanet/config/defult.sample; then rm -f %D/share/xplanet/config/defult; fi