Bug 181955 - astro/weather error in finding "stations" data file.
Summary: astro/weather error in finding "stations" data file.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-09 02:10 UTC by Hiren Panchasara
Modified: 2013-09-09 11:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hiren Panchasara freebsd_committer freebsd_triage 2013-09-09 02:10:02 UTC
% cat distinfo  
SHA256 (weather-2.0.tar.xz) = 807aff002d31cd81aeaae096981c28900323c405b8f7d36625d9c7e48719347a
SIZE (weather-2.0.tar.xz) = 8928144

After installing weather,

% weather 90007
Searching via ZCTA...
weather error: can't find "stations" data file

% weather sfo
Searching via airport...
weather error: can't find "stations" data file

I need to go to the work dir where "stations" file actually is to use this port.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-09-09 02:10:10 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sunpoet

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-09-09 11:09:36 UTC
Author: sunpoet
Date: Mon Sep  9 10:09:03 2013
New Revision: 326797
URL: http://svnweb.freebsd.org/changeset/ports/326797

Log:
  - Install data files (airports, places, stations, zctas and zones)
  - Use CONFLICTS_INSTALL instead of CONFLICTS
  - Use USES=shebangfix
  - Add post-install: message
  - Bump PORTREVISION for package change
  
  PR:		ports/181955
  Submitted by:	hiren

Modified:
  head/astro/weather/Makefile

Modified: head/astro/weather/Makefile
==============================================================================
--- head/astro/weather/Makefile	Mon Sep  9 10:09:00 2013	(r326796)
+++ head/astro/weather/Makefile	Mon Sep  9 10:09:03 2013	(r326797)
@@ -3,6 +3,7 @@
 
 PORTNAME=	weather
 PORTVERSION=	2.0
+PORTREVISION=	1
 CATEGORIES=	astro python
 MASTER_SITES=	http://fungi.yuggoth.org/weather/src/ \
 		LOCAL/sunpoet
@@ -12,10 +13,11 @@ COMMENT=	Utility to provide current weat
 
 LICENSE=	ISCL
 
-CONFLICTS=	expect-[0-9]* expect-nox11-[0-9]*
+CONFLICTS_INSTALL=	expect-[0-9]* expect-nox11-[0-9]*
 
 USE_PYTHON=	yes
 USE_XZ=		yes
+USES=		shebangfix
 
 MAN1=		${PORTNAME}.1
 MAN5=		${PORTNAME}rc.5
@@ -23,9 +25,11 @@ PLIST_FILES=	bin/${PORTNAME} \
 		%%PYTHON_SITELIBDIR%%/${PORTNAME}.py \
 		%%PYTHON_SITELIBDIR%%/${PORTNAME}.pyc \
 		%%PYTHON_SITELIBDIR%%/${PORTNAME}.pyo
+PORTDATA=	airports places stations zctas zones
 
-post-patch:
-	@${REINPLACE_CMD} -e '1 s|/usr/bin/env python|${PYTHON_CMD}|' ${WRKSRC}/${PORTNAME}
+SHEBANG_FILES=	${PORTNAME}
+python_OLD_CMD=	${SETENV} python
+python_CMD=	${PYTHON_CMD}
 
 do-build:
 	@${PYTHON_CMD} -m compileall ${WRKSRC}/${PORTNAME}.py
@@ -36,5 +40,15 @@ do-install:
 	cd ${WRKSRC}/ && ${INSTALL_DATA} ${PORTNAME}.py ${PORTNAME}.pyc ${PORTNAME}.pyo ${PYTHON_SITELIBDIR}/
 	${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${MANPREFIX}/man/man1/${PORTNAME}.1
 	${INSTALL_MAN} ${WRKSRC}/${PORTNAME}rc.5 ${MANPREFIX}/man/man5/${PORTNAME}rc.5
+	${MKDIR} ${DATADIR}/
+	cd ${WRKSRC}/ && ${INSTALL_DATA} ${PORTDATA} ${DATADIR}/
+
+post-install:
+	@${ECHO_MSG} ""
+	@${ECHO_MSG} "Please add the following to your .weatherrc in order to use installed data files:"
+	@${ECHO_MSG} ""
+	@${ECHO_MSG} "[default]"
+	@${ECHO_MSG} "setpath = ${DATADIR}"
+	@${ECHO_MSG} ""
 
 .include <bsd.port.mk>
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2013-09-09 11:10:32 UTC
State Changed
From-To: open->closed

Problem solved in the ports tree.