Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Apr 2012 15:12:24 GMT
From:      nemysis <nemysis@gmx.ch>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/166966: A script to make light pkg-plist files for new FreeBSD Ports
Message-ID:  <201204151512.q3FFCOIn038966@red.freebsd.org>
Resent-Message-ID: <201204151520.q3FFK8S0072376@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         166966
>Category:       ports
>Synopsis:       A script to make light pkg-plist files for new FreeBSD Ports
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 15 15:20:08 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     nemysis
>Release:        9.0-RELEASE FreeBSD 9.0-RELEASE #0
>Organization:
>Environment:
9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
A script to light make pkg-plist for new FreeBSD Ports. This is new and I adjust it when I make new FreeBSD Ports.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	freebsd-make-pkg-plist
#
echo x - freebsd-make-pkg-plist
sed 's/^X//' >freebsd-make-pkg-plist << 'e9657aada85f3163eaacb8b9e1a3c311'
X#!/usr/local/bin/bash
X
X# Author nemysis
X
Xecho ""
Xecho "$0"
Xecho ""
X
Xecho ""
Xecho You are `whoami`
Xecho""
Xecho "Start this as root!"
Xecho ""
X
X# Without root no chance
Xif(( $UID != 0 )); then
Xecho "This script needs root privileges. Aborting now..."
Xecho ""
Xexit 1
Xfi
X
X
Xrm -fr /var/tmp/ports
X
Xecho ""
Xecho -n  "Which Category would you use?"
Xcd 
Xecho ""
Xecho ""
Xls /usr/local/ports/local/
Xecho ""
Xread CATEGORY
Xecho ""
Xcd /usr/local/ports/local/$CATEGORY
X
Xecho -n  "Which FreeBSD Port would you make?"
Xcd 
Xecho ""
Xecho ""
Xls -l /usr/local/ports/local/$CATEGORY
Xecho ""
Xread PORTNAME
X
Xcd /usr/local/ports/local/$CATEGORY/$PORTNAME
X
Xecho ""
Xecho "make makesum"
Xmake makesum
X
Xecho ""
Xecho ""
Xecho "Check with portlint..."
Xecho ""
Xportlint
X
Xecho ""
Xecho ""
Xecho -n  "Is all good with Makefile? (y,n)"
Xecho ""
Xecho ""
Xread MAKEFILE
Xif [ "${MAKEFILE}" = "Y" -o "${MAKEFILE}" = "y" ]
X    then
X        echo ""
X        echo "Good now make pkg-plist.."
X        echo ""
X    else
X        echo ""
X        echo "Please adjust Makefile and restart again script $0!"
X        exit 1
Xfi
X
Xecho ""
Xmkdir /var/tmp/ports`make -V $PORTNAME`
Xmtree -U -f `make -V MTREE_FILE` -d -e -p /var/tmp/ports`make -V $PORTNAME`
Xmkdir /var/tmp/ports`make -V $PORTNAME`/share/applications
Xmake depends PREFIX=/var/tmp/ports`make -V $PORTNAME`
X
Xmake install PREFIX=/var/tmp/ports`make -V $PORTNAME`
X
Xplist -Md -m `make -V MTREE_FILE` /var/tmp/ports`make -V $PORTNAME` > pkg-plist
X
X# Adjust what You don't wish to be in pkg-plist, attention...
Xsed -i '' -e '/usr/d' pkg-plist
Xsed -i '' -e "/share\/$PORTNAME/d" pkg-plist
X#sed -i '' -e '/share\/applications/d' pkg-plist
Xsed -i '' -e '/share\/doc/d' pkg-plist
X#sed -i '' -e '/share\/icons/d' pkg-plist
Xsed -i '' -e '/share\/licenses/d' pkg-plist
Xsed -i '' -e '/dirrm share\/applications/d' pkg-plist
Xsed -i '' -e '/dirrm share\/icons/d' pkg-plist
X
Xecho ""
Xecho "Manualy look pkg-plist and adjust it if needed!"
Xecho ""
e9657aada85f3163eaacb8b9e1a3c311
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204151512.q3FFCOIn038966>