ports/190015: [patch] Add staging support to www/bins
Joseph Benden
joe at thrallingpenguin.com
Tue May 20 16:10:00 UTC 2014
>Number: 190015
>Category: ports
>Synopsis: [patch] Add staging support to www/bins
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue May 20 16:10:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Joseph Benden
>Release: FreeBSD 11
>Organization:
>Environment:
FreeBSD lucy 11.0-CURRENT FreeBSD 11.0-CURRENT #4 r264887: Thu Apr 24 12:43:46 MST 2014 root at lucy:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
Adds staging support to www/bins.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
diff --git a/www/bins/Makefile b/www/bins/Makefile
index 6ce0f22..4faf80f 100644
--- a/www/bins/Makefile
+++ b/www/bins/Makefile
@@ -29,7 +29,6 @@ RUN_DEPENDS= \
USES= tar:bzip2 perl5
USE_PERL5= run
NO_BUILD= yes
-NO_STAGE= yes
# additional scripts
BINS_SCRIPTS= tools/bins_txt2xml
@@ -49,16 +48,16 @@ post-patch::
${WRKSRC}/tools/bins_txt2xml
do-install:
- @${SETENV} PREFIX=${PREFIX} RC=${PREFIX}/share/bins ${WRKSRC}/install.sh
+ @${SETENV} LOCALE=${PREFIX}/share/locale DESTDIR=${STAGEDIR} PREFIX=${PREFIX} RC=${PREFIX}/share/bins ${WRKSRC}/install.sh
post-install:
.for file in ${BINS_SCRIPTS}
- @${INSTALL_SCRIPT} ${WRKSRC}/${file} ${PREFIX}/bin
+ @${INSTALL_SCRIPT} ${WRKSRC}/${file} ${STAGEDIR}${PREFIX}/bin
.endfor
.ifndef(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
.for ext in ${DOC_EXTS}
- @${INSTALL_DATA} ${WRKSRC}/doc/*.${ext} ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/doc/*.${ext} ${STAGEDIR}${DOCSDIR}
.endfor
.endif
diff --git a/www/bins/files/extra-patch-install.sh b/www/bins/files/extra-patch-install.sh
index 08fe442..e092fcd 100644
--- a/www/bins/files/extra-patch-install.sh
+++ b/www/bins/files/extra-patch-install.sh
@@ -1,6 +1,23 @@
---- install.sh.orig Thu Aug 25 06:07:05 2005
-+++ install.sh Mon Mar 19 02:47:24 2007
-@@ -67,11 +67,10 @@
+--- install.sh.orig 2014-05-20 08:56:00.000000000 -0700
++++ install.sh 2014-05-20 09:00:43.000000000 -0700
+@@ -24,6 +24,7 @@
+ GLOBAL_RC="$RC"
+
+ DESTDIR=`echo "$DESTDIR"|sed 's%/$%%'`
++ORIGPREFIX=$PREFIX
+ PREFIX=$DESTDIR/`echo "$PREFIX"|sed 's%^/%%'`
+ PREFIX=`echo "$PREFIX"|sed 's%/$%%'`
+ ETC=$DESTDIR/`echo "$ETC"|sed 's%^/%%'`
+@@ -35,7 +36,7 @@
+ SHARE="$PREFIX/share"
+ DATA="$SHARE/bins"
+ GLADE="$DATA"
+-LOCALE="$SHARE/locale"
++LOCALE="${SHARE}/locale"
+ MAN="$PREFIX/man/man1"
+
+ cd `dirname $0`
+@@ -67,11 +68,10 @@
if [ -w $BIN ] ; then
echo "Installing program files in $BIN"
# bins_cleanupgallery anti_bins
@@ -13,7 +30,7 @@
chmod a+rx $BIN/anti_bins
# perl -pi -e "s{/usr/local/share}{$SHARE}g" \
# $BIN/bins $BIN/bins_edit $BIN/bins-edit-gui
-@@ -169,13 +168,6 @@
+@@ -169,13 +169,6 @@
fi
set -o errexit
@@ -27,7 +44,7 @@
# man pages
mkdir -p $MAN 2>/dev/null || true
if [ -w $MAN ] ; then
-@@ -203,9 +195,6 @@
+@@ -203,9 +196,6 @@
do
mkdir -p $LOCALE/$L/LC_MESSAGES 2>/dev/null || true
cp intl/$L.mo $LOCALE/$L/LC_MESSAGES/bins.mo
@@ -37,3 +54,12 @@
done
else
cat <<!EoF
+@@ -227,7 +217,7 @@
+ do
+ echo -n " $FILE"
+ ed "$FILE" <<EoF 2>/dev/null
+-1,\$s%/usr/local/share%$SHARE%g
++1,\$s%/usr/local/share%$ORIGPREFIX/share%g
+ 1,\$s%/etc/bins%$GLOBAL_RC%g
+ wq
+ EoF
diff --git a/www/bins/pkg-plist b/www/bins/pkg-plist
index 14649f4..09e99ac 100644
--- a/www/bins/pkg-plist
+++ b/www/bins/pkg-plist
@@ -1,6 +1,9 @@
bin/bins
bin/bins_edit
bin/bins_txt2xml
+man/man1/bins-edit-gui.1.gz
+man/man1/bins.1.gz
+man/man1/bins_edit.1.gz
%%DATADIR%%/binsrc
%%DATADIR%%/templates.joi/details.html
%%DATADIR%%/templates.joi/footer.html
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list