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

(-)Makefile (-12 / +12 lines)
Lines 7-23 Link Here
7
7
8
PORTNAME=	gnokii
8
PORTNAME=	gnokii
9
PORTVERSION=	0.4.3
9
PORTVERSION=	0.4.3
10
PORTREVISION=	1
10
PORTEPOCH=	1
11
PORTEPOCH=	1
11
CATEGORIES=	comms
12
CATEGORIES=	comms
12
MASTER_SITES=	ftp://ftp.nuug.no/pub/anders/distfiles/ \
13
MASTER_SITES=	ftp://ftp.nuug.no/pub/anders/distfiles/ \
13
		http://freesoftware.fsf.org/download/gnokii/
14
		http://freesoftware.fsf.org/download/gnokii/ \
14
#		ftp://ftp.gnokii.org/pub/gnokii/
15
		ftp://ftp.gnokii.org/pub/gnokii/
15
16
16
MAINTAINER=	anders@FreeBSD.org
17
MAINTAINER=	anders@FreeBSD.org
17
18
18
LIB_DEPENDS=	intl.4:${PORTSDIR}/devel/gettext
19
LIB_DEPENDS=	intl.4:${PORTSDIR}/devel/gettext
19
20
20
USE_GMAKE=	yes
21
USE_GMAKE=	yes
22
USE_REINPLACE=	yes
21
.if !defined(WITHOUT_X11)
23
.if !defined(WITHOUT_X11)
22
USE_XPM=	yes
24
USE_XPM=	yes
23
USE_GNOMENG=	yes
25
USE_GNOMENG=	yes
Lines 38-70 Link Here
38
CONFIGURE_ENV+=	MSGFMT="${LOCALBASE}/bin/msgfmt" \
40
CONFIGURE_ENV+=	MSGFMT="${LOCALBASE}/bin/msgfmt" \
39
		XGETTEXT="${LOCALBASE}/bin/xgettext"
41
		XGETTEXT="${LOCALBASE}/bin/xgettext"
40
42
41
NO_PACKAGE=	"Group needs to be created"
42
MAN1=	gnokii.1 todologo.1
43
MAN1=	gnokii.1 todologo.1
43
.if !defined(WITHOUT_X11)
44
.if !defined(WITHOUT_X11)
44
MAN1+=	xgnokii.1
45
MAN1+=	xgnokii.1
45
.endif
46
.endif
46
MAN8=	gnokiid.8 mgnokiidev.8
47
MAN8=	gnokiid.8 mgnokiidev.8
47
48
48
INSTALL_TARGET=	install-suid
49
PKGDEINSTALL=	${PKGINSTALL}
49
50
50
FIXPREFIX=	Docs/man/gnokiid.8 Docs/DataCalls-QuickStart Docs/README \
51
FIXPREFIX=	Docs/man/gnokiid.8 Docs/DataCalls-QuickStart Docs/README \
51
		common/cfgreader.c po/et.po po/sl.po
52
		common/cfgreader.c po/et.po po/sl.po
52
53
53
post-patch:
54
post-patch:
54
.for f in ${FIXPREFIX}
55
.for f in ${FIXPREFIX}
55
	@${SED} -e "s:/etc/gnokiirc:${PREFIX}/etc/gnokiirc:g" \
56
	@${REINPLACE_CMD} -e "s:/etc/gnokiirc:${PREFIX}/etc/gnokiirc:g" ${WRKSRC}/${f}
56
	< ${WRKSRC}/${f} > ${WRKSRC}/${f}.post_sed
57
	@${CP} ${WRKSRC}/${f}.post_sed ${WRKSRC}/${f}
58
.endfor
57
.endfor
59
	@${SED} -e "s:%%PTHREAD_LIBS%%:${PTHREAD_LIBS}:" \
58
	@${REINPLACE_CMD} -e "s:%%PTHREAD_LIBS%%:${PTHREAD_LIBS}:; \
60
		-e "s:%%PTHREAD_CFLAGS%%:${PTHREAD_CFLAGS}:" \
59
		s:%%PTHREAD_CFLAGS%%:${PTHREAD_CFLAGS}:" ${WRKSRC}/configure
61
	< ${WRKSRC}/configure > ${WRKSRC}/configure.post_sed
60
	@${REINPLACE_CMD} -e 's,^\(#define[[:space:]]*_XOPEN_SOURCE.*\),/* \1 */,' \
62
	@${CP} ${WRKSRC}/configure.post_sed ${WRKSRC}/configure
61
		${WRKSRC}/common/data/virtmodem.c ${WRKSRC}/utils/mgnokiidev.c
63
62
64
pre-install:
63
pre-install:
65
	@${SH} ${SCRIPTDIR}/creategroup
64
	@${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
66
65
67
post-install:
66
post-install:
67
	@${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
68
	@(cd ${WRKSRC} && ${GMAKE} install-docs)
68
	@(cd ${WRKSRC} && ${GMAKE} install-docs)
69
	${INSTALL_DATA} ${WRKSRC}/Docs/sample/gnokiirc \
69
	${INSTALL_DATA} ${WRKSRC}/Docs/sample/gnokiirc \
70
		${PREFIX}/etc/gnokiirc.sample
70
		${PREFIX}/etc/gnokiirc.sample
(-)pkg-install (+37 lines)
Added Link Here
1
#!/bin/sh
2
3
PATH=/bin:/usr/bin:/usr/sbin
4
5
GROUP=gnokii
6
7
SUIDBINS="${PKG_PREFIX}/sbin/gnokiid ${PKG_PREFIX}/sbin/mgnokiidev"
8
BINS="${PKG_PREFIX}/bin/gnokii ${PKG_PREFIX}/bin/xgnokii ${SUIDBINS}"
9
10
case "$2" in
11
"PRE-INSTALL")
12
	if pw group show "${GROUP}" 2>/dev/null; then
13
		echo "You already have a group \"${GROUP}\", so I will use it."
14
	else
15
		if pw groupadd ${GROUP}; then
16
			echo "Added group \"${GROUP}\"."
17
		else
18
			echo "Adding group \"${GROUP}\" failed..."
19
			exit 1
20
		fi
21
	fi
22
	;;
23
24
"POST-INSTALL")
25
	chgrp $GROUP $BINS
26
	chmod 750 ${BINS}
27
	chmod u+s ${SUIDBINS}
28
	;;
29
30
"DEINSTALL")
31
	if [ -z "`pw groupshow $GROUP 2>&1 | sed -E -e 's/^([^:]+:){3}(.*)$/\2/'`" ]; then
32
		echo "Removing empty group \"$GROUP\"."
33
		pw groupdel $GROUP
34
	fi
35
	;;
36
37
esac
(-)pkg-plist (+8 lines)
Lines 113-118 Link Here
113
%%X11%%share/xgnokii/xpm/Preview_6210.xpm
113
%%X11%%share/xgnokii/xpm/Preview_6210.xpm
114
%%X11%%share/xgnokii/xpm/Preview_6250.xpm
114
%%X11%%share/xgnokii/xpm/Preview_6250.xpm
115
%%X11%%share/xgnokii/xpm/Preview_7110.xpm
115
%%X11%%share/xgnokii/xpm/Preview_7110.xpm
116
%%X11%%@exec mkdir %D/share/xgnokii/help/en_US/calendar
117
%%X11%%@exec mkdir %D/share/xgnokii/help/en_US/contacts
118
%%X11%%@exec mkdir %D/share/xgnokii/help/en_US/dtmf
119
%%X11%%@exec mkdir %D/share/xgnokii/help/en_US/main
120
%%X11%%@exec mkdir %D/share/xgnokii/help/en_US/netmon/gsm
121
%%X11%%@exec mkdir %D/share/xgnokii/help/en_US/sms
122
%%X11%%@exec mkdir %D/share/xgnokii/help/en_US/speeddial
123
%%X11%%@exec mkdir %D/share/xgnokii/help/en_US/xkeyb
116
%%X11%%@dirrm share/xgnokii/help/en_US/cables
124
%%X11%%@dirrm share/xgnokii/help/en_US/cables
117
%%X11%%@dirrm share/xgnokii/help/en_US/calendar
125
%%X11%%@dirrm share/xgnokii/help/en_US/calendar
118
%%X11%%@dirrm share/xgnokii/help/en_US/contacts
126
%%X11%%@dirrm share/xgnokii/help/en_US/contacts
(-)scripts/creategroup (-16 lines)
Removed Link Here
1
#!/bin/sh
2
3
PATH=/bin:/usr/sbin
4
5
GROUP=gnokii
6
7
if pw group show "${GROUP}" 2>/dev/null; then
8
	echo "You already have a group \"${GROUP}\", so I will use it."
9
else
10
	if pw groupadd ${GROUP}; then
11
		echo "Added group \"${GROUP}\"."
12
	else
13
		echo "Adding group \"${GROUP}\" failed..."
14
		exit 1
15
	fi
16
fi

Return to bug 47516