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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
# New ports collection makefile for: bjfiltercom
# Date created: 2001.02.10
# Whom: taoka@FreeBSD.org
#
# $FreeBSD$
#
PORTNAME?= bjfiltercom
PORTVERSION?= 1.3
PORTREVISION= 5
CATEGORIES= print linux
MASTER_SITES= ftp://download.canon.jp/pub/driver/bj/linux/
DISTFILES= ${RPMFILE}
.if !defined(SLAVE_PORT)
DISTFILES+= ${DOC_DISTFILES}
.endif
EXTRACT_ONLY= ${RPMFILE}
MAINTAINER= ports@FreeBSD.org
COMMENT?= Canon Bubble Jet Print Filter for Linux -- Common files
EXTRACT_DEPENDS= rpm2cpio.pl:${PORTSDIR}/archivers/rpm2cpio
.if defined(SLAVE_PORT)
RUN_DEPENDS= stsmon:${PORTSDIR}/print/bjfiltercom \
pstops:${PORTSDIR}/print/psutils-${PAPERSIZE}
.else
RUN_DEPENDS= ${LINUXBASE}/usr/lib/libxml.so.1:${PORTSDIR}/textproc/linux-libxml \
${LINUXBASE}/usr/lib/libjpeg.so.62:${PORTSDIR}/graphics/linux-jpeg \
${LINUXBASE}/usr/lib/libtiff.so.3:${PORTSDIR}/graphics/linux-tiff \
${LINUXBASE}/usr/lib/libglade.so.0:${PORTSDIR}/devel/linux-libglade \
${LINUXBASE}/usr/lib/libgtk-1.2.so.0:${PORTSDIR}/x11-toolkits/linux-gtk
BIN_FILES= bjcmd bjfilter bjprn lgmon printui stsmon
.endif
EXTRACT_CMD= rpm2cpio.pl
EXTRACT_BEFORE_ARGS=
EXTRACT_AFTER_ARGS= | ${CPIO} -id --quiet
PLIST_SUB+= PORTVERSION=${PORTVERSION}${_SUF1}${_SUF2}
DIST_SUBDIR= bjfilter
PLIST= ${.CURDIR}/pkg-plist
DESCR= ${.CURDIR}/pkg-descr
MD5_FILE= ${.CURDIR}/distinfo
ONLY_FOR_ARCHS= i386
USE_LINUX= yes
NO_MTREE= yes
RPMREVISION= 1
.if defined(SLAVE_PORT)
PAPERSIZE?= a4
.else
NO_BUILD= yes
.endif
RPMFILE= ${PORTNAME}-${PORTVERSION}-${RPMREVISION}.i386.rpm
DOC_DIR= ${PREFIX}/share/doc/${PKGNAME}
HTML_DIR= ${DOC_DIR}/html
DOC_DISTFILES= readme-${PORTVERSION}-${RPMREVISION}.tar.gz \
instruction-${PORTVERSION}-${RPMREVISION}.tar.gz \
faq-${PORTVERSION}-${RPMREVISION}.tar.gz
FILTER_NAME= filter${PREFIX_PRTYPE}${PRTYPE}${SUFFIX_PRTYPE}
.if ! defined(PREFIX_PRTYPE)
PRMODEL= F${PRTYPE}
.else
PRMODEL= ${PREFIX_PRTYPE:U}${PRTYPE}
.endif
do-build:
${SED} -e 's,%%PRMODEL%%,${PRMODEL},' \
${FILESDIR}/filter > ${WRKDIR}/${FILTER_NAME}
${SED} -e 's,%%PRMODEL%%,${PRMODEL},' \
-e 's,%%LINUXBASE%%,${LINUXBASE},g' \
${FILESDIR}/filter_gui > ${WRKDIR}/${FILTER_NAME}_gui
${SED} -e 's,%%PORTNAME%%,${PORTNAME},g' \
-e 's,%%FILTER_NAME%%,${FILTER_NAME},g' \
-e 's,%%PRMODEL%%,${PRMODEL},g' \
-e 's,%%PREFIX%%,${PREFIX},g' \
${FILESDIR}/setup > ${WRKDIR}/setup.freebsd
# XXX: this is missing "${BRANDELF} -t Linux <executables>"
do-install:
${MKDIR} ${LINUXBASE}/usr/lib/bjlib
${INSTALL_DATA} ${WRKDIR}/usr/lib/bjlib/* ${LINUXBASE}/usr/lib/bjlib
${INSTALL_DATA} ${WRKDIR}/usr/lib/lib* ${LINUXBASE}/usr/lib
-${LINUXBASE}/sbin/ldconfig
${INSTALL_SCRIPT} ${WRKDIR}/usr/local/bin/* ${PREFIX}/bin
.if defined(SLAVE_PORT)
${MKDIR} ${PREFIX}/libexec/${PORTNAME}
${INSTALL_SCRIPT} ${WRKDIR}/${FILTER_NAME} \
${PREFIX}/libexec/${PORTNAME}
${INSTALL_SCRIPT} ${WRKDIR}/${FILTER_NAME}_gui \
${PREFIX}/libexec/${PORTNAME}
${INSTALL_SCRIPT} ${WRKDIR}/setup.freebsd ${PREFIX}/libexec/${PORTNAME}/setup
${MKDIR} ${PREFIX}/libexec/${PORTNAME}/scripts
${INSTALL_DATA} ${FILESDIR}/en.lc ${PREFIX}/libexec/${PORTNAME}/scripts
${INSTALL_DATA} ${FILESDIR}/ja.lc ${PREFIX}/libexec/${PORTNAME}/scripts
.else
${MKDIR} ${LINUXBASE}/usr/local/share/printui
${MKDIR} ${LINUXBASE}/usr/local/share/locale/ja/LC_MESSAGES
${INSTALL_DATA} ${WRKDIR}/usr/local/share/printui/* ${LINUXBASE}/usr/local/share/printui
# The next file "i18n" is installed by ja-bjfilter*
${RM} ${LINUXBASE}/usr/local/share/printui/i18n
${INSTALL_DATA} ${WRKDIR}/usr/local/share/locale/ja/LC_MESSAGES/* \
${LINUXBASE}/usr/local/share/locale/ja/LC_MESSAGES
${MKDIR} ${LINUXBASE}/usr/local/share/stsmon/pixmaps
${INSTALL_DATA} ${WRKDIR}/usr/local/share/stsmon/pixmaps/* \
${LINUXBASE}/usr/local/share/stsmon/pixmaps
.for i in ${DOC_DISTFILES}
${MKDIR} ${HTML_DIR}
${TAR} -C ${HTML_DIR} -xzf ${DISTDIR}/${DIST_SUBDIR}/${i}
${INSTALL_DATA} ${FILESDIR}/license.txt.jp ${DOC_DIR}
.endfor
.endif
# a target for the maintainer
_MAKE_DESCR:
.if defined(SLAVE_PORT) && ${PORTNAME} != "bjfilter850"
.for file in pkg-comment pkg-descr
${SED} -e 's/F850/${PRMODEL}/g' \
-e 's/850/${PREFIX_PRTYPE}${PRTYPE}${SUFFIX_PRTYPE}/g' \
../bjfilter850/${file} > ${.CURDIR}/${file}
.endfor
.if defined(SUFFIX_PRTYPE) && ${SUFFIX_PRTYPE} == "ug"
i=`cat ../bjfilter850/pkg-comment`; \
echo $$i "(supported BCI-6 inks)" > ${.CURDIR}/pkg-comment
echo "" >> ${.CURDIR}/pkg-descr
echo "Notice: This is supported BCI-6 inks." >> ${.CURDIR}/pkg-descr
echo "" >> ${.CURDIR}/pkg-descr
echo "Notice: bjfilter850 and bjfilter850ug cannot be installed simultaneously." >> ${.CURDIR}/pkg-descr
.endif
.endif
.include <bsd.port.mk>
|