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

(-)Makefile (-10 / +1 lines)
Lines 29-44 Link Here
29
	Psh::Strategy.3 \
29
	Psh::Strategy.3 \
30
	Psh::StrategyBunch.3
30
	Psh::StrategyBunch.3
31
31
32
pre-install:
33
	@${PERL} -pi -e "s:/usr/local:${PREFIX}:g" ${WRKSRC}/Makefile;
34
	@${PERL} -pi -e "s:/usr/local/man/man1:${MAN3PREFIX}/man/man1:g" ${WRKSRC}/Makefile;
35
	@${PERL} -pi -e "s:/usr/local/lib/perl5/5.00503/man/man3:${MAN3PREFIX}/man/man3:g" ${WRKSRC}/Makefile;
36
37
post-install:
32
post-install:
38
	@${ECHO_MSG} "Updating /etc/shells"
33
	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
39
	@${CP} /etc/shells /etc/shells.bak
40
	@(${GREP} -v ${PREFIX}/bin/psh /etc/shells.bak; \
41
	${ECHO_CMD} ${PREFIX}/bin/psh) > /etc/shells
42
	@${RM} /etc/shells.bak
43
34
44
.include <bsd.port.mk>
35
.include <bsd.port.mk>
(-)pkg-deinstall (+22 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
6
PSH="${PKG_PREFIX-/usr/local}/bin/psh"
7
SHELLS="${PKG_DESTDIR-}/etc/shells"
8
9
case $2 in
10
DEINSTALL)
11
  if grep -qs "^$PSH\$" "$SHELLS"; then
12
    if [ `id -u` -eq 0 ]; then
13
      TMPSHELLS=`mktemp -t shells`
14
      grep -v "^$PSH\$" "$SHELLS" > "$TMPSHELLS"
15
      cat "$TMPSHELLS" > "$SHELLS"
16
      rm "$TMPSHELLS"
17
    else
18
      echo "Not root, please remove $PSH from $SHELLS manually"
19
    fi
20
  fi
21
  ;;
22
esac
(-)pkg-install (+19 lines)
Added Link Here
1
#!/bin/sh
2
#
3
# $FreeBSD$
4
#
5
6
PSH="${PKG_PREFIX-/usr/local}/bin/psh"
7
SHELLS="${PKG_DESTDIR-}/etc/shells"
8
9
case $2 in
10
POST-INSTALL)
11
  if [ -d "${SHELLS%/*}" ] && ! grep -qs "^$PSH\$" "$SHELLS"; then
12
    if [ `id -u` -eq 0 ]; then
13
      echo "$PSH" >> "$SHELLS"
14
    else
15
      echo "Not root, please add $PSH to $SHELLS manually"
16
    fi
17
  fi
18
  ;;
19
esac
(-)pkg-plist (-2 lines)
Lines 1-7 Link Here
1
@comment $FreeBSD: ports/shells/perlsh/pkg-plist,v 1.12 2005/04/19 17:46:52 leeym Exp $
1
@comment $FreeBSD: ports/shells/perlsh/pkg-plist,v 1.12 2005/04/19 17:46:52 leeym Exp $
2
bin/psh
2
bin/psh
3
@exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
4
@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
5
share/psh/complete/debian
3
share/psh/complete/debian
6
share/psh/complete/perl
4
share/psh/complete/perl
7
share/psh/complete/standard
5
share/psh/complete/standard

Return to bug 80583