summaryrefslogtreecommitdiff
path: root/japanese/gsuica/Makefile
blob: d78ae7ff42f9e54ab4045f3a56ee17bdbcc6d583 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Created by: Hajimu UMEMOTO <ume@FreeBSD.org>
# $FreeBSD$

PORTNAME=	gsuica
PORTVERSION=	0.9.1
#PORTREVISION=	0
CATEGORIES=	japanese ruby
MASTER_SITES=	http://homepage3.nifty.com/slokar/pasori/
DISTNAME=	${PORTNAME}
EXTRACT_SUFX=	# empty
DIST_SUBDIR=	${PORTNAME}-${PORTVERSION}

MAINTAINER=	ume@FreeBSD.org
COMMENT=	GNOME SUICA Viewer

LICENSE=	GPLv2

RUN_DEPENDS=	${RUBY_SITEARCHLIBDIR}/gtk2.so:${PORTSDIR}/x11-toolkits/ruby-gtk2 \
		${RUBY_SITEARCHLIBDIR}/pasori.so:${PORTSDIR}/devel/libpafe-ruby

USE_RUBY=	yes
RUBY_VER=	1.9

EXTRACT_CMD=		${CP}
EXTRACT_BEFORE_ARGS=	-p
EXTRACT_AFTER_ARGS=	.
NO_WRKSUBDIR=		yes
NO_BUILD=		yes

PLIST_FILES=	bin/${PORTNAME}

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

.if ${RUBY_DEFAULT_VER} != ${RUBY_VER}
IGNORE=		requires RUBY_DEFAULT_VER=${RUBY_VER}
.endif

post-patch:
	@${REINPLACE_CMD} -e 's,#! /usr/bin/ruby1.9.3,#!${RUBY},g' \
			  ${WRKSRC}/${PORTNAME}

do-install:
	@${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin

# Fetch station code database
station-code-fetch:
	@(cd ${WRKDIR}; \
	  ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} \
		-o StationCode.xls \
		http://www.denno.net/SFCardFan/sendexcel.php; \
		${FETCH_AFTER_ARGS} \
	  ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} \
		${MASTER_SITES}station_code_conv.sh ${FETCH_AFTER_ARGS})

# Install station code database into ~/.gsuica/station_code
# BUILD_DEPENDS+=	nkf:${PORTSDIR}/japanese/nkf
# BUILD_DEPENDS+=	xlhtml:${PORTSDIR}/textproc/xlhtml
station-code-install:
	@(cd ${WRKDIR}; ${SH} station_code_conv.sh StationCode.xls)

.include <bsd.port.post.mk>